Jump to content
Macro Express Forums

question about macro express and dos mode in windows xp


doolysw2
 Share

Recommended Posts

We run a legacy program every occasionally where I work and I use macro express to emulate a print screen function that no longer works under windows XP. The script I wrote works great! The first time it's ran... The printing action requires the dos program to lose focus. Once it regains focus, macro express no longer catches any keyboard shortcuts and won't activate any macros. Any one have any suggestions?

Link to comment
Share on other sites

We run a legacy program every occasionally where I work and I use macro express to emulate a print screen function that no longer works under windows XP. The script I wrote works great! The first time it's ran... The printing action requires the dos program to lose focus. Once it regains focus, macro express no longer catches any keyboard shortcuts and won't activate any macros. Any one have any suggestions?

you might try resetting keyboard hooks

 

<DOHOOK>

Link to comment
Share on other sites

I tried resetting the keyboard hooks, but that didn't seem to help. Here's the code for the macro

 

<TEXTTYPE:<ALT><RCTRL><PRTSCR>><CLIPST2:0:C:\PRINT.TXT><DELAY:1><LAUNCHDEL2:0:01C:\WINDOWS\NOTEPAD.EXE<PARAM>/p c:\print.txt3><WRES:pms><DOHOOK>

 

Here's what it does.

 

We have an old dos program called Preventative Maintenance System or PMS for short. While it's ancient, it still works very well in tracking our truck maintenance. One of the print functions of the program is to press shift printscreen, and that causes the program to send the current screen to the printer as characters, and it prints exactly what you are looking at. This doesn't work in windows XP. As a workaround, I'm having macro express press alt, right control, printscreen which sends the current screen to the clipboard as characters. I then use macro express to save the clipboard to a text file, and use notepad in command line mode to print the document. When the document is printed, it causes the dos windows to lose focus, so macro express then restores focus to the PMS program. Once focus is restored, macro express no longer catches key presses.

 

I've tried a few experiments, and this happens even if I leave the program windowed. I thought maybe macro express was leaving the alt key or the ctrl key pressed down (I've had that problem before), but even if I don't run a macro, open the PMS program, alt tab out an back into the PMS program, macro express still no longer captures key presses.

Link to comment
Share on other sites

Try using ACTIVATE WINDOW:pms before, or in place of, the RESTORE WINDOW command.

RESTORE relates to sizing, whereas ACTIVATE will simply give focus back to the window.

 

Having said that, your macro (with RESTORE) works fine on my computer in a cmd window, so the ACTIVATE may not help you.

 

I bet the pms acronym gets a lot of jokes. We have one called pms also -- everyone remembers the acronym, no one remembers the full system name.

Link to comment
Share on other sites

Yep it gets a lot of jokes. My boss has a love hate relationship with the program. It's very quirky, but he doesn't want to change because he knows how to use it. When it won't work for him, he fusses at the computer loudly. Whenever any one hears him doing it and asks what's wrong with him, I tell them he's PMSing :P

 

I tried using activate window instead of restore, and it didn't help. I also re-tried running the dos program in windows mode, and I was wrong. Macro express will capture key presses more than just the first time if pms is windowed, the only problem is that my alt ctrl printscreen doesn't properly catch the screen contents that way. It has to be full screen.

Link to comment
Share on other sites

I don't know how you launch PMS. However, when I set up a desktop shortcut to run command.com in full screen mode, then your macro works for me first time and subsequent times. Running command.com in a window, I get the same results you do, the text is not captured.

 

So it seems the difference between your results and mine is, in fullscreen mode, MacroExpress keeps working after the first time for me but works only once for you.

 

How does PMS itself get launched? If it is an icon simply launching pms.exe, try changing it to

c:\windows\system32\command.com /c pms.exe.

 

If that doesn't do it, then I'm out of ideas.

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