Nareshm

Change both sleep time at once

20 posts in this topic

#1 ·  Posted

I have script Like This :

Opt("TrayAutoPause",0)
$var = Ping("www.google.com")

If not @error Then
WinActivate ( "testapp")
ControlClick ( "testapp", "", "[Savetest]")
ControlSend ( " :: Gujarat TPDS  - eFPS :: Version - 2.2.0.0  - [eFPS Bill]", "", "[NAME:btnSavebyFP]", "{enter}")
WinWait(":: Aadhar/EID/Verification Number Entry ::")
ControlClick(":: Aadhar/EID/Verification Number Entry ::", "", "[NAME:btnNext]")
If WinExists ("Aadhar : Length Check") Then
   ControlClick("Aadhar : Length Check", "", "[CLASS:Button; INSTANCE:1]")
   ControlSend(":: Aadhar/EID/Verification Number Entry ::", "", "[NAME:txtAadharNumber]", "{backspace}")
   ControlSend(":: Aadhar/EID/Verification Number Entry ::", "", "[NAME:txtAadharNumber]", "^v")
   ControlClick(":: Aadhar/EID/Verification Number Entry ::", "", "[NAME:btnNext]")
   WinWait(" :: Barcoded Ration Card Members - Biometric Verification/Check Utility ::")
   ControlSend("[Class:WindowsForms10.Window.8.app.0.378734a]", "", "[NAME:PictureBox2]", "{tab} {enter}")
   Sleep(5600)
   RunWait("rasdial /disconnect", "", @SW_HIDE) ; Stop connect from start
   RunWait("rasdial Internet", "", @SW_HIDE) ; Connect again
   Exit
EndIf
WinWait(" :: Barcoded Ration Card Members - Biometric Verification/Check Utility ::", "", 1)
ControlSend("[Class:WindowsForms10.Window.8.app.0.378734a]", "", "[NAME:PictureBox2]", "{tab} {enter}")
Sleep(5600)
RunWait("rasdial /disconnect", "", @SW_HIDE) ; Stop connect from start
RunWait("rasdial Internet", "", @SW_HIDE) ; Connect again
Exit
Else
   #include <MsgBoxConstants.au3>
   MsgBox($MB_TOPMOST, "Connection Status", "Internet is not Connected")
Exit
Endif

Share this post


Link to post
Share on other sites



#2 ·  Posted

I have script Like This :

Opt("TrayAutoPause",0)
$var = Ping("www.google.com")

If not @error Then
WinActivate ( "testapp")
ControlClick ( "testapp", "", "[Savetest]")

Sleep(3000)

ControlSend ( "testapp", "", "[SaveFP]", "{enter}")
WinWait("Verification Entry")
ControlClick("Verification Entry", "", "[Next]")
If WinExists ("Check") Then
   ControlClick("Check", "", "[CLASS:B; INSTANCE:1]")
   ControlSend("Verification Number Entry ", "", "[NAME:txtNumber]", "{backspace}")
 
   Sleep(3000)

   RunWait("rasdial Internet", "", @SW_HIDE)
   Exit
EndIf
WinWait("Verification/Check Utility ", "", 1)
ControlSend("[Class:Win.Window.84a]", "", "[PictureBox55]", "{tab}")
RunWait("rasdial Internet", "", @SW_HIDE)
Exit
Else
   #include <MsgBoxConstants.au3>
   MsgBox($MB_TOPMOST, "Connection Status", "Internet is not Connected")
Exit
Endif

Can i Change both Sleep(time) at once ?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Store your sleep time in a variable

Opt("TrayAutoPause", 0)

Global $iSleepTime = 3000

$var = Ping("www.google.com")

