frankis843

Suspend for Keypress Input Question

15 posts in this topic

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

Share this post


Link to post
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%)"/>

 

Share this post


Link to post
Share on other sites

Thanks, Samrae.

I have it set up exactly that way and can't get it to "go".  I have tried three different activation commands and can't get any to work.  Any idea?

I have successfully run many other text type macros with no issues.

Share this post


Link to post
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

 

 

Share this post


Link to post
Share on other sites

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

I have tried it with Ctrl + Shift + V, Ctrl + Shift + X and Ctrl + Shift + Z.  I just tried Ctrl + Shift + Space too, still nothing.

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

I deleted the macro and started over from scratch.  For whatever reason it appears to be working now....

Share this post


Link to post
Share on other sites
18 minutes ago, frankis843 said:

I deleted the macro and started over from scratch.  For whatever reason it appears to be working now....

That's a tried-and-true debugging technique!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now