Snyder7 Posted January 26, 2018 Report Share Posted January 26, 2018 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! Quote Link to comment Share on other sites More sharing options...
rberq Posted January 26, 2018 Report Share Posted January 26, 2018 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. Quote Link to comment Share on other sites More sharing options...
Snyder7 Posted January 30, 2018 Author Report Share Posted January 30, 2018 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! Quote Link to comment Share on other sites More sharing options...
Cory Posted February 15, 2018 Report Share Posted February 15, 2018 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.