Jump to content
Macro Express Forums

Long Window Title and Partial matching text


Recommended Posts

I am activating a window title that is quite long (80 characters). There are an unique set of letters common to the windows titles that start at the 76 character mark. When Macro Express examines a window title, up to how much of the title does it examine? I am looking to trigger the macro based on a partial window title that is three letters long and exsts in the window title at approximately the 76 character mark. Is this possible? It seems to work sometimes and not work other times.

Link to comment
Share on other sites

I created a text file with a name based on the text of your post:

!aaMacroExpressexaminesawindowtitleuptohowmuchofthetitledoesitexamineIamlookingtotriggerthemacrobasedonapartialwindowtitlethatisthreexyzletterslong.txt

That's about 150 characters with the extension. I activated another macro based on "xyz" being in the window title which gains focus and it worked fine. Ditto for window is opened. I assume ME will work up to the max allowable in NTFS of 255.

 

If yours is not activating it may be for other reasons.

Link to comment
Share on other sites

Looks like it is not activating for other reasons. We are using Internet Explorer to login to a Citrix Desktop. Once on the desktop we launch a EMR program called Practice Manager. There seems to be a tug between Macro Express and Practice Manager. I use a macro to open a patient chart and reposition the window on the desktop. However, at the end of this re position, that window suddenly looses focus. When I go to activate it using the macro. It activates and then again looses focus before I can send it the key strokes. When I use a Wait Unitl Window command for Key strokes to initialize, the practice manager window opens but does not activate such that the "wait until window" command triggers. It tells me it can't find the window I am looking for even though it is there. Problem is it is not activated. Can you point me to some recommendations as to how to empower ME to get control of the windows it needs to complete the macros? I tried using the get control utility but it never seems to see the window such that it can get control. Help?

 

I created a text file with a name based on the text of your post:

!aaMacroExpressexaminesawindowtitleuptohowmuchofthetitledoesitexamineIamlookingtotriggerthemacrobasedonapartialwindowtitlethatisthreexyzletterslong.txt

That's about 150 characters with the extension. I activated another macro based on "xyz" being in the window title which gains focus and it worked fine. Ditto for window is opened. I assume ME will work up to the max allowable in NTFS of 255.

 

If yours is not activating it may be for other reasons.

Link to comment
Share on other sites

If you choose to activate the macro on window focus rather than opening, every time the window gets focus the macro will run. You can end up with "musical windows" depending on the commands.

 

If that is not the issue, try using the Set Window Order in Windows/Programs. Set the window on top. I assume the window is the one found with the three letters so you would have to use those as a partial title. To change to another window you may have to mess with window order rather than/in addition to the normal activation command.

 

I can't test if this will work with your other software. BTW are you using ME3 per the comment in the thread title or MEPro per this forum?

Link to comment
Share on other sites

I am using ME3 in this situation.

 

I tried using the Set Window Order but to no avail.

 

I am opening a patient chart from a calendar window showing a list of appointments.

 

The patient chart window is obviously on top of the calendar window. However, if I look at the windows taskbar

I notice the calendar window button highlighted as if it is still on top. But the Patient Chart window is on top. However, the title bar for the Patient Chart window is grey not blue indicating that it is NOT active even though it is on top of the Calendar window.

 

Keystrokes get sent to the Calendar window instead of the Patient Chart window.

 

Can you tell me what is going on and if there is anything I can do as a workaround?

 

If you choose to activate the macro on window focus rather than opening, every time the window gets focus the macro will run. You can end up with "musical windows" depending on the commands.

 

If that is not the issue, try using the Set Window Order in Windows/Programs. Set the window on top. I assume the window is the one found with the three letters so you would have to use those as a partial title. To change to another window you may have to mess with window order rather than/in addition to the normal activation command.

 

I can't test if this will work with your other software. BTW are you using ME3 per the comment in the thread title or MEPro per this forum?

Link to comment
Share on other sites

To answer your last question, you may be aware from using ME Text Box Displays that you can have windows on top that are not focused. There are settings in TBD for exactly that. The same applies to a lot of notifications and tooltips. If your AV software updates and brings up a window, it may be on top but is not focused and does not affect anything other then when you click to close. There could also be issues if the page is a web document or a video overlay. I don't know how Citrix works - the window may be inaccessible to ME.

 

Can you manually manipulate the Patient Chart window with mouse and/or keyboard (which seems to be on top but not focused)? Clicking the window with the mouse may give focus and can be incorporated into the macro.

 

I'm not very clear on what you are doing manually and what is supposed to be done by the macro. In your first explanation you say "When I use a Wait Unitl Window command for Key strokes to initialize, the practice manager window opens but does not activate such that the "wait until window" command triggers". That conflicts with "I use a macro to open a patient chart and reposition the window on the desktop". How many macros are there? Here is my interpretation:

 

Manually open Practice Manager

Manually open appointment calendar (if not part of step 1)

Manually click (or double-click) on a patient name/appointment

