Jump to content
Macro Express Forums

MEP 4.7.1.1 Tethering Multiple Choice Menu to Program


Recommended Posts

Hello everyone!

I'm extremely new to Macro Express Pro and currently I'm using 4.7.1.1 to build macros to support users. So far a lot of it makes sense (I have limited experience with coding but learned enough about general concepts for it to not look completely like Greek) but I'm curious about the best approach for the following scenario. Most people I'm supporting use two monitors and currently all the macros are built to bring up the menu on the 0 monitor; however due to no standard "setup" for employees it's mixed in terms of what program they're running on each monitor. Is there a way to tether the menu functionality to a specific program? I basically want the menu to always pop up on the same monitor as a certain program.

Thank you in advance for any help or insight!

Link to comment
Share on other sites

I have never worked with macros on two monitors, but I will take a stab at your problem.  Maybe someone else will step up and give a better answer.

1) You can use command "Variable Set Integer" to get location/coordinates of the current window.  So if the relevant application's window has focus you can check which monitor it is on.  You may be able to get coordinates also with the "Get Control" command even if the window doesn't currently have focus -- I'm not sure of that.  
2) When you code a menu in Macro Express, you can tell it the coordinates at which to display the menu, so hopefully you can pick spots that are reasonable on each monitor even if people use different resolutions.  (You can get their screen resolutions also by the "Variable Set Integer" command, if you need to.)

I don't think you can change, on the fly, the location to display the menu.  But you could code the same menu two times in the macro, at different display locations, and say something like
IF WINDOW-TOP-LEFT-CORNER LESS THAN 1920
   DISPLAY LEFT-MENU
ELSE
   DISPLAY RIGHT-MENU
END IF

I know you said you would like to tether the menu to a program, but the best I can come up with is to check window name(s); and code some logic to position the menu because I don't think it can be automatically tethered.  

Good luck, feel free to ask more questions, and let us know how it works out.  

 

Link to comment
Share on other sites

rberq, thank you for the input! I got put on some other more urgent fixes so I haven't had a chance to try your suggestions yet but I'm looking forward to trying to implement them. I'm sure y'all will be seeing more of me here in the future as I get deeper into the program. :)

Cheers and thanks again!

Link to comment
Share on other sites

  • 3 weeks later...

Often the user environments are different in many ways. In several cases I created a training program for the users for the positions of windows, elements, controls, etc. The user runs the program, sets values, clicks to show locations, etc. and then this is saved in the registry for future macro use. If the user changes their minds, they can rerun the training program. 

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