Jump to content
Macro Express Forums

Remote Access


m204prgmr
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

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