Omegas Posted August 14, 2008 Share Posted August 14, 2008 Hi. I wanted to know if there was a way to make my script to write slower? I made a script that writes something first, but I need it a little slower. Link to comment Share on other sites More sharing options...
cppman Posted August 14, 2008 Share Posted August 14, 2008 (edited) Hi. I wanted to know if there was a way to make my script to write slower? I made a script that writes something first, but I need it a little slower.If you're using Send you can check out the Send* options (SendKeyDelay, SendKeyDownDelay), or you can just use Sleep(...). Opt("SendKeyDelay", 100) ;waits 100 ms after each keystroke. Edited August 14, 2008 by cppman Miva OS Project Link to comment Share on other sites More sharing options...
Omegas Posted August 14, 2008 Author Share Posted August 14, 2008 Thank you! I'm gonna try it. Link to comment Share on other sites More sharing options...
Omegas Posted August 14, 2008 Author Share Posted August 14, 2008 Another question... The Opt("SendKeyDelay", 100) ;waits 100 ms after each keystroke. where should I put it? Look: Opt("SendKeyDelay", 100) ;waits 100 ms after each keystroke. Send("Hello") When I use this, it should write: H Wait 100ms. e Wait 100ms. l wait 100ms. l wait 100ms. o Right? I don't know why but it is not working... I use autoit 3. Link to comment Share on other sites More sharing options...
JRowe Posted August 14, 2008 Share Posted August 14, 2008 Place it at the top of your script, right after any includes. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
system24 Posted August 15, 2008 Share Posted August 15, 2008 Try a larger value for SendKeyDelay. I think 100 ms is too fast. [center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center] Link to comment Share on other sites More sharing options...
herewasplato Posted August 15, 2008 Share Posted August 15, 2008 Try a larger value for SendKeyDelay. I think 100 ms is too fast.It seems painfully slow to me :-) AutoItSetOption("WinWaitDelay", 1) AutoItSetOption("WinTitleMatchMode", 2) Run("notepad") WinWait("Notepad") For $i = 10 To 100 Step 10 AutoItSetOption("SendKeyDelay", $i) WinActivate("Notepad") Send("I am typing here " & $i & "ms" & @CR) Next For $i = 200 To 400 Step 100 AutoItSetOption("SendKeyDelay", $i) WinActivate("Notepad") Send("I am typing here " & $i & "ms" & @CR) Next @Omegas, The AutoItSetOption or Opt functions do normally go near the top of your script unless you are doing something like I coded above. You mentioned that it was not working for you??? What operating system are you using? XP? Vista? Please copy/paste/post your exact code that "does not work" for you. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Omala Posted August 15, 2008 Share Posted August 15, 2008 (edited) It seems painfully slow to me :-) AutoItSetOption("WinWaitDelay", 1) AutoItSetOption("WinTitleMatchMode", 2) Run("notepad") WinWait("Notepad") For $i = 10 To 100 Step 10 AutoItSetOption("SendKeyDelay", $i) WinActivate("Notepad") Send("I am typing here " & $i & "ms" & @CR) Next For $i = 200 To 400 Step 100 AutoItSetOption("SendKeyDelay", $i) WinActivate("Notepad") Send("I am typing here " & $i & "ms" & @CR) Next @Omegas, The AutoItSetOption or Opt functions do normally go near the top of your script unless you are doing something like I coded above. You mentioned that it was not working for you??? What operating system are you using? XP? Vista? Please copy/paste/post your exact code that "does not work" for you.This is pretty sweet. How do I use this in reverse? For instance... I want to do a Send("{Down}"); command once then for it to get progressively faster. Furthermore, I'd like the command to have a delay before executing and a condition based on a key hit twice. http://www.autoitscript.com/forum/index.php?showtopic=78352 I'm the creator of the rm-1800 program. One major limitation you are probably going to find with my program is that each button press is simply calling autoit.exe with a parameter to load a different script depending on the button pressed. This means that each time a button is pressed, a brand new script will be loaded. In order to counter this, you'll need to have your scripts reading and writing data from a file if you want memory to be retained. This method would allow you to save a state and then increment to let it know how many times the button has been pressed.Would it be possible (may need to be answered by someone more proficient with autoit) to write a more complex script for the button pressed so that it's stored in memory for a given time? So, if I press one of the navigation keys, it puts sort of a wait here for 1 second to see if I make another command type thing? If this is possible, I'd say that creating some form of a script which would "hit the arrow key" for a certain number of times, if held hit's it for more times... Something like.. Press button Down is hit once>Script goes to memory but something is still keeping the script active then if the button is pressed and held starts running a further written script which would hit the down key for lets say 3 times for a period of 500 ms, then if that command (button is still being pressed) 6 times for 500 ms and so on. Edited August 15, 2008 by Omala Link to comment Share on other sites More sharing options...
herewasplato Posted August 15, 2008 Share Posted August 15, 2008 @Omala,See here: http://www.autoitscript.com/forum/index.ph...st&p=566146 [size="1"][font="Arial"].[u].[/u][/font][/size] 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