Jump to content
Macro Express Forums

User String Input Without Generating A Box


Recommended Posts


I am using ME to automate some portions of completing an Emergency Medicine Template program called TSystems to document patient visits. I want to be able to activate a large number of macros which click check boxes, etc. or enter boiler plate text. Keeping track of the macro names is somewhat of a challenge as I develop more of them. ME's limit of 11 characters for shortkeys activation limits descriptive naming possibilites. Because of the characteristics of the TSystems program, I can not use ME popup menus in some areas of TSystems. When ME menus or dialog boxes open, the top window in TSystems closes, and that means I can not check boxes or enter text in that window from ME.


My current work around is to run a macro (which is listed below) which waits for the letter z to be entered then deletes the Z and uses the Windows Cut function to move the last 21 characters to the clipboard. This allows up to 21 character names of macros to be input into a variable. I then use this to run the actual macro which modifies the TSystem template. I am using a Tablet PC, and I actually use a program called FITALY (soft keyboard) to enter text without a physical keyboard. It has a slide function which allows me to slide the stylus to the name of the macro I want to run. This is much faster than having to actually to type the name of the macro, and a 40 character name is as fast as a two character name to enter.


The problem that I have is that sometimes I want to activate a macro when the cursor is not in a location which accepts text input; therefore, there is no text to highlight and cut to the clipboard. Is there a function in ME which can look at the keyboard buffer and capture the most recent input, or is there a user input function similar to "Set Text String Variables: Prompt for Value" which does not open a dialog box?


Delay 150 Milliseconds

// The name of the macro to run (with enough leading spaces to equal 21 characters // entered followed by the letter z

Wait for Key Press: Z

// capture the last 21 characters of text (after deleting the z) to the clipboard


Delay 150 Milliseconds

Variable Set String %T1% from Clipboard

Delay 150 Milliseconds

Macro Run: %T1%


Thank you


Link to comment
Share on other sites


Thank you for the suggestion. Unfortunately that will not work. The window that closes was opened by clicking on one of many text completion lines on a page. I would have to have a way of recording all mouse clicks and tracking backwards to the one which opened the window initially.


Link to comment
Share on other sites

if i understand correctly, wouldn't this work.. ( i assume that a ALT TAB while the program is running would allow you to switch to another app or window;; it that application closes itself in the case of a user ALT TAB... it won't work, but I've never seen a pgm do that, (except MS cp)



open the some dialog (menu whatever) (or txt file) before the program



then when you have the program window open ...


trigger a macro then with some hotkey (though it could be otherwise)



THE FIRST STATEMENT of the macro would get the current active window name...

(before doing any disply, the pgm window would still be on top)



and save it into a variable %T11%


then do whatever processing you want,


...then (REactive the PGM window )

ACTIVATE WINDOW ONLY with exact Window Title &T11%



Link to comment
Share on other sites

Thank you for the suggestion. Unfortunately, anything that brings another window to the foreground, will close certain top windows in TSystems. While I can save the exact window name, Tsystems closes the window whenever I switch to any program or window. Tsystems is still running, but its topmost window now is the window from which I opened the window that I want to operate the macro on.


However, there are of subset of times were your suggestion will help. Some windows which will not accept text do stay open. On these windows I can modify the initiating macro to open a tempory program or text file as you suggest to accept the name of the macro I want to activate with the longer descriptive name. This has the disadvantage that I will end up with several different macros which will be needed to intiate the chain depending on circumstances instead of one macro which can handle all instances. There is no way for ME to determine which TSystem windows would stay open and which would close. This will decrease the number of instances which have no work around.

Thank you once again.

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.

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.

  • Create New...