Jump to content
Macro Express Forums

Suspend for Keypress Input Question


Recommended Posts

Hi,

Newbie here.  I'm trying to have a marco type this below text but have it stop to prompt for my input at each ___ and then continue to the next one.

Finished with ___ used vehicles vs ___ in ___ 2016 (___ units)

___ units between ___ days vs ___ units the prior month (___ )

 

Any ideas?  I have tried searching a number of things but may not be searching the correct phrase.

 

Thanks in advance.

 

Frank

Link to comment
Share on other sites

Try "Variable Set String: Prompt" and "Variable Set Integer: Prompt" commands. Something like this may get you started:

Variable Set String %Used%: Prompt
Variable Set String %New%: Prompt
Variable Set Integer %iUnits%: Prompt
Text Type (Simulate Keystrokes): Finished with %Used% vehicles vs %New% in ___ 2016 (%Units%)
<VARIABLE SET STRING Option="\x01" Destination="%Used%" Prompt="Enter used vehicles" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
<VARIABLE SET STRING Option="\x01" Destination="%New%" Prompt="Enter new vehicles" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
<VARIABLE SET INTEGER Option="\x01" Destination="%iUnits%" Prompt="Enter number of units" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
<TEXT TYPE Action="0" Text="Finished with %Used% vehicles vs %New% in ___ 2016 (%Units%)"/>

 

Link to comment
Share on other sites

The first thing to determine is whether or not the macro is being activated. You can do this one of several ways.

  1. Put a Text Box display at the top of your macro. It may say something like "The macro has started"
  2. Put a Sound File command at the top of your macro.
  3. Open the Macro Explorer. Click Options, Preferences, Playback and the Miscellaneous tab. Click to enable the "Play a sound when a macro runs" and choose a sound.

If your macro is not being activated choose a different activation. If you continue to have trouble tell us specifically what activation you are trying to use.

If the macro is being activated then you can use several techniques to debug it. Here are some ideas:

  1. Use the built-in debugger to step line by line through your macro
  2. Put Text Box Display commands throughout your macro

 

 

Link to comment
Share on other sites

10 minutes ago, frankis843 said:

When I test it in a word file it is working just fine.

I do not understand what this means.

Is the macro being activated? Did you try one of the techniques above?

What program are you typing into?

Link to comment
Share on other sites

Sorry.  I added the text box to the start of it and it is activated and popped up just fine.

I did a test run and chose to start the debugger in a blank word document and it performed just like I expected it should.

But, when I tried to activate it by a command I can't get it do anything.

Link to comment
Share on other sites

What does "can't get it to do anything" mean???  Does it pop up the text box, or not???

Try starting the macro with one of the keypad characters, for example the asterisk or the + key.  As Sam asked, what application are you typing into?  I have seen some applications that "trap" or "block" the Ctrl key so a macro triggered by a Ctrl combination does not run at all, because ME never sees the key combination intended to start the macro.

Link to comment
Share on other sites

29 minutes ago, rberq said:

What does "can't get it to do anything" mean???  Does it pop up the text box, or not???

Try starting the macro with one of the keypad characters, for example the asterisk or the + key.  As Sam asked, what application are you typing into?  I have seen some applications that "trap" or "block" the Ctrl key so a macro triggered by a Ctrl combination does not run at all, because ME never sees the key combination intended to start the macro.

Can't get it do anything means I press the activation command and nothing happens other than a blinking cursor sitting there idle. No, the text box won't pop up to start the sequence of the macro.  I am trying to get it to work in Microsoft Word.  However, other ctrl + shift + "random letter" macros work fine in the same word file.  I tried to use the exclamation key and it didn't work, tried the ; key and got nothing too.

Link to comment
Share on other sites

If the text box display is the first line of the macro, and is not appearing, then it sure sounds like the macro is not running at all. 

Check the macro's Scope tab to make sure it is Global -- not restricted to a particular window or program.

Link to comment
Share on other sites

1 minute ago, rberq said:

If the text box display is the first line of the macro, and is not appearing, then it sure sounds like the macro is not running at all. 

Check the macro's Scope tab to make sure it is Global -- not restricted to a particular window or program.

I agree the macro is not running and the text box is first.  I believe everything is set to the global mode.  I'll check tomorrow to ensure.  I find it weird it works perfect when I run a test on it using the same word document.

Link to comment
Share on other sites

15 minutes ago, amonaghan said:

As rberq suggests, it may be that you have set the scope to 'Word' only. Try changing it to 'Global' or better still, tell us what program you are running the macro in.

The scope is set to global.  I am trying to run the macro is Microsoft Word 2007. 

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