Jump to content
Sign in to follow this  
Silverel

Simple script fails in Win7

Recommended Posts

Silverel

$i = 1

While $i = 1
If WinExists("Popup", "") Then
WinClose("Popup", "") 
    EndIf
    Sleep(5000)
    
Wend

I've tried running this as an .exe in Win7 with admin privelages and it still doesn't work. What's the deal here?

Edited by Silverel

Share this post


Link to post
Share on other sites
MrMitchell

I dunno maybe WinExists("Popup", "") is never true or... what is the WinClose("Popup", "") returning? 0 or 1?

Share this post


Link to post
Share on other sites
jaberwacky

Does the 'Popup' window have any text? If so, then when you say WinExists("Popup", "") that means that you're asking for a window named Popup which has no text. At least that's my theory.

Share this post


Link to post
Share on other sites
Silverel

This works flawlessly in XP and Vista environments, I was just curious if there was anything specific about Win7 that would cause it to fail. My disadvantage here is that I can't actually write the script on the Win7 machine. :mellow:

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  

×