Jump to content
Macro Express Forums

Repeating a Keystroke


Zethgryn

Recommended Posts

Hiya, just got this program and i just need a very simple macro cause i have no idea what to do. :rolleyes: :rolleyes: :rolleyes:

 

Basically, what i want is when i hit "alt+f1", i want the macro to hit "f1" repeatedly until i have hit "alt+f1" again.

 

 

yeah, did i mention im a total nub when it comes to this program? lol, PLEASE HELP ME OUT!~~ :rolleyes: :rolleyes: :rolleyes:

Link to comment
Share on other sites

Hi Zethgryn

 

I'm not exactly sure what the end result is you are trying to get...other than stop the macro...so, without knowing all the details I will throw this out.

 

The answer to your basic question is...NO. But...with Macro Express, if you expand the depth and width of what you are trying to do you can sometimes come up with a different method of getting what you want towork.

 

Lets say you are in a particular program, window or screen that has a name. You keep hitting F1 till you get to a certain spot...does that action then change the name of the window? The scripting below shows how something like that would work. I used an excel spreadsheet for the test. When I switched to another screen during one of the delays, the macro copied the then active window and noticed it was different, so it stopped.

 

If this isn't what you are trying to achieve, or window names don't change for you, see if you can find something that changes when the macro has hit the last F1 when you need to stop. What I'm saying is...is there something in the program your working with or the screens you are working with that comes up differently once you have hit the required number of F1's. If it does. You can capture it and have it compare to what was there, and if it's different, it knows to stop.

 

Hope this gives you some ideas as to how you might be able to work around this "situation."

 

John

 

<REP3:08:000008:000001:0001:0:01:Microsoft Excel - TEST><DELAY:5><TVAR2:01:06:><DELAY:1><IFVAR2:1:01:8:Microsoft Excel - TEST><DELAY:3><MSTOP><ENDIF><TEXTTYPE:1<NUMENTER>><ENDREP>

Link to comment
Share on other sites

Here's what I would suggest.

 

Set up a repeat loop to repeat up to 99999 times.

 

When you want to stop the macro, press the macro abort hot key. The default selection is Scroll Lock + Pause. But you can change this by clicking on Options | Preferences | Playback and change the hot key.

 

 

Repeat Start (Repeat 99999 times)

Text Type: <F1>

Repeat End

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...
×
×
  • Create New...