Sign in to follow this  
Followers 0
jessem

Hotkey Variables ?

5 posts in this topic

I'm trying to create a hotkey that when pushed it will Call Function1, when the same button is pushed again, it will then call Function2.

I've tried (rough example)

$i = 1 to 2

Hotkey ("c","Function"&$i")

Func Function$i()

Also many variations of this. Any assistance would be helpfull or maybe I'm looking at this from a wrong angle.

Thanks folks !

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

HotKeySet("c", "function1")

While 1
    Sleep(100)
   ;main script
WEnd

Func function1()
    MsgBox(0, "", "function1")
    HotKeySet("c", "function2")
EndFunc

Func function2()
    MsgBox(0, "", "function2")
    HotKeySet("c", "function3")
EndFunc

Func function3()
    MsgBox(0, "", "function3")
EndFunc
Edit: ...or did I not understand your request...

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

HotKeySet("c", "function1")

While 1
    Sleep(100)
  ;main script
WEnd

Func function1()
    MsgBox(0, "", "function1")
    HotKeySet("c", "function2")
EndFunc

Func function2()
    MsgBox(0, "", "function2")
    HotKeySet("c", "function3")
EndFunc

Func function3()
    MsgBox(0, "", "function3")
EndFunc
Edit: ...or did I not understand your request...

Perfect .. Looks like I was trying to do it the hard way, this was is much more clear. ... THANK YOU !

Share this post


Link to post
Share on other sites

...THANK YOU !

You are welcome... and welcome to the forums.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Perfect .. Looks like I was trying to do it the hard way, this was is much more clear. ... THANK YOU !

another way to skin the cat....

$ack = 1
HotKeySet("c","test")
while 1
    Sleep(10)
WEnd
Func test()
    Call("myfunc" & $ack)
    $ack = $ack + 1
EndFunc
Func myfunc1()
    MsgBox(0,"Function 1","first")
EndFunc
Func myfunc2()
    MsgBox(0,"Function 2","second")
EndFunc
Func myfunc3()
    MsgBox(0,"Function 3","third")
EndFunc

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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