frankis843 Posted May 5, 2017 Report Share Posted May 5, 2017 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 Quote Link to comment Share on other sites More sharing options...
Samrae Posted May 5, 2017 Report Share Posted May 5, 2017 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%)"/> Quote Link to comment Share on other sites More sharing options...
frankis843 Posted May 5, 2017 Author Report Share Posted May 5, 2017 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. Quote Link to comment Share on other sites More sharing options...
Samrae Posted May 5, 2017 Report Share Posted May 5, 2017 The first thing to determine is whether or not the macro is being activated. You can do this one of several ways. Put a Text Box display at the top of your macro. It may say something like "The macro has started" Put a Sound File command at the top of your macro. 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: Use the built-in debugger to step line by line through your macro Put Text Box Display commands throughout your macro Quote Link to comment Share on other sites More sharing options...
frankis843 Posted May 5, 2017 Author Report Share Posted May 5, 2017 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. Quote Link to comment Share on other sites More sharing options...
Samrae Posted May 5, 2017 Report Share Posted May 5, 2017 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? Quote Link to comment Share on other sites More sharing options...
frankis843 Posted May 5, 2017 Author Report Share Posted May 5, 2017 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. Quote Link to comment Share on other sites More sharing options...
rberq Posted May 5, 2017 Report Share Posted May 5, 2017 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. Quote Link to comment Share on other sites More sharing options...
frankis843 Posted May 5, 2017 Author Report Share Posted May 5, 2017 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. Quote Link to comment Share on other sites More sharing options...
rberq Posted May 6, 2017 Report Share Posted May 6, 2017 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. Quote Link to comment Share on other sites More sharing options...
frankis843 Posted May 6, 2017 Author Report Share Posted May 6, 2017 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. Quote Link to comment Share on other sites More sharing options...
amonaghan Posted May 6, 2017 Report Share Posted May 6, 2017 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. Quote Link to comment Share on other sites More sharing options...
frankis843 Posted May 6, 2017 Author Report Share Posted May 6, 2017 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. Quote Link to comment Share on other sites More sharing options...
frankis843 Posted May 6, 2017 Author Report Share Posted May 6, 2017 I deleted the macro and started over from scratch. For whatever reason it appears to be working now.... Quote Link to comment Share on other sites More sharing options...
acantor Posted May 6, 2017 Report Share Posted May 6, 2017 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.