Sign in to follow this  
Followers 0
Silverel

Simple script fails in Win7

4 posts in this topic

#1 ·  Posted (edited)

$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



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

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

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  
Followers 0