Jump to content
Sign in to follow this  
Drew

HotKey Support

Recommended Posts

Drew

Alright So I'm looking through the Help file, Hotkeys, but it doesn't tell you the func to START the script. like for say i want:

HotKeySet( "{Home}", "START")

HotKeySet( "{Pause}", "Pause")

blah blah blah

Being as how I've tried, start doesn't work. What does lol. I swear I've looked everywhere.

( Btw , help on the Ending for the Hotkeys would be helpful, as I haven't mastered that just yet. But i need help on the first part primarily. Thanks )

Edited by Drew

Share this post


Link to post
Share on other sites
DjDeep00

@Drew...I took this straight from the help file and it worked from me...

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{HOME}", "Start") ;Home Key

;;;; Body of program would go here;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func Start()
    MsgBox(4096,"","This is a message.")
EndFunc

Share this post


Link to post
Share on other sites
Drew

Its not working for me. It did one time, and than notta. Heres my code:

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{HOME}", "Start");Home Key

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("GgAcE's Skill Pumper", 395, 201, 306, 113)
GUISetBkColor(0x000000)
$Label1 = GUICtrlCreateLabel("  GgAcE Skill Pumper  ", 8, 16, 366, 41, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 24, 400, 2, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetCursor (-1, 3)
$Button1 = GUICtrlCreateButton("Run Pumper", 8, 72, 129, 33, BitOR($BS_PUSHBOX,$BS_CENTER,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFF0000)
$Button2 = GUICtrlCreateButton("Contacting Dreu", 8, 120, 129, 33, BitOR($BS_PUSHBOX,$BS_CENTER,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFF0000)
$Button3 = GUICtrlCreateButton("Credits", 256, 72, 129, 33, BitOR($BS_PUSHBOX,$BS_CENTER,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFF0000)
$Button4 = GUICtrlCreateButton("Made For GgAcE", 256, 112, 129, 33, BitOR($BS_PUSHBOX,$BS_CENTER,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFF0000)
$Button5 = GUICtrlCreateButton("Want your own personal Skill Pumper?", 24, 160, 345, 25, BitOR($BS_PUSHBOX,$BS_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFF0000)
$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Dan & Wendy\Desktop\Dreus_program\GgAcE.icon.bmp", 144, 64, 105, 92, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

;~ EndSwitch
;~ WEnd
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $Button1
             WinActive( "Diablo II" )
             Opt("WinWaitDelay", 3000)
             MouseWheel( "Up", 15000)
        Case $msg = $Button2
            MsgBox( 0, "Contacting Dreu.", "Email: *editted* , Other: Www.RelivedGaming.Com")
        Case $msg = $Button3
            MsgBox( 0, "Credits", "This program was made for GgAcE and whomever he chooses to distribute to, by Dreu.")
        Case $msg = $Button4
            MsgBox( 0, "To GgAcE", "Made specially for you man. Hope you enjoy!")
        Case $msg = $Button5
            MsgBox( 0, "So you want your own personal Skill Pumper too?", "Contact Dreu!! If I like you, I made take the time to do so.")
    EndSelect
WEnd

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func Start()
    MsgBox(4096,"","This is a message.")
EndFunc

Always tells me the programs not responding ( after trying & failing at using the hotkeys ) forcing me to close it via Ctrl+alt+del , or just End Task now w/e.

Edited by Drew

Share this post


Link to post
Share on other sites
Drew

Noone Knows? =(

This is all I need and my programs finished.

Share this post


Link to post
Share on other sites
Drew

I hate to keep bumping this, but I still badly need help on it.

Share this post


Link to post
Share on other sites
DjDeep00

@Drew...Dont really understand whats not working for you...Do you get any errors? I just ran your script and after pressing the "HOME" key it displays the message "This is a message". It shouldnt matter but which autoit version are u using...I am running on 3.2.4.9. Let me know.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×