Jump to content

Search the Community

Showing results for tags 'winwait'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • Forum
  • AutoIt


  • Community Calendar

Found 11 results

  1. if ControlClick("[CLASS:MsiDialogCloseClass]"," ","[CLASS:SysTreeView32; INSTANCE:1]") Then $htreeview=ControlGetHandle($hwnd,"","[CLASS:SysTreeView32; INSTANCE:1]") ControlTreeView($hwnd," ",$htreeview,"Select","#4") The above code worked well to enable the martupgrade feature on windows 7. As part of our Installation Testing Automation before delivering the installer to end user.To confirm whether all the screens are working good. But it is not working on windows 10. $h= ControlTreeView($hwnd," ",$htreeview,"Select","#4") The $h is getting value 1,which means error.
  2. 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??
  3. I have a small exe I created in AutoIt that seems to be causing some problems in OutLook when people go to save a PDF or Reply to emails. Here is my code. TraySetState(2) WinWait("[CLASS:#32770]", "Make sure that your sign-in address, user name, and password are correct and try again.", 0) WinClose( "Lync") So this works just fine, it closes these message prompts we are trying to suppress. But if the autoit executable is running when someone is using Outlook and they go to Save as PDF. When they click "Save As" and go to type in the name of the file to save, they can't type in the box. So if they close the autoit executable that's running only the code above, then they can use type in the name of the file. So we know the EXE is preventing users from saving documents. Now, I'm sure it could be the way I've written this code, but I'm new to AutoIt and I'm not sure what could be causing this. This little script seems like it' targeting the correct CLASS # and Window TItle and exact message. So I don't understand why it's interfering with other applications. Any ideas?
  4. Hi. i googled and searched a lot before posting this. thanks for any help. I need to locate a window that has no title or discernible text, BUT is always the same size. The autoit documentation says: "X \ Y \ W \ H - The position and size of a window One or more properties are used in the title parameter of a window command in the format: [PROPERTY1 : Value1; PROPERTY2:Value2]" However, i can't figure out exactly how to do that. i tried: Local $winAW = WinWait("[W:506;H:288]", "", 30); That didn't work. I couldn't find an example of the specific format I need to use. Can someone provide a proven working example? Maybe that example can be added to the documentation? Thanks!
  5. I'm looking possible ways to optimize sleep time in a script which has multiple sleep times for save, refresh etc. The sleep duration varies from 5 secs to 17 secs time to time (depending upon the record, computer performance etc). Currently I set max sleep duration. ie sleep(17000). I'm looking possible ways to dynamically change sleep duration rather than fixed maximum duration. Note: winwait is not helpful in my script. Thanks in advance for your responses
  6. I basically want to create a Windows 8 Training script for new users, so need a popup to show when they open the start menu. WinWait and WinWaitActive are never detecting on my Win8 64 bit computer when waiting for the new start screen window. I have used "Start menu" and "[CLASS:ImmersiveLauncher]" for the title, even "[CLASS:DirectUIHWND]" Below is the Window info the the Start Screen >>>> Window <<<< Title: Start menu Class: ImmersiveLauncher Position: 1920, 0 Size: 1920, 1080 Style: 0x96000000 ExStyle: 0x00200008 Handle: 0x0000000000010190 >>>> Control <<<< Class: DirectUIHWND Instance: 0 ClassnameNN: DirectUIHWND0 Name: Advanced (Class): [CLASS:DirectUIHWND; INSTANCE:0] ID: Text: Position: 0, 0 Size: 1920, 1080 ControlClick Coords: 138, 174 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x0000000000010192 >>>> Mouse <<<< Position: 2058, 174 Cursor ID: 0 Color: 0x180053 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< Explorer Browser Control I have this setup to run as a test when I press a hotkey: $title = WinGetTitle ("[ACTIVE]") $state = WinGetState ($title) ConsoleWrite ($title &" "& $state) I get "Start menu 0" its always 0 no matter what (it works correctly with other programs) I can get the PID of start menu but how can I then check when its active from that? Any help appreciated EDIT: I can only get the PID, Handle or anything else if the Start window is open. I cannot use win wait with any of this info though.
  7. Hello All! Longtime user of AutoIt - LOVE the language. Right now I'm running into a bit of an issue and I need some help. I'm attempting to automate some processes in an open-source 3D model software called meshlab (http://meshlab.sourceforge.net/) - It's quite processor intensive. Though I've run into an issue where my work computer is MUCH faster than my home computer. When I execute WinWait("MeshLab") it won't wait, nor will it wait when I run one of the 'filters' - Filters > Remeshing > Surface Reconstruction: VCG - WinWait("Surface Reconstruction: VCG") I found something called "ProcessWait" in the helpfile (never had to use it before) - but when I run ProcessWait("meshlab.exe") - it doesn't work! Is there an alternative method to check/poll the system ever X milliseconds to determine if the process is finished executing? Some of these filters I run on my CAD models can take minutes to execute, and it varies drastically from computer to computer. Here's what I'm making - I take my 3D models, and run them through a bunch of filters to create this effect, called a "Voronoi Tessellation"
  8. Hello All, This is my test script i've been messing around with to get the syntax correct for my real script that I am working on. Simply, this script will: The problem that I am having is my loop that I have isn't waiting for a user to input new data into the "username" input box. How to replicate: 1. Input Project Name "TESTING-01A-Q1-2013" 2. Number of Projects Can be any number more than 1 3. Third input box is looking for a name "can be anything." 4. Click Next Project 5. When Next project button is dim click submit 6. Look in the script directory where you ran it from for "testing.txt" You will notice something similar to the following: Project TESTING-01A-Q1-2013 This is my username Project TESTING-01B-Q1-2013 This is my username TEST USER Project TESTING-01C-Q1-2013 This is my username TEST USER Project TESTING-01D-Q1-2013 This is my username TEST USER Project TESTING-01E-Q1-2013 This is my username TEST USER What needs to happen is the script will wait for the username input box to have data in it before filewrite. code is below #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1_1 = GUICreate("Test", 615, 438, 215, 170) $RDCNextProjectButton = GUICtrlCreateButton("Next Project", 183, 241, 99, 33) GUICtrlSetState(-1, $GUI_DISABLE) $ProjectNameInputBox = GUICtrlCreateInput("", 35, 104, 193, 21) $ProjectNameLabel = GUICtrlCreateLabel("Please Input Your Project Name", 27, 80, 200, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $NumberOfProjectsLabel = GUICtrlCreateLabel("Please Input The Number Of Projects You Have Of This Kind", 19, 160, 364, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $RDCNumberOfProjectsInput = GUICtrlCreateInput("", 49, 198, 193, 21) $RDCSubmitButton = GUICtrlCreateButton("Submit", 72, 240, 99, 33) GUICtrlSetState(-1, $GUI_ENABLE) Global $ProjectNameRead = GUICtrlRead($ProjectNameInputBox) $username = GUICtrlCreateInput("", 48, 290, 193, 21) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $RDCNumberOfProjectsInput ;$RDCProjectSiteRead = GUICtrlRead ($ProjectSiteCombo) $RDCProjectNameRead = GUICtrlRead($ProjectNameInputBox) $RDCNumberOfProjectsRead = GUICtrlRead($RDCNumberOfProjectsInput) $usernameread = GUICtrlRead($username) If $RDCNumberOfProjectsRead > 1 Then GUICtrlSetState($RDCNextProjectButton, $GUI_ENABLE) GUICtrlSetState($RDCSubmitButton, $GUI_DISABLE) FileOpen("testing.txt", 1) FileWrite("testing.txt", @CRLF & @CRLF) FileWrite("testing.txt", "Project ") FileWrite("testing.txt", $RDCProjectNameRead & @CRLF) FileWrite("testing.txt", "This is my username " & $usernameread & @CRLF) FileClose("testing.txt") guictrlsetdata($username,"") ElseIf $RDCNumberOfProjectsRead = 1 Then GUICtrlSetState($RDCNextProjectButton, $GUI_DISABLE) GUICtrlSetState($RDCSubmitButton, $GUI_ENABLE) EndIf $CapacityInput = ($RDCNumberOfProjectsRead * 10) Case $RDCNextProjectButton $ProjectNameRead = GUICtrlRead($ProjectNameInputBox) $RDCNumberOfProjectsRead = GUICtrlRead($RDCNumberOfProjectsInput) $usernameread = GUICtrlRead($username) If guictrlread($username) = ("") Then MsgBox(0,"WAIT","Please Input A Name.") EndIf For $I = 1 To $RDCNumberOfProjectsRead - 1 FileOpen("testing.txt", 1) ConsoleWrite("'" & StringRegExpReplace($ProjectNameRead, "(?<=-\d{2})([A-Z])(?=-Q)", "' & Chr(Asc('$1') + $I) & '") & "'" & @LF) Local $soutput = Execute("'" & StringRegExpReplace($ProjectNameRead, "(?<=-\d{2})([A-Z])(?=-Q)", "' & Chr(Asc('$1') + $I) & '") & "'") GUICtrlSetData($ProjectNameInputBox, $soutput) FileWrite("testing.txt", @CRLF & @CRLF) FileWrite("testing.txt", "Project ") FileWrite("testing.txt", $soutput & @CRLF) FileWrite("testing.txt", "This is my username " & $usernameread & @CRLF) FileClose("testing.txt") guictrlsetdata($username,"") Next GUICtrlSetState($RDCNextProjectButton, $GUI_DISABLE) GUICtrlSetState($RDCSubmitButton, $GUI_ENABLE) Case $RDCSubmitButton MsgBox(0, "TESTING", "END OF SCRIPT") Exit EndSwitch WEnd Thanks to all for helping.
  9. WinWait problem?

    Hi all, i have a weird problem, i have made a script that waits for a window to popup before continue, it works as a standalone but not inside the bigger script and i can´t figure out why. Here´s the standalone script: WinWait("Kampanj -- Webpage Dialog", "") If WinExists("Kampanj -- Webpage Dialog", "") Then MsgBox(0,"KAMPANJ!","Kampanjfönster öppet") WinActivate("Kampanj -- Webpage Dialog", "") Send("{ALTDOWN}s") Sleep(100) Send("{ALTUP}") Sleep(100) Send("{ALTDOWN}t") Sleep(100) Send("{ALTUP}") Sleep(100) EndIf And here´s the bigger script where this code just waits forever when it gets to the winwait: #include <IE.au3> #include <File.au3> #include <Misc.au3> #include <Excel.au3> $g_szVersion = "blob" If WinExists($g_szVersion) Then Exit ; do NOT run me again! AutoItWinSetTitle($g_szVersion) Global $kampanj Global $rownr Global $oIE Global $oFrame Global $ClipboardData $rownr = 1 $oIE = _IEAttach("GSM-AHS") WinActivate("GSM") Sleep(50) $kampanj = "KAM02370" $oIE.document.all.data.contentwindow.document.forms.CampaignForm.LIST.value = $kampanj Sleep(5000) $oFrame = _IEFrameGetCollection($oIE, 2) $ClipboardData = _IEPropertyGet($oFrame, "outerhtml") If StringInStr($ClipboardData, "selected value=KAM02370") Then $oIE.document.all.data.contentwindow.document.forms.CampaignForm.AddButton.disabled = False sleep(1000) $oIE.document.all.data.contentwindow.document.forms.CampaignForm.AddButton.click EndIf WinWait("Kampanj -- Webpage Dialog", "") If WinExists("Kampanj -- Webpage Dialog", "") Then ;MsgBox(0,"KAMPANJ!","Kampanjfönster öppet") WinActivate("Kampanj -- Webpage Dialog", "") Send("{ALTDOWN}s") Sleep(100) Send("{ALTUP}") Sleep(100) Send("{ALTDOWN}t") Sleep(100) Send("{ALTUP}") Sleep(100) EndIf Im planning on using it with various diffrent webapplications and local server programs and files, that´s why all thoose includes any thoughts?
  10. Is anyone else experiencing this issue with Windows 8 Release Preview & Consumer Preview: I have several scripts that automate info filling info into windows. They, of course, rely on AutoIT recognizing the windows by REGEXPTITLE & REGEXPCLASS (usually both, unless the title is blank). The scripts work fine for hours after restarting but they all eventually fail to "see" the windows even though they are visible. I am specifically working with Maxthon 3 (the Download Manager Window) and NetSetMan Pro. My understanding is that Windows 8 does not run explorer persistently & that may be an issue. I really just wanted wanted to see if anyone else has experienced this problem with the 2 "official" Windows 8 releases. I know that the software is Beta, so don't flame my post with that old chestnut. EDIT: This is a multi computer problem
  11. Hi guys, i'me testing this two function and i have made this script: AutoItSetOption("TrayIconDebug", 1) AutoItSetOption("SendKeyDelay", 10) Opt("WinTitleMatchMode", 2) Opt("WinDetectHiddenText",1) Global $Title = "Software Title" Global $Installer = @WorkingDir & "\setup.exe" Global $Language = "Select language" Global $Info = "Information" Global $Account = "Register" Run($Installer) TrayTip("", "Installation...", 5) WinWait($Language, "Select the language") ControlClick($Language, "", "[CLASS:TNewButton; INSTANCE:1]") WinWait($Title, "Welcome") ControlClick($Title, "&Next >", "[CLASS:TNewButton; INSTANCE:1]") TrayTip("", "Finish", 5) Sleep(2000) Exit Work fine, but i have a little question. somewere on this forum i have read that ControlClick / ControlSend work also if the windows is hide, so i have change the run command to this: Run($Installer, @SW_HIDE) But the script is stopped to the first WinWait. Where is my error? Thanks for support