Sign in to follow this  
Followers 0
toothyXdip

Help with hotkeys

7 posts in this topic

HEY!

i downloaded autoit and SciTE a little over 1 day ago and i want to make a small program with it. This program would have about 7 hotkeys and they would all do this:

1. (hotkey F5) function:

press "b" until F5 is pressed again

2. (hotkey F6) function:

press "z" untill F6 is pressed again

3. (hotkey F11) function:

this turns on the next two hotkeys (or makes them only press or send the key when it changes color

4. (hotkey F7) function:

hover mouse over a spot and and press F7 when that spot changes colors send or press "0" once (and you can stop/make it do this by pressing F11)

5. (hotkey F8) function:

hover mouse over a spot and when that spot changes colors press or send "9"

6. (hotkey F9) function:

to click/send the left mouse button very fast untill F9 is pressed again

7. (hotkey F10) function:

(in the program there is a input box that a user can put a number into) to only send the "Home" key when the number (in sec.) counts down to 0 (eg: the user puts 20 in the box it doesnt press the "Home" key untill it counts down to 0 in sec.)

in having trouble with the first hotkey and ive looked all through the help file if you could just give a code for your 1st, 4th, and 7th (just one would be fine but the other 2 would be alot of help) because im completly stumped

im still learning like i said i just downloaded a day ago

but if some1 could give me a good example of one two or all the hotkeys that would be awesome

by the way your program is awesome

THANKS!!! :whistle:

Isaac


---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

Share this post


Link to post
Share on other sites



Well, I will give an example of the first, to maybe give you an understanding, but without seeing an attempt from you on doing it yourself, I doubt seriously anyone is going to want to write your script itself for you.

Global $F5OnOff
HotKeySet('{F5}', '_SendB')

While 1
    Sleep(10000)
WEnd

Func _SendB()
    $F5OnOff = Not $F5OnOff
    While $F5OnOff
        Send('b')
        Sleep(10)
    WEnd
    Return ''
EndFunc
Keep in mind that SciTe uses F5 to run your script.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

i did try for a few hours but i i keep getting errors when i was doing everything write it said to do in the examples thanks for that scripted

could some1 give example of #3 cause i couldnt even get down 7 lines of script with that one :whistle:

well thanks again!


---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

Share this post


Link to post
Share on other sites

i did try for a few hours but i i keep getting errors when i was doing everything write it said to do in the examples thanks for that scripted

could some1 give example of #3 cause i couldnt even get down 7 lines of script with that one :whistle:

well thanks again!

You're missing the point... show your failed coding attempts... right now we just have your "word" you've made an honest effort, and to be honest, that doesn't mean much in cyberspace.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

o i already replaced my old scriped with yours but i did try im not some1 who just does something without trying but thanks you again for your script it helped alot i already have half the program. :whistle:


---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

Share this post


Link to post
Share on other sites

i have a little question... how can i use left mouse as the hotkeyset

$key = What
hotkeyset($key, _Func)

Func _Func()
msgbox(0,"tittle","message")

sorry to but in...

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Ehh...was gonna help ya...but I decided not to...lol

Edited by ssjfulkon198

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