Jump to content
Sign in to follow this  

Problem without explorer.exe as window-shell

Recommended Posts


The following script do not run properly on a computer without the explorer.exe as the windows shell. It runs on another computer where explorer.exe is running as the shell as normal, with only one difference in the code. The coordinates of the first _ScreenCapture_Capture are slightly different.

The computer starts a program as the windows shell, from which I need to grab a small section of the window and save it as a file. The script starts but it do not create a file defined by $CmdLine[3]. $CmdLine[2] defines the title of the window to locate and $CmdLine[1] is set to 60000 for a 60 second delay in the end of the script. No errors are reported, and the script runs until killed by taskmanager. Do _ScreenCapture_Capture() and/or WinGetPos() depend on explorer.exe being the shell?

#Include <ScreenCapture.au3>
AutoItSetOption ( "WinTitleMatchMode" , 1 )

 $Vision = WinGetPos($CmdLine[2])
 If @error <> 1 Then 
  _ScreenCapture_Capture($CmdLine[3], $Vision[0]+337, $Vision[1]+617, $Vision[0]+361, $Vision[1]+649, False)
  _ScreenCapture_Capture($CmdLine[3], 0, 0, -1, -1, False)

Share this post

Link to post
Share on other sites

After a closer and hands-on examination of the computer, I find that the script and AutoIt propably isn't the one to blame. The computer is small industrial-PC which shows severe signs of overload. Windows-desktop crashes after the main program starts, and menus use a different font and occasionally vanishes. It's a textbook example of a Win2000 running out of resources.

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