Jump to content
Macro Express Forums

Window commands: bug?


Recommended Posts

On about half the occasions I run it, the following doesn't execute the move/size command. It's as if the Wait is being bypassed. The message "Line 3: Debug Error: The window could not be found" is displayed. That window is opened - presumably just too slowly for the move/size to process it.

 

Open Folder to "C:\Test"

Wait for Window Title: C:\Test

Window Move and Size: Move "C:\Test" to (100,200) and size to 300 x 400

 

Code:

 

<OPEN FOLDER Path="C:\\Test"/>
<WAIT FOR WINDOW TITLE Title="C:\\Test" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>
<WINDOW MOVE AND SIZE Use_Current="FALSE" Title="C:\\Test" Exact_Match="TRUE" Use_Wildcards="FALSE" Left="100" Top="200" Width="300" Height="400" Monitor="0"/>

 

 

(If you try it, remember to at least move the folder after a successful run, otherwise Windows will usually re-open it next time at the same size and position, giving the impression the macro ran correctly.)

 

If I change the script to:

 

Open Folder to "C:\Test"

Wait for Window Title: C:\Test

Window Activate: C:\Test

Window Move and Size: Move "C:\Test" to (100,200) and size to 300 x 400

 

<OPEN FOLDER Path="C:\\Test"/>
<WAIT FOR WINDOW TITLE Title="C:\\Test" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>
<WINDOW ACTIVATE Title="C:\\Test" Exact_Match="TRUE" Wildcards="FALSE" _IGNORE="0x0006"/>
<WINDOW MOVE AND SIZE Use_Current="FALSE" Title="C:\\Test" Exact_Match="TRUE" Use_Wildcards="FALSE" Left="100" Top="200" Width="300" Height="400" Monitor="0"/>

 

then the move/resize does take place, although the error message now appears for the Window Activate line. Once again implicating the Wait for Window command. (A command for which I've also recently reported a possible bug about its incorrect use of the Exact/Partial options.)

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...