AlmarM
01-12-2009, 15:38
I will be the first one to create a topic, and I made a HotKeySet example.
; You can make a comment by placing a ";" before your comment.
#cs
You could also make a comment like this.
With multiple lines.
#ce
HotKeySet("{ESC}", "_Exit") ; Set the function "_Exit" to the key "ESCAPE"
HotKeySet("{INS}", "MyFunc") ; Set the function "MyFunc" to the key "INSERT"
While 1 ; Start a Loop
Sleep(1000) ; Sleep 1000 milliseconds (1 second)
WEnd ; Stop the Loop
Func _Exit() ; Start the "_Exit" function
Exit ; Exit the script
EndFunc ; Stop the last started function
Func MyFunc() ; Start the "MyFunc" function
Local $Text = InputBox("Title Goes Here", "Text Goes Here") ; Declare a Local variable '$Text', and assign a InputBox to it.
; For more information about the Local or InputBox, see the helpfile
MsgBox(64, "Title Goes Here", "You wrote: " & $Text) ; Make a MsgBox with the text you wrote into the InputBox
; For more information about the MsgBox, see the helpfile.
EndFunc ; Stop the last started function
Note: You have to press ESCAPE to exit the script, and INSERT to activate 'MyFunc'
:rolleyes:
AlmarM
; You can make a comment by placing a ";" before your comment.
#cs
You could also make a comment like this.
With multiple lines.
#ce
HotKeySet("{ESC}", "_Exit") ; Set the function "_Exit" to the key "ESCAPE"
HotKeySet("{INS}", "MyFunc") ; Set the function "MyFunc" to the key "INSERT"
While 1 ; Start a Loop
Sleep(1000) ; Sleep 1000 milliseconds (1 second)
WEnd ; Stop the Loop
Func _Exit() ; Start the "_Exit" function
Exit ; Exit the script
EndFunc ; Stop the last started function
Func MyFunc() ; Start the "MyFunc" function
Local $Text = InputBox("Title Goes Here", "Text Goes Here") ; Declare a Local variable '$Text', and assign a InputBox to it.
; For more information about the Local or InputBox, see the helpfile
MsgBox(64, "Title Goes Here", "You wrote: " & $Text) ; Make a MsgBox with the text you wrote into the InputBox
; For more information about the MsgBox, see the helpfile.
EndFunc ; Stop the last started function
Note: You have to press ESCAPE to exit the script, and INSERT to activate 'MyFunc'
:rolleyes:
AlmarM