Sign in to follow this  
Followers 0
pGwtech

ProcessWait Question

5 posts in this topic

  • Built an AutoIT .exe to execute an OS update.exe
  • Using ProcessWait to identify a RUNDLL.exe error that appears during installation.
  • Once the RunDLL.exe appears, the AutoIT.exe script does not perform the ControlClick feature.
  • the AutoIT.exe script is still running in taskmanager, along with the update.exe and rundll.exe
  • and all is halted at this point.

Any ideas, appreciated.

; Execute Update and Suppress All Errors Messages
;====================================================
;Hides the AutoIT icon
Opt("TrayIconHide",1)

;RUN UPDATE
Run ( "Update.exe /quiet" )

ProcessWait("RUNDLL32.exe")

;POTENTIAL ERRORS THAT MAY OCCUR WHILE RUNNING UPDATE
$ERROR1 = "RUNDLL"
$ERROR1TXT = "An exception occured"

; CLASS #32770 Handle 0x00360064, ID:2, ClassNameNN: Button1
WinWait($ERROR1)
ControlClick($ERROR1, $ERROR1TXT, "[CLASS:Button; INSTANCE:1]")

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi, maybe you could use some lines in your code to debug where exactly where it hangs.

; Execute Update and Suppress All Errors Messages
;====================================================
;Hides the AutoIT icon
Opt("TrayIconHide",1)

;RUN UPDATE
Run ( "Update.exe /quiet" )
ConsoleWrite('1) Run ( "Update.exe /quiet" )' & @LF)

ProcessWait("RUNDLL32.exe")
ConsoleWrite('2) ProcessWait("RUNDLL32.exe")' & @LF)

;POTENTIAL ERRORS THAT MAY OCCUR WHILE RUNNING UPDATE
$ERROR1 = "RUNDLL"
$ERROR1TXT = "An exception occured"

; CLASS #32770 Handle 0x00360064, ID:2, ClassNameNN: Button1
WinWait($ERROR1)
ConsoleWrite('3) WinWait($ERROR1)' & @LF)

ControlClick($ERROR1, $ERROR1TXT, "[CLASS:Button; INSTANCE:1]")
ConsoleWrite('4) ControlClick($ERROR1, $ERROR1TXT, "[CLASS:Button; INSTANCE:1]")' & @LF)

Once you know exactly where it hangs then you can work out why.

As a guess I'd say it's at the WinWait($ERROR1) part of your script.

Edited by smashly

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

The above part of the script is working (TY). I just had to get up to speed on how Au3 works and apply some standard coding practices.

However, now -- I'm trying to controlclick a specific item in a combobox within a tabcontrolview.

The following code works below, however, can I still make it more specific? or eliminate useless code.

Include <GUITab.au3>

$APP = 'TITLE OF PROGRAM'

ShellExecute("example.exe")

WinWaitActive ($APP)

;Attempt to click specific combo item instance 

;Set focus to 1st table in ControlTab View
_GUICtrlTab_SetCurFocus(ControlGetHandle($APP, '', '[CLASS:SysTabControl32;INSTANCE:1]'), 0)

;Control ListView to the ListView Control
ControlListView($APP,"", "SysListView32", "Select", "ClickThisItemInComboBox")

; Click the specific option in the comboControl
ControlClick($APP, "", "[CLASS:Button; INSTANCE:2]")
Edited by pGwtech

Share this post


Link to post
Share on other sites

The above code is now working. Au is a decent product.

Okay, so now I'm trying to ShellExecuteWait a specific command, however it has quotes within quotes.

What is the syntax for embededding quotes in a string value?

In vbscript you would have to use a double quote, which I have already tried in Au, with no success -- along with single quotes.

TIA.

pGwtech

Share this post


Link to post
Share on other sites

Got it. RTM - Laungage Reference - DataTypes (Strings)

Thanks to the technical writers

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
Sign in to follow this  
Followers 0