Sign in to follow this  
Followers 0
Lemonadez

F9 Hotkey

8 posts in this topic

#1 ·  Posted (edited)

Hi,

I dont know how to make a script. Can i ask someone to help me out? My thing is I want a Continous Pressing F9 hotkey... Example I press End Key to activate It will start pressing F9 continously (non stop) then If I press Home Key it will deactivate...

Another one..also if i press PgUp I want it to hold right mouse button...and if i want to deactivate it i just press PgDn

I think im asking for a hard script :)

Thanks a lot

Edit: Im using Autoit v3.1.1

Edited by Lemonadez

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Very easy actually.

HotKeySet("{End}", "SendF9")
HotKeySet("{PGUP}", "RightDown")
HotKeySet("{PGDN}", "RightUp")
Global $Send = 1
While 1
    Sleep(100)
WEnd

Func SendF9()
    $Send = 1
    HotKeySet("{End}")
    HotKeySet("{Home}", "Stop")
    While 1
        Sleep(50)
        Send("{F9}")
        If $Send = 0 Then
            HotKeySet("{Home}", "SendF9")
            HotKeySet("{Home}")
            Return
        EndIf
    WEnd
EndFunc  ;==>SendF9

Func Stop()
    $Send = 0
EndFunc  ;==>Stop

Func RightDown()
    MouseDown("Right")
EndFunc

Func RightUp()
    MouseUp("Right")
EndFunc

P.S. Welcome to the forums. :)

Edit:Sorry. :"> didn't see the second part of you post. added the right mouse down feature.

Edited by SolidSnake

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks,

But it doesnt work i press End it doesnt keep pressing f9 hotkey..

Thanks i got it working...i just edit something the 100 and 50 to 0 :evil:

EDIT: Thanks a lot :)...but i have a slight problem...When i press End Key once..it activate then when i press Home it Deactivate...Then if i want to activate it again, It doesnt work anymore..I have to exit again and launch it again in order to get the f9 working again.

T.Y

Edited by Lemonadez

Share this post


Link to post
Share on other sites

how do we make it faster pressing f9? continously....i press home it doesnt stop also :)

ty

Share this post


Link to post
Share on other sites

It may not be much faster, however

AutoItSetOption("SendKeyDelay", 1)

The default is 5. You can try 0, however it may not work, if that happens, go back to 1


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

*Sigh* We need a whole other forum for script requests.

Try this (modified SolidSnake's code):

Dim $iSendF9
HotKeySet("{End}", "StartF9")
HotKeySet("{Home}", "StopF9")
HotKeySet("{PGUP}", "RightDown")
HotKeySet("{PGDN}", "RightUp")

While 1
    If $iSendF9 Then
        Send("{F9}")
    Else
        Sleep(10)
    EndIf
WEnd

Func StartF9()
    $iSendF9 = 1
EndFunc

Func StopF9()
    $iSendF9 = 0
EndFunc

Func RightDown()
    MouseDown("Right")
EndFunc

Func RightUp()
    MouseUp("Right")
EndFunc

How fast do you need it? I'm getting about 60 keypresses per second.

Edited by Saunders

Share this post


Link to post
Share on other sites

Saunders your custom title is excellent...

Does I means 'Swim to france, ugly noob. Read the fine manual!'?

Share this post


Link to post
Share on other sites

Hahahha. Sure! That's an excellent translation!

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