If Not @error Then
    WinActivate("testapp")
    ControlClick("testapp", "", "[Savetest]")
    $sSleepTime = 1000

    Sleep($sSleepTime)

    ControlSend("testapp", "", "[SaveFP]", "{enter}")
    WinWait("Verification Entry")
    ControlClick("Verification Entry", "", "[Next]")
    If WinExists("Check") Then
        ControlClick("Check", "", "[CLASS:B; INSTANCE:1]")
        ControlSend("Verification Number Entry ", "", "[NAME:txtNumber]", "{backspace}")

        Sleep($sSleepTime)

        RunWait("rasdial Internet", "", @SW_HIDE)
        Exit
    EndIf
    WinWait("Verification/Check Utility ", "", 1)
    ControlSend("[Class:Win.Window.84a]", "", "[PictureBox55]", "{tab}")
    RunWait("rasdial Internet", "", @SW_HIDE)
    Exit
Else
    #include <MsgBoxConstants.au3>
    MsgBox($MB_TOPMOST, "Connection Status", "Internet is not Connected")
    Exit
EndIf

Edit: My bad, I put $sSleepTime instead of $iSleepTime (it's late, forgive me :()

Edited by InunoTaishou

Share this post


Link to post
Share on other sites

#4 ·  Posted

@InunoTaishou
different beetwin

$sSleepTime = 1000
Global $sSleepTime = 3000

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

WIthout using Global you are not explicitly declaring your variable (and initializing in this case, since we give it a value). AutoIt is a very forgiving langauge and this is okay, but it's good practice to declare your variables using Global and Local

Also, use the proper prefix for the variables

$sSleepTime

Would be used for strings (since it starts with $s)

$iSleepTime

Would be used for numbers, since it starts with $i (integer)

Edit: Realized I'm the one who put $sSleepTime instead of $iSleepTime

Edited by InunoTaishou

Share this post


Link to post
Share on other sites

#6 ·  Posted

I have script Like This :

Opt("TrayAutoPause",0)
$var = Ping("www.google.com")

If not @error Then
WinActivate ( "testapp")
ControlClick ( "testapp", "", "[Savetest]")

Sleep(3000)

ControlSend ( "testapp", "", "[SaveFP]", "{enter}")
WinWait("Verification Entry")
ControlClick("Verification Entry", "", "[Next]")
If WinExists ("Check") Then
   ControlClick("Check", "", "[CLASS:B; INSTANCE:1]")
   ControlSend("Verification Number Entry ", "", "[NAME:txtNumber]", "{backspace}")
 
   Sleep(3000)

   RunWait("rasdial Internet", "", @SW_HIDE)
   Exit
EndIf
WinWait("Verification/Check Utility ", "", 1)
ControlSend("[Class:Win.Window.84a]", "", "[PictureBox55]", "{tab}")
RunWait("rasdial Internet", "", @SW_HIDE)
Exit
Else
   #include <MsgBoxConstants.au3>
   MsgBox($MB_TOPMOST, "Connection Status", "Internet is not Connected")
Exit
Endif

Can i Change both Sleep(time) at once ?

Share this post


Link to post
Share on other sites

#7 ·  Posted

@InunoTaishou
I can't Understand, Please expalin me again i want to change

; My Script Here
Sleep (3000) - 1
;My script here
Sleep (3000) - 2

I want to change sleep time 1 and 2 at once

Share this post


Link to post
Share on other sites

#8 ·  Posted

And If you store the sleep time in a variable then it will change the sleep time for both of them. Exactly how I did it in the example I posted.

Share this post


Link to post
Share on other sites

#9 ·  Posted

Yes you can. Use a variable for the slep time and assign a new valie when needed.

BTW: Please use Code Tags when posting code (the "<>" button in the editor). Makes your code easier to read.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#10 ·  Posted

BTW:
The conditional include of th MsgBoxConstants doesn#t work this way.
In a preprocessing step all #include statements are resolved and replaced by the specified file.
Good practice is to move all #include statements to the top of your script.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#11 ·  Posted

30 minutes ago, Nareshm said:

Can i Change both Sleep(time) at once ?

Assign sleep time to a variable!

#include <MsgBoxConstants.au3>

Opt("TrayAutoPause", 0)

Global $iSleep = 3000

TrayTip("Internet", "Working....", 5)
Global $var = Ping("www.google.com", 2000)
If Not @error Then
    WinActivate("testapp")
    ControlClick("testapp", "", "[Savetest]")
    Sleep($iSleep)
    ControlSend("testapp", "", "[SaveFP]", "{enter}")
    WinWait("Verification Entry")
    ControlClick("Verification Entry", "", "[Next]")
    If WinExists("Check") Then
        ControlClick("Check", "", "[CLASS:B; INSTANCE:1]")
        ControlSend("Verification Number Entry ", "", "[NAME:txtNumber]", "{backspace}")
        Sleep($iSleep)
        MsgBox($MB_TOPMOST, RunWait("rasdial Internet", "", @SW_HIDE), "Internet is Connected", 2)
        Exit
    EndIf
    WinWait("Verification/Check Utility ", "", 1)
    ControlSend("[Class:Win.Window.84a]", "", "[PictureBox55]", "{tab}")
    MsgBox($MB_TOPMOST, RunWait("rasdial Internet", "", @SW_HIDE), "Internet is Connected", 2)
    Exit
Else
    MsgBox($MB_TOPMOST, "Connection Status", "Internet is not Connected")
    Exit
EndIf

 


Regards,
 

Share this post


Link to post
Share on other sites

#12 ·  Posted

And the question is?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#13 ·  Posted

Spam multiple threads with the same content!


Regards,
 

Share this post


Link to post
Share on other sites

#14 ·  Posted

Did you report this "Spam"?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#15 ·  Posted

Answered OP's question in a different thread earlier

 

Share this post


Link to post
Share on other sites

#16 ·  Posted

13 minutes ago, water said:

Did you report this "Spam"?

The report has been submitted!


Regards,
 

Share this post


Link to post
Share on other sites

#18 ·  Posted

Don't worry about it, a mod will close the second topic. Or we can just stop posting in it

 

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

Please ONLY report threads and do not comment on it in the thread itself .... Thanks :)

