bobby177 Posted June 10, 2006 Author Share Posted June 10, 2006 Is this the affect your looking for?_MySend('a', 2000, 0) Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5) $OptSKD = Opt('SendKeyDelay', $iSendDelay) Local $iSendTimer = TimerInit() While TimerDiff($iSendTimer) <= $iRepeatTime Send($sCharacters) Sleep(10) WEnd Opt('SendKeyDelay', $OptSKD) EndFunc Exactly!! Now is there a way to make it run everytime i push a certain key? (F1) Link to comment Share on other sites More sharing options...
i542 Posted June 10, 2006 Share Posted June 10, 2006 Maybe you can use this: HotKeySet ("{F1}","_MySend") While 1 sleep (10) Wend ;here you can add SmOke_N's code Or you can use ini file to choose your key. I'm again not understand you.... I can do signature me. Link to comment Share on other sites More sharing options...
bobby177 Posted June 10, 2006 Author Share Posted June 10, 2006 Maybe you can use this: HotKeySet ("{F1}","_MySend") While 1 sleep (10) Wend ;here you can add SmOke_N's code Or you can use ini file to choose your key. I'm again not understand you.... I want to run this _MySend('a', 2000, 0) Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5) $OptSKD = Opt('SendKeyDelay', $iSendDelay) Local $iSendTimer = TimerInit() While TimerDiff($iSendTimer) <= $iRepeatTime Send($sCharacters) Sleep(10) WEnd Opt('SendKeyDelay', $OptSKD) EndFunc Every time i push F1 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 10, 2006 Moderators Share Posted June 10, 2006 I want to run this _MySend('a', 2000, 0) Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5) $OptSKD = Opt('SendKeyDelay', $iSendDelay) Local $iSendTimer = TimerInit() While TimerDiff($iSendTimer) <= $iRepeatTime Send($sCharacters) Sleep(10) WEnd Opt('SendKeyDelay', $OptSKD) EndFunc Every time i push F1That function has parameters so you can't just use HotKeySet() on it directlyHotKeySet ("{F1}","_HotSend") While 1 Sleep(1000) WEnd Func _HotSend() _MySend('q', 2000, 0) EndFunc Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5) $OptSKD = Opt('SendKeyDelay', $iSendDelay) Local $iSendTimer = TimerInit() While TimerDiff($iSendTimer) <= $iRepeatTime Send($sCharacters) Sleep(10) WEnd Opt('SendKeyDelay', $OptSKD) EndFunc 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. Link to comment Share on other sites More sharing options...
bobby177 Posted June 10, 2006 Author Share Posted June 10, 2006 (edited) Thank you VERY VERY much, exactly what i was looking for EDIT - how would i change it to send the numpad enter instead of Q? I tried {NUMPADENTER} and NUMPADENTER but it says some kind of error Edited June 10, 2006 by bobby177 Link to comment Share on other sites More sharing options...
bobby177 Posted June 10, 2006 Author Share Posted June 10, 2006 If its too much work then just dont do it, i can find a way to make this one work Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 10, 2006 Moderators Share Posted June 10, 2006 Thank you VERY VERY much, exactly what i was looking for EDIT - how would i change it to send the numpad enter instead of Q? I tried {NUMPADENTER} and NUMPADENTER but it says some kind of errorWell how would you do it for Send()? Send('{NUMPADENTER}')? So... HotKeySet ("{F1}","_HotSend") While 1 Sleep(1000) WEnd Func _HotSend() _MySend('{NUMPADENTER}', 2000, 0) EndFunc Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5) $OptSKD = Opt('SendKeyDelay', $iSendDelay) Local $iSendTimer = TimerInit() While TimerDiff($iSendTimer) <= $iRepeatTime Send($sCharacters) Sleep(10) WEnd Opt('SendKeyDelay', $OptSKD) EndFunc Global $StaySearchingMakes sense? 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. Link to comment Share on other sites More sharing options...
bobby177 Posted June 10, 2006 Author Share Posted June 10, 2006 Well how would you do it for Send()? Send('{NUMPADENTER}')? So... HotKeySet ("{F1}","_HotSend") While 1 Sleep(1000) WEnd Func _HotSend() _MySend('{NUMPADENTER}', 2000, 0) EndFunc Func _MySend($sCharacters, $iRepeatTime, $iSendDelay = 5) $OptSKD = Opt('SendKeyDelay', $iSendDelay) Local $iSendTimer = TimerInit() While TimerDiff($iSendTimer) <= $iRepeatTime Send($sCharacters) Sleep(10) WEnd Opt('SendKeyDelay', $OptSKD) EndFunc Global $StaySearchingMakes sense? Oh now I see how to do it, Thanks a bunch 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