Markus Barrera-Kolb Posted June 26, 2008 Share Posted June 26, 2008 I'd like to be able to use the "Make Guide" command with the keyboard shortcut "G", but simple keystrokes (w/o a modifier) are only available for tools and not menu items, for whatever strange reason. I thought it might be possible to make a tool script that executes this command and then assign that shortcut to it. Can someone enlighten me what the syntax would be for running that command in VectorScript? Thanks! Quote Link to comment
Henry Finch Posted June 27, 2008 Share Posted June 27, 2008 Sorry for being no help on a non-modified keystroke for Make Guide but I've been using for years. The forward slash is right above the right command key on macs. I think as important is the unlock command to go with it. A script for an unlocked Make Guides would make sense. I do use for Unlock and for Lock which are directly above the /. Quote Link to comment
maarten. Posted June 27, 2008 Share Posted June 27, 2008 I think it's this one: DoMenuTextByName('Guides',1); Quote Link to comment
Gerrit Posted June 27, 2008 Share Posted June 27, 2008 Create a new "Tool" PIO, paste in the following code. Next, add it to your workspace and set a keyboard shortcut to the tool. ==================== PROCEDURE Set2Guide; VAR x, y : REAL; h : HANDLE; BEGIN DSelectAll; GetPt(x,y); h := PickObject(x, y); IF h <> NIL THEN BEGIN SetSelect(h); DoMenuTextByName('Guides',1); DoMenuTextByName('Unlock',0); END ELSE SysBeep; END; Run(Set2Guide); Quote Link to comment
maarten. Posted June 27, 2008 Share Posted June 27, 2008 Gerrit , is there a reason why you unlock that Guide? I thought that the purpose of a Guide was that you couldn't move it accidentially? Quote Link to comment
Gerrit Posted June 27, 2008 Share Posted June 27, 2008 My distracted mind must have been merging both Markus' and Henry's requests :-) Besides, I too like most of my guides unlocked - I move them around constantly. Quote Link to comment
Markus Barrera-Kolb Posted June 27, 2008 Author Share Posted June 27, 2008 Thanks for your replies Gerrit & maarten! And by omitting the "DeselectAll" I also have the option of selecting several objects prior to invoking the script... Quote Link to comment
Markus Barrera-Kolb Posted June 27, 2008 Author Share Posted June 27, 2008 Using the "DoMenuTextByName" command I've also made a script for selecting all guides (so that I can assign the shortcut option+G to it). Can something be added to the script so that the command is executed immediately, i.e. doesn't require another mouse-click? Currently, the script looks like this: PROCEDURE SelectGuides; BEGIN DoMenuTextByName('Guides',2); END; RUN (SelectGuides); Quote Link to comment
Gerrit Posted June 28, 2008 Share Posted June 28, 2008 In order to achieve that, you'll need to make a Command instead of a Tool, and add it to the menu's of your workspace (including the keyboard shortcut). Quote Link to comment
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.
Note: Your post will require moderator approval before it will be visible.