m204prgmr Posted February 4, 2005 Report Share Posted February 4, 2005 Greetings, I gain access to another PC through LanDesk via MacroExpress. The macro used is a simple Window Title and a text input of <TAB><ENTER>. This works great when ME is not running a script. My problem is how do I tell ME that when my access request window is visiable but not active to make it active? I'm also concerned that what ever would make it active and do the 2 functions it might disrupt the current running macro. My only thought is to have this IF statement wrapped around the entire job and when it needs to do its thing, pause whatever is currently running. Does this make sense? If I cannot do this, can I send a stop command that would be placed in a shared folder on the machine? Bottom line is I need access to this machine if something goes wrong and cannot gain access to the desktop with ME running. Thanks. Robert..... Quote Link to comment Share on other sites More sharing options...
kevin Posted February 4, 2005 Report Share Posted February 4, 2005 Hi Robert, Macro Express 3 will only run one macro at a time. So, if another macro is already running, a second one will not run. However, you may be able to add something to your macro to make it work. Perhaps you could use the 'If Window Title is running' and 'If Not Window Title on top' commands or the 'If Program Name "" is running' and 'If Not Program Name on top' commands. Quote Link to comment Share on other sites More sharing options...
m204prgmr Posted February 5, 2005 Author Report Share Posted February 5, 2005 Thanks Kevin, I'll see what I can try and let you know. R Quote Link to comment Share on other sites More sharing options...
m204prgmr Posted February 8, 2005 Author Report Share Posted February 8, 2005 Kevin, I'm struggling a bit trying to figure out the best placement of "If Window Running." I think this might be my best option and correct me if I am wrong. ME will recognize this window if it is not in focus? I've seen it on the page while the main program is running and it's not active. Here's my scenerio if I may. There's a scedule running indefinetly that checks every 20 minutes to see if a file has been FTP'd to the PC. IF found, it kicks off the main Import program. Inside of the main program other macros are called. Once the main program starts, the If file found macro is disabled, and I see now it does not need to be since only one can run at a time. Correct? My thoughts on the If Window Running addition is that if true, pause the main program, activate the new window (Remote Access Request), to OK that request, then resume with the main program. The remote request can come in at any point during the main run, which remember, is calling other macros during this duration. Make any sense?..do I need to send the code? Thanks Robert Quote Link to comment Share on other sites More sharing options...
randallc Posted February 8, 2005 Report Share Posted February 8, 2005 Hi, Robert,. My simple approach would be to go through your routine macro and add your lines with "If window...Macrorun(TerminalMacro)..End If" as often as you reasonably can. Perhaps you can include it inside some other (non-critical?)loops in other macros all over the place? - It will automatically pause till it returns to the "End If". If it will slow down some other loop("If" does not usually slow much), and you know how often it is running, have it check only every 50th recursion or similar. (Your terminal macro may have to set some other marker to include in your "if", if you only want it to run once. - eg in an environment variable which you can check with your "if Window".."AND".. "If var =" ( or NOT="?) ((Imagining... Then maybe also an "If Window NOT running" to reset the environment variable and be able to check again "if running"!)) I doubt you can get this done automatically any other way with MacroExpress; but I will be interested in Kevin's ideas. Best, Randall Quote Link to comment Share on other sites More sharing options...
randallc Posted February 8, 2005 Report Share Posted February 8, 2005 PS Robert - Have you considered running VMWare or similar, and running a second windowsXP (or eg Win2K) and macroExpress to do your main macro processing; then you can have the main WinXP and macroExpress free to do your terminal etc? Then you do have MacroExpress running twice? I am not an expert on VMWare and it may take some setting up of the processor time and speed sharing, but I imagine it is possible. I use VMWare for simpler things. Randall Quote Link to comment Share on other sites More sharing options...
kevin Posted February 8, 2005 Report Share Posted February 8, 2005 Robert, You are correct, there is no need to disable one macro while another one runs. What I was suggesting in my reply was explained quite well by Randall. I suggest that you create a 'secondary' macro and run it from a variety of places in your 'main' macro using the Macro Run command. For this example I will assume the secondary macro is named "Terminal Macro". The "If Window Running" command determines if a window is running whether or not it has focus. If "Window on Top" command determines if a window is running and has focus. I expect that the macro fragment would look something like this: If Window Title "LanDesk Connect" is running AND If Not Window Title "LanDesk Connect" on top Macro Run: Terminal Macro End If Place these commands in several places in your main macro. Randall, You said: Have you considered running VMWare or similar ... Then you do have MacroExpress running twice?This is a great suggestion. I love VMWare. We use it to test our products on a different versions of Windows. However, VMWare is not inexpensive. Each VMWare session is like a separate computer. Macro Express can be running on your computer and also be running within each VMWare session that you are running. This is a way to have multiple copies of any program, not just Macro Express, running at the same time. However, each VMWare session has it's own hard drive and so, to share files back and forth, you need to use Windows Networking (shares, etc.). I find the VMWare sessions (understandably) run much slower that the main version of Windows. Still, the speed is more than acceptable. For example, I have a 3.2 GHz CPU. My Windows 98 VMWare session runs as fast or faster than the 550 MHz system I had when I was actually using Windows 98 as the primary OS. Quote Link to comment Share on other sites More sharing options...
m204prgmr Posted February 16, 2005 Author Report Share Posted February 16, 2005 Kevin, I thought I would share that after a week of creative requests, our Desktop admins finally granted me access to this particular PC. This mean access without having a request window open for acknowledgement. Thanks for all of your imput. Robert 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.