Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call a macro from a 2-character hotkey?

Status
Not open for further replies.

brengine

Mechanical
Apr 19, 2001
616
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
 
Replies continue below

Recommended for you

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

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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor