Waiting For Window Title To Change

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
RNIB
Macro Veteran
Posts: 195
Joined: Thu Jan 10, 2008 10:25 am
Location: London, UK

Waiting For Window Title To Change

Post by RNIB » Thu Mar 17, 2016 12:55 pm

This should be really simple but for some reason I can't get it to work

I'm using Adobe Audition to save multiple WAV files as a new WAV file.

When no file is loaded in Audition the window title is simply Adobe Audition.

When the audio files are loaded in the title changes to Adobe Audition - untitled*

Once I've saved a file the window title changes to Adobe Audition - filename.wav

I'm getting the Macro to give each file a unique name based on variables that are captured earlier on so the file name is basically:

%ProdNumber%_%PubDate%_%ProducerName%_%PartNo%.wav

I've tried using:
SetFocus>Adobe Audition*
WaitWindowChanged>0

and
WaitWindowOpen>Adobe Audition - %ProdNumber%_%PubDate%_%ProducerName%_%PartNo%.wav

Due to the size of the files and the fact they are being saved to a remote drive, it could take 5-15minutes perhaps longer for the file to save.

But nothing works. Any ideas?

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Waiting For Window Title To Change

Post by JRL » Thu Mar 17, 2016 3:19 pm

Assuming the file name will be unique, I would try using just the file name with no path, no extension. Add an asterisk at the end to match any occurrence of window name that contains the file name at any position in the window name.

Code: Select all

WaitWindowOpen>%ProdNumber%_%PubDate%_%ProducerName%_%PartNo%*
Or even just a piece of the file name assuming that piece is unique.

Code: Select all

WaitWindowOpen>%PartNo%*

RNIB
Macro Veteran
Posts: 195
Joined: Thu Jan 10, 2008 10:25 am
Location: London, UK

Re: Waiting For Window Title To Change

Post by RNIB » Thu Mar 17, 2016 4:41 pm

Aha that worked!

Cheers again JRL

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