para Posted November 19, 2004 Share Posted November 19, 2004 I need a script written if any of you have the time. I need it to do the following... When I hit F1... It types (INSERT) Presses TAB It types (INSERT) Presses TAB Presses TAB It types (INSERT) Presses TAB It types (INSERT) Stops and prepares for the next time I press F1 In that order. I would greatly appriciate anyone who could help me with this, of course i will replace (INSERT) with my on text. Please do not confuse (INSERT) with the actual insert key, it is merely there for me to recognize were to type in my own text. Thank you very much to whom ever helps me with this! (delay of 1/2 second between each task) Thanks alot! Link to comment Share on other sites More sharing options...
Developers Jos Posted November 19, 2004 Developers Share Posted November 19, 2004 Thank you very much to whom ever helps me with this!(delay of 1/2 second between each task)Thanks alot!<{POST_SNAPBACK}>So what do you have done yourself already ??? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
para Posted November 19, 2004 Author Share Posted November 19, 2004 I looked at a template and got this... HotKeySet ( "{F1}", "Activate" ) While ( 1 ) WEnd Func Activate () Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{DOWN}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{DOWN}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Return EndFunc Works exactly how I wanted... is there anyway to make it so that the first command to send (INSERT) adds a number in numerical order? so lets say i make it (INSERT) = para for the first one can it make it so every time i press f1 after loading the script it adds a number? so that it will be para para1 para2 para3 para4 and so on... thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted November 19, 2004 Developers Share Posted November 19, 2004 (edited) just add a variable which you add 1 to everytime you press F1. Also add a sleep(10) in the While..Wend to avoid your cpu running at 100% expandcollapse popupHotKeySet("{F1}", "Activate") Dim $Count = 0 While (1) Sleep(10) Wend Func Activate() $count = $count + 1 Send("(INSERT)" & $count) Sleep(350) Send("{TAB}") Sleep(350) Send("(INSERT)") Sleep(350) Send("{TAB}") Sleep(350) Send("{TAB}") Sleep(350) Send("(INSERT)") Sleep(350) Send("{TAB}") Sleep(350) Send("(INSERT)") Sleep(350) Send("{TAB}") Sleep(350) Send("{TAB}") Sleep(350) Send("{DOWN}") Sleep(350) Send("{TAB}") Sleep(350) Send("{DOWN}") Sleep(350) Send("{TAB}") Sleep(350) Send("(INSERT)") Sleep(350) Send("{TAB}") Sleep(350) Return EndFunc ;==>Activate Edited November 19, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ioliver Posted November 19, 2004 Share Posted November 19, 2004 I looked at a template and got this...HotKeySet ( "{F1}", "Activate" )While ( 1 )WEndFunc Activate () Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{DOWN}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{DOWN}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) ReturnEndFunc Works exactly how I wanted... is there anyway to make it so that the first command to send (INSERT) adds a number in numerical order? so lets say i make it (INSERT) = parafor the first onecan it make it so every time i press f1 after loading the script it adds a number? so that it will beparapara1para2para3para4 and so on...thanks<{POST_SNAPBACK}>Try...HotKeySet ( "{F1}", "Activate" )While ( 1 )WEndFunc Activate ()$x = 1 Send ( "(INSERT)" & $x ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 )$x = $x + 1 Send ( "(INSERT)" & $x) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{DOWN}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "{DOWN}" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) Send ( "(INSERT)" ) Sleep ( 350 ) Send ( "{TAB}" ) Sleep ( 350 ) ReturnEndFuncAnd so on...Ian "Blessed be the name of the Lord" - Job 1:21Check out Search IMF Link to comment Share on other sites More sharing options...
scriptkitty Posted November 19, 2004 Share Posted November 19, 2004 (edited) Maybe something like this. expandcollapse popupHotKeySet("{F1}", "Activate") Dim $Count = 0 $insert="Para" While (1) Sleep(10) Wend Func Activate() $count = $count + 1 Send($insert & $count) Sleep(350) Send("{TAB}") Sleep(350) $count = $count + 1 Send($insert & $count) Sleep(350) Send("{TAB}") Sleep(350) Send("{TAB}") Sleep(350) $count = $count + 1 Send($insert & $count) Sleep(350) Send("{TAB}") Sleep(350) $count = $count + 1 Send($insert & $count) Sleep(350) Send("{TAB}") Sleep(350) Send("{TAB}") Sleep(350) Send("{DOWN}") Sleep(350) Send("{TAB}") Sleep(350) Send("{DOWN}") Sleep(350) Send("{TAB}") Sleep(350) $count = $count + 1 Send($insert & $count) Sleep(350) Send("{TAB}") Sleep(350) Return EndFunc;==>Activate somehow I think you meant this though: HotKeySet("{F1}", "Activate") Dim $Count = 0 $insert="Para" While (1) Sleep(10) Wend Func Activate() $count = $count + 1 Send($insert & $count) Sleep(350) Send("{TAB}") Sleep(350) Send("{TAB}") Sleep(350) Return EndFunc;==>Activate Edited November 19, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
para Posted November 19, 2004 Author Share Posted November 19, 2004 jde thanks alot just what i needed Link to comment Share on other sites More sharing options...
CyberSlug Posted November 20, 2004 Share Posted November 20, 2004 One way to shorten your code: Opt("SendKeyDelay", 350);milliseconds HotKeySet("{F1}","Activate") While 1 sleep(10);pause prevents maxing out the CPU WEnd Func Activate () _FastSend("(INSERT)") Send("{TAB}") _FastSend("(INSERT)") Send("{TAB 2}") _FastSend("(INSERT)") Send("{TAB}") _FastSend("(INSERT)") Send("{TAB 2}{DOWN}{TAB}{DOWN}{TAB}") _FastSend("(INSERT)") Send("{TAB}") EndFunc Func _FastSend($text) Opt("SendKeyDelay", 1);one millisec Send($text) Opt("SendKeyDelay", 350) EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! 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