[Closed] Make WaitWindowOpen> accept a variable

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

[Closed] Make WaitWindowOpen> accept a variable

Post by jpuziano » Tue May 19, 2009 4:41 pm

Hi Marcus,

The following would have been very convienient in a script today... but it didn't work:
  • WaitWindowOpen>%dest_file%*
I am assuming it fails because the command does not accept a variable for window_title.
Help File wrote:WaitWindowOpen>window_title

Waits for a specified window to open/appear. Execution of the script will not continue until a window with the specified title text appears or a specified timeout value is exceeded. The window title may contain the * symbol at the end to indicate a wildcard.

Most MS commands accept a variable for most parameters... but this one accepts a literal string only.

Question: Can it (and the other Window commands) be enhanced so they can also accept a variable for the window_title parameter?

If this is possible, can it be added to the wish list?

On the other hand, if its impossible or impractical for some reason... please let me know as well.

Thanks and take care
Last edited by jpuziano on Tue May 19, 2009 8:15 pm, edited 1 time in total.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue May 19, 2009 6:27 pm

Eh?

WaitWindowOpen does and always has accepted variables.

Run the following script, then start Notepad manually. The script will wait until you start Notepad and then pop up the message.

Let>title=Notepad
WaitWindowOpen>%title%*
MessageModal>hi

Or:

Let>title=Notepad*
WaitWindowOpen>%title%
MessageModal>hi

Or even:

Let>title=Notepad*
WaitWindowOpen>title
MessageModal>hi

Works just fine. WaitWindowOpen has accepted variables as long as Macro Scheduler has supported them - i.e. since around 1998!
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue May 19, 2009 8:28 pm

Hi Marcus,

The previous line was:
  • ExecuteFile>dest_file
It failed because my dest_file variable held the full path to a csv file I wanted to open in Excel. Excel doesn't include the path in the window titles, just the filename itself.

After splitting dest_file into two variables, one for the path and one for the filename... and using that in the WaitWindowOpen> command, its woking fine.

Closed... sorry about that.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts