Jump to content
Macro Express Forums

Is it possible to pattern match in activating a window.


Recommended Posts

I have six windows and need to select off a string at the front and the back of the title. The titles look like this

"TF 06-09 4/2/2009 125 tick" which is made of <Symbol><Contract><Date><Type of Chart>. I want to select a window by the Symbol and Type of Chart. So given TF and 125 tick, activate that one window.

 

I was hoping to see a wildcard character in the Window Title "TF * 125 tick".

 

How can I make this happen?

Is there a wild card capability?

Can I get a list of all windows and search strings for correct components?

 

Any ideas and / or suggestions welcomed

 

CryptOrchid

 

Added on:

Figured out a solution on my own again. This seems to work, is it the preferred method:

 

Variable Set String %T1% "6E"

Variable Set String %T2% "(15 Tick)"

Repeat with Windows: Place title in %T3%

If Variable %T3% contains variable %T1%

AND

If Variable %T3% contains variable %T2%

Activate Window: "%T3%"

End If

Repeat End

 

CryptOrchid

Link to comment
Share on other sites

You posted this in the Macro Express Pro forum but, from your example, it looks like you are using Macro Express 3.

 

In Macro Express Pro the Window Activate command has 'Partial Match' and 'The name contains wildcards' options. In Macro Express Pro your macro would look like this:

Window Activate: TF*125 tick

Your solution is good for Macro Express 3.

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...
 Share

×
×
  • Create New...