×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Call a macro from a 2-character hotkey?

Call a macro from a 2-character hotkey?

Call a macro from a 2-character hotkey?

(OP)
Anyone know how to call macro using a combimation of 2 characters (and no I don't want to use the Shift, Ctrl, or Alt keys)? I am currently writing a macro that will prompt the user for any length combination of characters, and then I will pass to/call the respective macro from there.

I took a peek at the SolidWorks 2D Command Line Emulator, but as far as I know I cannot add/edit any commands it issues.

Thanks,
Ken

RE: Call a macro from a 2-character hotkey?

I do not know of anyway to do this.  My question is for my own curiosity:  Why do you want to do this?  I suppose (just thinking out loud without actually knowing it will work) one could write the macro to be started by one keypress and then have it immediately check to see if the second key has been pressed.  If not then terminate without any message (that may require the user to press the keys in a certain order).

RE: Call a macro from a 2-character hotkey?

(OP)

Quote:


Why do you want to do this?
I have shortcuts assigned to all the keys on the keyboard and I still find more commands/macros that I would like to have a shortcut key for.

Also, we are in the process of switching the entire dept. over from AutoCad to SW and I thought this might help it be an easier transition for some of the guys.

Quote:


one could write the macro to be started by one keypress and then have it immediately check to see if the second key has been pressed

That is pretty much what I'm doing right now with the macro I wrote.

Thanks for the input,
Ken

RE: Call a macro from a 2-character hotkey?

Ken,

You probably know can also assign them to the F1-F12. I know you do not want to but I assign some of my macros to the ctrl, alt or shift keys.  These are normally the ones I seldom use or do operations I do not want accidentally run.  You can also can assign macros to buttons on the tool bars.  I use buttons especially for those that require me to select something with the mouse.  It is easlier then to just move the mouse to select the button then press a key.  You can also assign macros to menu items.  I have a macro that displays a form with tabs that performs different functions.

Regg

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources