Bot Posted February 16, 2016 Share Posted February 16, 2016 I'm trying to click a button on a toolbar ControlCommand($hWnd, "", "[CLASS:ToolbarWindow32; INSTANCE:1]", "SendCommandID", 32780) The button is clicked, but since its purpose is to open a Save As dialog, the script won't continue and hangs there forever unless the dialog is closed. So what should I do? Thanks so much. Link to comment Share on other sites More sharing options...
alienclone Posted February 16, 2016 Share Posted February 16, 2016 well what is the next line in your script? what is supposed to happen next? If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version Link to comment Share on other sites More sharing options...
Bot Posted February 16, 2016 Author Share Posted February 16, 2016 4 minutes ago, alienclone said: well what is the next line in your script? what is supposed to happen next? I'm just testing and there is no next lines yet. However I found the solution here ">>>ToolsBar<<<" Understanding how to access these controls - AutoIt General Help and Support - AutoIt Forums I replaced the old code with this code based on jdelaney's post: Run('"' & @AutoItExe & '" /ErrorStdOut /AutoIt3ExecuteLine "ControlCommand(WinGetHandle(''My Window''),'''', ''[CLASS:ToolbarWindow32; INSTANCE:1]'', ''SendCommandID'', 32780)"') And it works just fine 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