saulik Posted August 13, 2012 Posted August 13, 2012 I want break the script if my window do not appear, but i don't know!!.. See my evidence please, att, IF the window do not appear.docx
water Posted August 14, 2012 Posted August 14, 2012 Set the timer value of function WinWait and check the returned value. If it is 0 then the timeout expired = the window never appeared. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
saulik Posted August 14, 2012 Author Posted August 14, 2012 Water, Thank's a lot, but what' wrong whit my script below? I want just wait until the window appear and of the script continue for execute: Send("{TAB}") MsgBox(4096, "UPDATE", "Você está logado no ambiente INVESTPREV", 2) My version is: 1.79 Variables Dim $r Dim $e WinActivate("[CLASS:Tform1]", "") ControlClick("Form1", "", "[CLASS:TButton; TEXT:Button1; INSTANCE:1]") $e = 0 If @error = 0 Then $r = WinWait("[Form2]", "", 10) If $r = 1 Then ;WinActivate("[CLASS:Tform2]", "") Send("{TAB}") MsgBox(4096, "UPDATE", "Você está logado no ambiente INVESTPREV", 2) Else $e = 1 EndIf EndIf
Moderators JLogan3o13 Posted August 14, 2012 Moderators Posted August 14, 2012 You really need to choose one of these two topics and stick to it. This double posting only makes it harder for people to assist you. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts