Jump to content

WinWait in Windows 7


schilbiz
 Share

Recommended Posts

I googled and look around on the forums but couldn't find anyting mentioning WinWait and Windows 7. I am currently running version: 15th January, 2010 - v3.3.4.0. Has anyone noticed increased or sporadic CPU usage with WinWait on Windows 7? On XP it is hardly noticeable (0-2% usage) but on 7 with my PC otherwise idle, just the script running, it flucuates from 0-20%.

It's just a simple WinWait in a While loop.

While 1
WinWait("Microsoft Office", "Would you like to open this file?")
    Send("{TAB}")
    Send("{ENTER}")
WEnd

Thanks.

Link to comment
Share on other sites

Are you sure that the AutoIt script is the culprit?

When it comes to Windows Os's, how sure can you be? I have restarted Windows 7, gave it time to load all startup apps and waited until System Idle is at 99% (Task Manager). When I launch the script the script name appears as a process and then the sporadic CPU Usage starts. The only thing in the While loop is what I mention above.

I should note that I am running Windows 7 on VMware Workstation 6.5.2.

Link to comment
Share on other sites

I ran the below code with and without #RequireAdmin which didn't seem to change anything. I tried putting a sleep and Msgbox in the While statement before the Winwait to see if it was just skipping over the WinWait but it appears to be stopping and waiting for the Window to appear like it should.

The process itself uses less than 2MB, today it flucuated as high as 36% CPU Usage. It never seems to increment it will jump from 02% to 28% down to 16% etc.. real random, no patterns detected.

The system is an Intel Core2 6300 @ 1.86 GHz with 2G RAM assigned to the Virtual Machine. Windows 7 32-bit OS.

I will check it later this week once I format c and install Windows 7.

Thanks.

#RequireAdmin

While 1
WinWait("Microsoft Office", "Would you like to open this file?")
        Send("{TAB}")
        Send("{ENTER}")
WEnd
Link to comment
Share on other sites

I expect that there may be a problem while running in a virtual machine then. Normally the WinWait* functions don't have any kind of significant processor usage.

For the sake of testing, have you tried a newer/older version of AutoIt to see if the behavior has changed?

I tried it on autoit-v3.3.0.0 and it still had the same sporadic CPU usage. It works perfectly normal on XP with the latest public version 3.3.4.0. Perhaps it is Windows 7 on VMware, technically Windows 7 is not even supported on Workstation 6.5.2 build that I am using. I will test it out later this week once on Windows 7 and post the results.

Link to comment
Share on other sites

Ok, good luck.

Well, after installing Windows 7 and running the script it appears to work properly. While active it uses less than 2% CPU otherwise its usually stays around 0% like it did on XP. So it likely had something to do with the VMware environment.

Thanks for the input.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...