Hi Help me in that

04/29/2012 02:41 Fairy10#1
i make the script
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


HotKeySet("{z}", "Selectoncheckbox1")
#Region ### START Koda GUI section ### Form=Form1.kxf
$Form1 = GUICreate("", 215, 235, 299, 218)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 112, 16, 97, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

	EndSwitch
WEnd


Func Selectoncheckbox1()
; what add here to Hotkeyset work can help?
EndFunc
i need know what i add under Func Selectoncheckbox1()
; what add here to Hotkeyset work can help?
04/29/2012 02:48 theDJ-scripts#2
Quote:
Originally Posted by Fairy10 View Post
i make the script
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


HotKeySet("{z}", "Selectoncheckbox1")
#Region ### START Koda GUI section ### Form=Form1.kxf
$Form1 = GUICreate("", 215, 235, 299, 218)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 112, 16, 97, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

	EndSwitch
WEnd


Func Selectoncheckbox1()
; what add here to Hotkeyset work can help?
EndFunc
i need know what i add under Func Selectoncheckbox1()
; what add here to Hotkeyset work can help?
You have to add there a Tag like:
MsgBox(0,"Test...","This is just a test")

->
Code:
<ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


HotKeySet("{z}", "Selectoncheckbox1")
#Region ### START Koda GUI section ### Form=Form1.kxf
$Form1 = GUICreate("", 215, 235, 299, 218)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 112, 16, 97, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

	EndSwitch
WEnd


Func Selectoncheckbox1()
MsgBox(0,"Test...","This is just a test")
EndFunc
Press "z" for a MsgBox... (just an example)
04/29/2012 16:34 Fairy10#3
Quote:
Originally Posted by spielie View Post
You have to add there a Tag like:
MsgBox(0,"Test...","This is just a test")

->
Code:
<ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


HotKeySet("{z}", "Selectoncheckbox1")
#Region ### START Koda GUI section ### Form=Form1.kxf
$Form1 = GUICreate("", 215, 235, 299, 218)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 112, 16, 97, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

	EndSwitch
WEnd


Func Selectoncheckbox1()
MsgBox(0,"Test...","This is just a test")
EndFunc
Press "z" for a MsgBox... (just an example)
i know Msgbox but i need to make Turn On to CheckBox
04/29/2012 18:39 theDJ-scripts#4
Quote:
Originally Posted by Fairy10 View Post
i know Msgbox but i need to make Turn On to CheckBox
Code:
GUICtrlSetState($Checkbox1, $GUI_CHECKED)
GUICtrlSetState([CHECKBOXNAME], [$GUI_CHECKED for checking; $GUI_UNCHECKED for unchecking)


04/30/2012 15:50 Fairy10#5
Quote:
Originally Posted by spielie View Post
Code:
GUICtrlSetState($Checkbox1, $GUI_CHECKED)
GUICtrlSetState([CHECKBOXNAME], [$GUI_CHECKED for checking; $GUI_UNCHECKED for unchecking)

Thanks Work
but can one too Remove Chick?
04/30/2012 16:10 SwarN#6
Code:
GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
:/
04/30/2012 16:45 Fairy10#7
Quote:
Originally Posted by SwarN View Post
Code:
GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
:/
i know that for Select but need one for remove it too
04/30/2012 18:48 SwarN#8
for check:

Code:
GUICtrlSetState($Checkbox1, $GUI_CHECKED)

for uncheck:

Code:
GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
04/30/2012 20:44 *TheWarLords*#9
Quote:
Originally Posted by SwarN View Post
for check:

Code:
GUICtrlSetState($Checkbox1, $GUI_CHECKED)

for uncheck:

Code:
GUICtrlSetState($Checkbox1, $GUI_UNCHECKED)
Yes
But that good at Caps :D

Code:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


HotKeySet("{z}", "Selectoncheckbox")
HotKeySet("{x}", "Selectoncheckbox1")
#Region ### START Koda GUI section ### Form=Form1.kxf
$Form1 = GUICreate("", 215, 235, 299, 218)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 112, 16, 97, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

	EndSwitch
WEnd


Func Selectoncheckbox()
GUICtrlSetState($Checkbox1, $GUI_CHECKED)
EndFunc

Func Selectoncheckbox1()
GUICtrlSetState($Checkbox1, $GUI_unchecked)
EndFunc