Sign in to follow this  
Followers 0
bhunji

WinWaitClose or other...

3 posts in this topic

Hi,

Since the last time I posted I found out our local users are now able to run mcupdate, but now I'm having a different problem with the script...

I want to wait until the mcupdate window disappears so I can grab the last update date from the log file, but doing a simple WinWaitClose($WinTitle) seems to cause the script to hang. so I added 60 seconds and this stops it from hanging but seems like a long time to wait.

I ran the AU3Info utility on the mcupdate window, and it gave me the following info.

After McAfee has updated it creates the "Auto Close in" field, is there away to wait for this, or detect when this appears? So than I can close the window and grab the date from the log...

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<
Title:  McAfee AutoUpdate
Class:  #32770
Size:   X: 388  Y: 293  W: 504  H: 384

>>>>>>>>>>> Mouse Details <<<<<<<<<<<
Window: X: 146  Y: 351
Cursor ID:  2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<
RGB:    Hex: 0x000000   Dec: 0

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<
Size:       X: 42   Y: 328  W: 360  H: 13
Control ID: 1023
ClassNameNN:    Static7
Text:       Auto close in   19 seconds.

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<


>>>>>>>>>>> Visible Window Text <<<<<<<<<<<
Update in Progress
Please wait for update to finish...
Progress1
&Close
List1
Auto close in   19 seconds.

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Local $WinTitle = "McAfee AutoUpdate"

SplashTextOn ( 'Updating McAfee...', 'Please do not touch the keyboard or mouse until the updates have finished.', 300, 100 )

Sleep ( 1000 )

Run ( 'C:\Progra~1\Networ~1\VirusScan\mcupdate.exe' )

WinWait ( $WinTitle )

WinWaitClose ($WinTitle, "", 60 )

Run ( 'C:\Progra~1\up2date\update2.bat')

Share this post


Link to post
Share on other sites



Hi,

Since the last time I posted I found out our local users are now able to run mcupdate, but now I'm having a different problem with the script...

I want to wait until the mcupdate window disappears so I can grab the last update date from the log file, but doing a simple WinWaitClose($WinTitle) seems to cause the script to hang. so I added 60 seconds and this stops it from hanging but seems like a long time to wait.

I ran the AU3Info utility on the mcupdate window, and it gave me the following info.

After McAfee has updated it creates the "Auto Close in" field, is there away to wait for this, or detect when this appears? So than I can close the window and grab the date from the log...

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<
Title:  McAfee AutoUpdate
Class:  #32770
Size:   X: 388  Y: 293  W: 504  H: 384

>>>>>>>>>>> Mouse Details <<<<<<<<<<<
Window: X: 146  Y: 351
Cursor ID:  2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<
RGB:    Hex: 0x000000   Dec: 0

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<
Size:       X: 42   Y: 328  W: 360  H: 13
Control ID: 1023
ClassNameNN:    Static7
Text:       Auto close in   19 seconds.

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<
>>>>>>>>>>> Visible Window Text <<<<<<<<<<<
Update in Progress
Please wait for update to finish...
Progress1
&Close
List1
Auto close in   19 seconds.

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Local $WinTitle = "McAfee AutoUpdate"

SplashTextOn ( 'Updating McAfee...', 'Please do not touch the keyboard or mouse until the updates have finished.', 300, 100 )

Sleep ( 1000 )

Run ( 'C:\Progra~1\Networ~1\VirusScan\mcupdate.exe' )

WinWait ( $WinTitle )

WinWaitClose ($WinTitle, "", 60 )

Run ( 'C:\Progra~1\up2date\update2.bat')
why not just do another winwait, or winwaitactive for the new window?

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

WinWaitActive worked for me, Thanks.

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