When Patient Chart window appears the macro runs (activation: Wait for Window Title on Opening)

The macro positions the Patient Chart and carries out various functions with the chart data.

Link to comment
Share on other sites

... We are using ... a Citrix Desktop.

Is Macro Express Pro installed on the Citrix server or the local workstation?

 

When Macro Express is installed on the local workstation it cannot 'see' the windows within the Citrix session. In this case the windows are actually running on the Citrix server. What the local workstation sees are not individual Calendar and Patient Chart windows but a single Citrix window containing images of the Calendar and Patient Chart windows. Commands that interact with the window title do not work.

 

Macro Express Pro can be installed on either the local workstation or the Citrix server or both. Of course, if it is installed on both, you have to be careful with conflicting macros.

 

For more, enter 'Citrix' into the Macro Express Knowledgebase.

Edited by kevin
Link to comment
Share on other sites

Off Topic: Topic Thread Integrity

JohnS, We all appreciate your contributions to the forum and your willingness to help. You are often the first to offer suggestions or comments. Thank you!! :)

 

I wish you would reconsider your decision to not reply with in a way that keeps the integrity of threads within posts. As pointed out earlier, it is awkward to view topics with replies that pop back out to the 'top' level of a topic's thread. If you use the (smaller and lighter) reply button close to the topic you are replying to, it has no negative effect on those who view chronologically (is this still an option?) and it helps those of us who view with a topic thread.

 

Here are two real life examples take from these forums:

 

Easy to follow topic thread:

thread1.jpg

 

Not so easy to follow:

thread2.jpg

 

Please continue to contribute (thanks again!) but please reconsider your reply button choice. ;)

Link to comment
Share on other sites

I think the problem is with Citrix and the fact that ME is on the local Workstation. Citrix works in the background, but it may not be telling the local workstation what windows it has in what priority. The mouse idea is the work around I am using right now. Thanks for your help!

 

To answer your last question, you may be aware from using ME Text Box Displays that you can have windows on top that are not focused. There are settings in TBD for exactly that. The same applies to a lot of notifications and tooltips. If your AV software updates and brings up a window, it may be on top but is not focused and does not affect anything other then when you click to close. There could also be issues if the page is a web document or a video overlay. I don't know how Citrix works - the window may be inaccessible to ME.

 

Can you manually manipulate the Patient Chart window with mouse and/or keyboard (which seems to be on top but not focused)? Clicking the window with the mouse may give focus and can be incorporated into the macro.

 

I'm not very clear on what you are doing manually and what is supposed to be done by the macro. In your first explanation you say "When I use a Wait Unitl Window command for Key strokes to initialize, the practice manager window opens but does not activate such that the "wait until window" command triggers". That conflicts with "I use a macro to open a patient chart and reposition the window on the desktop". How many macros are there? Here is my interpretation:

 

Manually open Practice Manager

Manually open appointment calendar (if not part of step 1)

Manually click (or double-click) on a patient name/appointment

When Patient Chart window appears the macro runs (activation: Wait for Window Title on Opening)

The macro positions the Patient Chart and carries out various functions with the chart data.

Link to comment
Share on other sites

Hi Kevin!

Still toubleshooting the Activate Windows command. I have ME installed on a local workstation. Citrix is working in the background. However, when I choose a Window title to activate and I click on the ... (may be partial) I can see a list of visible and hidden windows. I can see the window I am looking for in this list. If Citrix were working the way you indicate below, would I be able to see those windows in that list or not? IF I can see them, why would it be difficult to activate them? Is there a setting or a delay I need to introduce to make it more likely I can activate the window I am looking for?

 

 

Is Macro Express Pro installed on the Citrix server or the local workstation?

 

When Macro Express is installed on the local workstation it cannot 'see' the windows within the Citrix session. In this case the windows are actually running on the Citrix server. What the local workstation sees are not individual Calendar and Patient Chart windows but a single Citrix window containing images of the Calendar and Patient Chart windows. Commands that interact with the window title do not work.

 

Macro Express Pro can be installed on either the local workstation or the Citrix server or both. Of course, if it is installed on both, you have to be careful with conflicting macros.

 

For more, enter 'Citrix' into the Macro Express Knowledgebase.

Link to comment
Share on other sites

I created a text file with a name based on the text of your post:

!aaMacroExpressexaminesawindowtitleuptohowmuchofthetitledoesitexamineIamlookingtotriggerthemacrobasedonapartialwindowtitlethatisthreexyzletterslong.txt

That's about 150 characters with the extension. I activated another macro based on "xyz" being in the window title which gains focus and it worked fine. Ditto for window is opened. I assume ME will work up to the max allowable in NTFS of 255.

 

If yours is not activating it may be for other reasons.

JohnS, did you try this in Macro Express Pro or Macro Express? I just noticed in this topic's subtitle that Scruples98 is using Macro Express 3. (This is posted to the wrong forum.) It is possible that there is a limit on the size of a window title in 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...
×
×
  • Create New...