Lemonadez Posted June 23, 2005 Share Posted June 23, 2005 (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 June 23, 2005 by Lemonadez Link to comment Share on other sites More sharing options...
FuryCell Posted June 23, 2005 Share Posted June 23, 2005 (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") EndFuncP.S. Welcome to the forums. Edit:Sorry. :"> didn't see the second part of you post. added the right mouse down feature. Edited June 23, 2005 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 More sharing options...
Lemonadez Posted June 23, 2005 Author Share Posted June 23, 2005 (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 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 June 23, 2005 by Lemonadez Link to comment Share on other sites More sharing options...
Lemonadez Posted June 25, 2005 Author Share Posted June 25, 2005 how do we make it faster pressing f9? continously....i press home it doesnt stop also ty Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted June 25, 2005 Share Posted June 25, 2005 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()) Link to comment Share on other sites More sharing options...
therks Posted June 25, 2005 Share Posted June 25, 2005 (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 June 25, 2005 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
ezzetabi Posted June 25, 2005 Share Posted June 25, 2005 Saunders your custom title is excellent... Does I means 'Swim to france, ugly noob. Read the fine manual!'? Link to comment Share on other sites More sharing options...
therks Posted June 25, 2005 Share Posted June 25, 2005 Hahahha. Sure! That's an excellent translation! My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now