Sign in to follow this  
Followers 0
Sobiech

Problem with hotkey

4 posts in this topic

Hi all :D

just look and say why SpinStop doesnt work when i push "end"? other hotkeys are working very good :D

;----------------------------------------VARS START----------------------------
   ;Hotkeys
   hotkeyset("{insert}", "buff")
   hotkeyset("{Home}", "SpinStart")
   hotkeyset("{End}", "SpinStop")
;----------------------------------------VARS END------------------------------

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

EndSwitch
WEnd

func spinstart()
   Send("{ENTER}" & "AutoSpin v0.1" & "{ENTER}")
   Send(GUICtrlRead($input1))
   Send("{NUMLOCK ON}")
   Send("{LSHIFT DOWN}")
   MouseDown("left")
   Send("{NUMLOCK OFF}")
   Send("{alt up}")
endfunc

func spinstop()
   Send("{ENTER}" & "SpinStop v0.1" & "{ENTER}")
   Send("{NUMLOCK OFF}")
   MouseUp("left")
   Send("{LSHIFT Up}")
   Send("{NUMLOCK OFF}")
   Send("{alt up}")
endfunc

func buff()
   Send("{ENTER}" & "Buffing" & "{ENTER}")
   Send(GUICtrlRead($Input2))
   MouseClick("right")
   Sleep(750)
   Send(GUICtrlRead($Input5))
   Sleep(500)
   Send(GUICtrlRead($Input3))
   MouseClick("right")
   Sleep(500)
   Send(GUICtrlRead($Input4))
   MouseClick("right")
   Sleep(750)
   Send(GUICtrlRead($Input5))
   Sleep(750)
   Send(GUICtrlRead($input1))
endfunc

This world is crazy

Share this post


Link to post
Share on other sites



Instrument your functions something like this to see if it calls and exits the functions normally:

HotKeySet("{insert}", "buff")
HotKeySet("{Home}", "SpinStart")
HotKeySet("{End}", "SpinStop")
HotKeySet("{ESC}", "_Quit")

While 1
    Sleep(10)
WEnd

Func spinstart()
    ConsoleWrite("Debug: Enter spinstart()" & @LF)

    ; ...the rest of your function

    ConsoleWrite("Debug: Exit spinstart()" & @LF)
EndFunc   ;==>spinstart

Func spinstop()
    ConsoleWrite("Debug: Enter spinstop()" & @LF)

    ; ...the rest of your function

    ConsoleWrite("Debug: Exit spinstop()" & @LF)
EndFunc   ;==>spinstop

Func buff()
    ConsoleWrite("Debug: Enter buff()" & @LF)

    ; ...the rest of your function

    ConsoleWrite("Debug: Exit buff()" & @LF)
EndFunc   ;==>buff

Func _Quit()
    Exit
EndFunc

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

HotKeySet("{insert}", "buff")
HotKeySet("{Home}", "SpinStart")
HotKeySet("{End}", "SpinStop")
HotKeySet("{ESC}", "_Quit")


While 1
    Sleep(10)
WEnd

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

EndSwitch
WEnd


Func spinstart()
    ConsoleWrite("Debug: Enter spinstart()" & @LF)

   Send("{ENTER}" & "AutoSpin v0.1" & "{ENTER}")
   Send(GUICtrlRead($input1))
   Send("{NUMLOCK ON}")
   Send("{LSHIFT DOWN}")
   MouseDown("left")
   Send("{NUMLOCK OFF}")
   Send("{alt up}")

    ConsoleWrite("Debug: Exit spinstart()" & @LF)
EndFunc   ;==>spinstart

Func spinstop()
    ConsoleWrite("Debug: Enter spinstop()" & @LF)

   Send("{ENTER}" & "SpinStop v0.1" & "{ENTER}")
   Send("{NUMLOCK OFF}")
   MouseUp("left")
   Send("{LSHIFT Up}")
   Send("{NUMLOCK OFF}")
   Send("{alt up}")

    ConsoleWrite("Debug: Exit spinstop()" & @LF)
EndFunc   ;==>spinstop

Func buff()
    ConsoleWrite("Debug: Enter buff()" & @LF)

   Send("{ENTER}" & "Buffing" & "{ENTER}")
   Send(GUICtrlRead($Input2))
   MouseClick("right")
   Sleep(750)
   Send(GUICtrlRead($Input5))
   Sleep(500)
   Send(GUICtrlRead($Input3))
   MouseClick("right")
   Sleep(500)
   Send(GUICtrlRead($Input4))
   MouseClick("right")
   Sleep(750)
   Send(GUICtrlRead($Input5))
   Sleep(750)
   Send(GUICtrlRead($input1))

    ConsoleWrite("Debug: Exit buff()" & @LF)
EndFunc   ;==>buff

Func _Quit()
    Exit
EndFunc

K but "spinstart" doesnt work :D

Hmm maybe because "spinstop" hold shift and "End" key doesnt work (shift+end)

Ah and small question :D

How to set hotkey for example "Shift + End" ?

Edit: :D if i dont run "spinstart" the "spinstop" doesnt work too


This world is crazy

Share this post


Link to post
Share on other sites

Always look in the helpfile before posting.

HotKeySet("+{end}", "SpinStop")

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

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  
Followers 0