Jump to content



Photo

send "wait"?


  • Please log in to reply
5 replies to this topic

#1 MariusN

MariusN

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 283 posts

Posted 13 March 2012 - 11:48 AM

Is there a command that a person can use to let the macro called ---> "send", wait a while, instead of adding a "sleep"-command? Reason for asking is, some PC's are slower than others to respond...I need to apply a couple of "send's" ( macro's ) in my program BUT....the next "send" command must first wait for the previuos "send"-command to finish...





#2 rcmaehl

rcmaehl

    No where near a noob nor a pro coder.

  • Active Members
  • PipPipPipPipPipPip
  • 642 posts

Posted 13 March 2012 - 12:00 PM

This page should help. More specifically look at the SendKeyDelay part.
  • MariusN likes this
Making dumb decisions and posting without thinking since August 7, 2011.Jury-rigging AutoIt to work how I want successfully since a while.Reading the manual since no one else seems to.My Github: https://github.com/rcmaehl/FCoFix-SoftwareWarning!: I'm a compulsive poster. When I post something in chat, ignore it unless it's a huge wall of text, because it's probably a compulsive post.

#3 MariusN

MariusN

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 283 posts

Posted 13 March 2012 - 12:07 PM

...doubt if this will help, as you still have to enter a specific time for delay...Thing is, on slow computers i wont have a clue how long the delay might vary :oops:

#4 Kjodiz

Kjodiz

    Wayfarer

  • Active Members
  • Pip
  • 53 posts

Posted 13 March 2012 - 01:40 PM

What are you intending to do with this script?

And just to be safe, you can use Sleep ( 5000 )

#5 BrewManNH

BrewManNH

    באָבקעס מיט קודוצ׳ה

  • MVPs
  • 6,852 posts

Posted 13 March 2012 - 01:44 PM

Does the window text or title change when you send one Send(), and before you need to send the next? If so you could use WinWait with the new title or text and the script will pause until that window exists, or the command times out if you use that parameter.

How to ask questions the smart way!

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.

Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.

_FileGetProperty - Retrieve the properties of a file SciTE Toolbar - A toolbar demo for use with the SciTE editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.

GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.

Posted Image


#6 JohnOne

JohnOne

    John

  • Active Members
  • PipPipPipPipPipPip
  • 8,857 posts

Posted 13 March 2012 - 02:07 PM

The Send() function does not return until it is complete, same as most functions.
AutoIt Absolute Beginners Require a serial
Run('hh mk:@MSITStore:'&StringReplace(@AutoItExe,'.exe','.chm')&'::/html/tutorials/helloworld/helloworld.htm','',@SW_MAXIMIZE)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users