Jump to content

nooby help


 Share

Recommended Posts

okay im trying to make an autoit script to bind 2 keys to one button. For example i would like to set F1 and F2 to be sent when i press Q. what would be the script needed to do this? thanks for help in advance

Link to comment
Share on other sites

Well it looks like what you have will basically work. You'll need a while loop too:

;Hotkeys

HotkeySet("{HOME}","_end")
HotKeySet("Q", "SkillOne")

While 1
    Sleep (100)
WEnd

Func _end()
    Exit
EndFunc

Func SkillOne()
    Send("{f1}")
    Send("{f2}")
EndFunc

EDIT: Awww! herewasplato! You beat me :shocked:

Edited by Bert
Link to comment
Share on other sites

EDIT: Awww! herewasplato! You beat me :shocked:

...but you gave the OP what was asked for - I took the liberty of using a lowercase "q".

Actually, the code that the OP posted works fine without a loop if you move the long sleep to the end and remove the brackets from the "Q" in the HotKetSet line.

HotKeySet("{HOME}", "_end")
Func _end()
    Exit 0
EndFunc   ;==>_end

HotKeySet("Q", "SkillOne")
Func SkillOne()
    Send("{f1}")
    Send("{f2}")
EndFunc   ;==>SkillOne

Sleep(2147483647)
Edit: A loop is probably better - I was just pointing out how close the OP was.

BTW, if you turn Sleep(2147483647) into a US telephone number, you get some guy in Dallas, Texas - according to http://www.anywho.com/qry/wp_rl

Edited by herewasplato

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...