Jump to content

F9 Hotkey


Recommended Posts

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

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.
Link to comment
Share on other sites

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

*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
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...