Merged: now back on topic pls.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

@VIP what benefit is there in simply parroting what InunoTaishou already said, especially when the OP obviously doesn't understand?

Edit: too early in the morning, I see the threads were merged.

Edit2: @Nareshm I have now found a third thread with the same question. Don't post any more, stick to one thread.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • Nareshm
      By Nareshm
      How can i add sleep command using internet speed.
      If my internet speed is 40-50Kbps then sleep for 5 seconds,
      If my internet speed is 30-40Kbps then sleep for 4 seconds,
      If my internet speed is 20-30Kbps then sleep for 3 seconds.

      *Sleep command used bitween my costom script, Example,
      RunWait("rasdial /disconnect", "", @SW_HIDE) ; Stop connect from start
      Sleep(5000)
      RunWait("rasdial Internet", "", @SW_HIDE) ; Connect again
       
    • lacamel
      By lacamel
      Hi there,
      I did a short script to simulate mouse click when pixel change is detected on a small section of the screen. I recorded the screen many times to see the accuracy of the script and it seems though response time varies widely.
      Here's the script 
      $checksum = pixelchecksum (400,250, 402,252)
      While $checksum = pixelchecksum (400,250, 402,252)
      Sleep (50)
      Wend
      Sleep (300)
      Mouseclick("left", 450,300, 1, 0)
      Counting from the pixel change to the mouse click, i get response times anywhere between 370ms and 550ms. I've tried running au3 and exe, changed sleep times but never gotten an accurate response time based on the script. Any ideas why?
    • InunoTaishou
      By InunoTaishou
      Update 2017-04-21:
      Added a timeout My previous attempt of checking that the function is valid was not working. Added a 1 time function call before entering the While loop to test the function. Now sets error to $SLEEP_UNTIL_INVALID_CALL if the function supplied is does not exist or invalid arguments supplied Added an @Error value $SLEEP_UNTIL_TIMEOUT_REACHED, set when the condition was not met but timeout reached Update 2017-04-25:
      Thanks to @jguinchfor letting me know about Execute(). Greatly simplified the loop (didn't know that Execute would execute a function call statement)
      Any strings passed to the SleepUntil() function need to be enclosed in " or ' (I.e', SleepUntil("ConsoleWrite('This is a test' & @LF)")) Adjusted SleepUntil() to use the Execute() function instead Inspired by a very vague topic, and completely unnecessary, I had fun trying to making this up. A function that will sleep until the conditional statement, or function call statement, provided executes to the condition you want! I know, completely useless!!! It's pretty interesting actually. Instead of having to write multiple while loops per conditions, you just need to use SleepUntil and set your own condition.
      Basic syntax:
      SleepUntil("$iMyNumber = 100") Will sleep until the variable in your script $iMyNumber is 100. All conditional operators are supported (=, <>, >=, <=, >, and <). Currently does not support multiple conditions (i.e., $iMyNumber > 100 and $iMyNumber < 1000).
      More advanced syntax, using a value returned from a function call:
      SleepUntil("TimerDiff(" & TimerInit() & ") > 5000") Well check the value returned from TimerDiff using the value returned from TimerInit() and stop sleeping once it's > 5000 (5 seconds).
      Anyways, better to show through the example.
      Example.au3
      #include <String.au3> #include <Array.au3> #include <GUIConstants.au3> #include <GuiEdit.au3> #include "SleepUntil.au3" AutoItSetOption("GUICloseOnESC", 0) Global $sName = "Test" Global $bBool = True Global $iInt = -1 Global $dDouble = 0.0 Global $sMsg = "Welcome," & @CRLF & _ "The SleepUntil function can use a function to check against a condition or just a regular conditional statement. " & _ "I.e. $iValue = 300" & @CRLF & "A basic conditional example would be" & @CRLF & @TAB & _ "Global $bWaiting = True" & @CRLF & @TAB & _ 'SleepUntil("$bWaiting <> $bWaiting")' & @CRLF & _ "This is a good example of having some kind of global flag where you want to wait until the user triggers the flag to not be true" & @CRLF & @CRLF & _ "The first set of examples will use function calls to compare against the condition value." & @CRLF & _ "First example calls GUIGetMsg using the with no arguments and sleeps until the value returned is " & _ "$GUI_EVENT_CLOSE" & @CRLF & @CRLF & _ "Syntax for the function call for SleepUntil is like normal:" & @CRLF & _ 'SleepUntil("FunctionName(Argument1, Argument2, ArgumnetN) (Condition Operator) Value' & @CRLF & _ 'Example (Where function call has arguments)' & @CRLF & @TAB & _ 'Global $iTimer = TimerInit()' & @CRLF & @TAB & _ 'SleepUntil("TimerDiff(" & $iTimer & ") >= 5000")' & @CRLF & @CRLF & _ "Example (Where no arguments are needed for the function)" & @CRLF & @TAB & _ 'SleepUntil("GUIGetMsg() = $GUI_EVENT_CLOSE")' & @CRLF & @CRLF & _ "The first example will start once you close this window!" Global $hMain = GUICreate("Introduction", 800, 600, 0, 0, BitOR($WS_SIZEBOX, $WS_MAXIMIZEBOX, $WS_MINIMIZEBOX)) Global $edtEdit = GUICtrlCreateEdit($sMsg, 10, 10, 775, 555, $ES_MULTILINE) GUICtrlSetBkColor($edtEdit, 0x1F1F1F) GUICtrlSetColor($edtEdit, 0xF1F1F1) GUICtrlSetFont($edtEdit, 11, 400, "", "Consolas") GUICtrlSetResizing($edtEdit, $GUI_DOCKLEFT + $GUI_DOCKRIGHT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM) GUISetState(@SW_SHOWMAXIMIZED) _GUICtrlEdit_SetSel(GUICtrlGetHandle($edtEdit), 0, 0) ; Slep until person running this example script closes the GUI or it reaches the 30 second timeout SleepUntil("GUIGetMsg() = $GUI_EVENT_CLOSE", 50, 30000) GUIDelete($hMain) MsgBox("", "Timer", "Starting the examples. The next sleep will last until 2 seconds have passed") ; Sleep until TimerDif(Timer Created) > 2000 ToolTip("Sleeping until 2 seconds has passed", 0, 0) SleepUntil("TimerDiff(" & TimerInit() & ") >= 2000") MsgBox("", "Timer", "2 Seconds has passed. Met condition and left sleep function") ; Sleep until the call to ConsoleWrite3Times is >= 3 ToolTip("Sleeping until the function ConsoleWrite3Times() as been called three times", 0, 0) SleepUntil("ConsoleWrite3Times('This is a test!') >= 3", 500) MsgBox("", "Print 3 Times", "Did ConsoleWrite 3 times. Met condition needed and left sleep function") MsgBox("", "Next", "Next SleepUntil examples can be met by pressing the {F1} Key to trigger the conditions" & @CRLF & _ "Next example will sleep until $sName = InunoTaishou") HotKeySet("{F1}", SetName) ; Sleep until user presses {F1} and changes $sName = InunoTaishou ToolTip("$sName = " & $sName, 0, 0) SleepUntil("$sName = 'InunoTaishou'", 100) MsgBox("", $sName, "Name has been updated to " & $sName & ". Met condition needed and left sleep function" & @CRLF & _ "Next example will sleep until $bBool <> True") ; Sleep until user preses {F1} and $bBool <> True ToolTip("$bBool = " & $bBool, 0, 0) SleepUntil("$bBool <> " & $bBool, 100) MsgBox("", $bBool, "Bool has been updated to " & $bBool & ". Met condition needed and left sleep function" & @CRLF & _ "Next example will sleep until $iInt > 0") ; Sleep until user presses {F1} and $iInt > 0 ToolTip("$iInt = " & $iInt, 0, 0) SleepUntil("$iInt > 0", 100) MsgBox("", $iInt, "Int has been updated to " & $iInt & ". Met condition needed and left sleep function" & @CRLF & _ "Next example will sleep until $dDouble = 99.99") ; Sleep until user presses {F1} and $dDouble = 99.99 ToolTip("$dDouble = " & $dDouble, 0, 0) SleepUntil("$dDouble = 99.99", 100) MsgBox("", $dDouble, "Double has been updated to " & $dDouble & ". Met condition needed and left sleep function" & @CRLF & _ "Next example will sleep until function Print is called with the msg provided") Local $sMsgToPrint = InputBox("Message", "What message should be used for ConsoleWrite?", "This is a the default msg!") SleepUntil("Print('" & $sMsgToPrint & "', " & InputBox("Times?", "How many times to print " & $sMsgToPrint & "?", 10) & ") = '" & $sMsgToPrint & "'") MsgBox("", "Print", "Congrats! That's all the examples I have") Func ConsoleWrite3Times($sMsg) Local Static $iPrint = 0 $iPrint += 1 ConsoleWrite("[" & $iPrint & "] " & $sMsg & @LF) Return $iPrint EndFunc Func Print($sMsg, $iTimes) If ($iTimes < 1) Then $iTimes = 1 For $i = 1 to $iTimes ConsoleWrite($sMsg & @LF) Next Return $sMsg EndFunc Func SetName() $sName = "InunoTaishou" HotKeySet("{F1}", SetBool) EndFunc ;==>SetName Func SetBool() $bBool = False HotKeySet("{F1}", SetInt) EndFunc ;==>SetBool Func SetInt() $iInt = 100 HotKeySet("{F1}", SetDouble) EndFunc ;==>SetInt Func SetDouble() $dDouble = 99.99 EndFunc ;==>SetDouble SleepUnti.au3
      #include-once #include <String.au3> Global Const $SLEEP_UNTIL_INVALID_EXECUTE = -100 Global Const $SLEEP_UNTIL_TIMEOUT_REACHED = -101 ; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 ; #CURRENT# ===================================================================================================================== ; SleepUntil: Sleeps until the condition statement supplied meets the requirements ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name ..........: SleepUntil ; Description ...: Sleeps until the condition supplied is met. ; Syntax ........: SleepUntil($sConditionStatement[, $iTime = 100[, $iTimeout = Default]]) ; Parameters ....: $sConditionStatement - String formatted condition statement ; $iTime - (Optional) Time (In Milliseconds) to sleep between each check of the condition ; $iTimeout - (Optional) Timeout (In Milliseconds) to stop sleeping if condition not met ; Return values .: Success - Returns True when the condition is met ; Failure - Returns False and Sets the @Error flag ; -100 ($SLEEP_UNTIL_INVALID_EXECUTE): Function supplied does not exist or parameters supplied do not match ; the function called ; -101 ($SLEEP_UNTIL_TIMEOUT_REACHED): Timeout was reached but the condition was not met ; Author ........: InunoTaishou, jguinch for letting me know about Execute() ; Thanks jguinch! Greatly simplified the script ; Remarks .......: The $sConditionStatement parameter can be a simple $vVar = Value or can use the value returned from a function call ; to sleep. ; Proper syntax for a function call is a normal AutoIt function call: "MsgBox(0, 'Title', 'Message')" ; Example .......: Yes ; =============================================================================================================================== Func SleepUntil($sConditionStatement, $iTime = 100, $iTimeout = Default) Local $iTimer = ($iTimeout ? TimerInit() : Null) While (Not Execute($sConditionStatement)) If (@Error) Then Return SetError($SLEEP_UNTIL_INVALID_EXECUTE, 0, False) If ($iTimeout and TimerDiff($iTimer) >= $iTimeout) Then Return SetError($SLEEP_UNTIL_TIMEOUT_REACHED, 0, False) Sleep($iTime) WEnd Return True EndFunc ;==>SleepUntil Edit: Did a test call to the function to make sure it's valid. checking for the 0xDEAD and 0xBEEF errors inside the while loops wasn't working since the _EvalCondition was being called right after it.
      Edit: Forgot about the _ that can be used in function calls. Added the _ to the StringRegExp
    • ur
      By ur
      I have automated an install process by using the below code.
       
      Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc $win1 = "Text 1" $win2 = "Text 2" _WinWaitActivate($win1,"WARNING: This progra") Send("{ALTDOWN}n{ALTUP}");Send("{SPACE}") _WinWaitActivate($win1,"I DISAGREE and &do n") Send("{UP}n") _WinWaitActivate($win1,"Customer Information") Send("{ALTDOWN}n{ALTUP}");Send("{TAB}{TAB}n") _WinWaitActivate($win1,"Click Next to instal") Send("{ALTDOWN}n{ALTUP}");Send("n") _WinWaitActivate($win1,"This feature require") Send("{ALTDOWN}n{ALTUP}");Send("{TAB}n") _WinWaitActivate($win1,"Ready to Install the") Send("{ALTDOWN}i{ALTUP}");Send("i") _WinWaitActivate($win1,"The InstallShield Wi") Send("{ALTDOWN}f{ALTUP}");Send("f") _WinWaitActivate($win2,"You must restart you") Send("{ALTDOWN}n{ALTUP}");Send("n") Now if any new screen comes in the middle of installation, like some VC++ installation error or like that.
      The AutoIT is waiting in the background.
      Is there any way to skip the new screens with just "enter" and continue the installation??
    • InternetMonkeyBoy
      By InternetMonkeyBoy
      I'm going to build a new function that I have been unable to find.   PLEASE CORRECT ME.  It will tweak the internal AutoIt functions giving me the ability to trash stuff I do not want to spin around.  Get it?  Please throw me whatever you got and I will put it togeather.  Ship it now.
      My supersleep() will be in here somewhere.   It's on another thread.