+ Reply to Thread
Results 1 to 3 of 3

Thread: [Release] HotKeySet example

  1. #1
    Join Date
    May 2009
    Posts
    32
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Rep Power
    4

    Default [Release] HotKeySet example

    I will be the first one to create a topic, and I made a HotKeySet example.

    Code:
    ; 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'



    AlmarM
    Last edited by AlmarM; 01-12-2009 at 19:05.

  2. #2
    Join Date
    May 2009
    Location
    Denmark
    Age
    17
    Posts
    689
    Thanks
    42
    Thanked 3 Times in 3 Posts
    Rep Power
    5

    Default

    This is really easy to understand, and I think it will help a lot of new users to AutoIt.

    Thanks! +rep

  3. #3
    Kaskame Guest

    Default

    I got it!
    xD

    Was getting hard to me to understand it but I got it already

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Replies: 2
    Last Post: 23-07-2011, 21:27
  2. [Release] Get Mouse Information
    By AlmarM in forum Release
    Replies: 1
    Last Post: 04-12-2009, 14:49
  3. [Release] Desktop Tool
    By AlmarM in forum Release
    Replies: 2
    Last Post: 01-12-2009, 20:25

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts