Hello Guest it is September 16, 2019, 09:06:41 AM

Author Topic: Custom Shortcut Keys?  (Read 1972 times)

0 Members and 1 Guest are viewing this topic.

Offline Dom

*
  •  22 22
    • View Profile
    • Bridgeport CNC Retrofit Blog
Custom Shortcut Keys?
« on: March 26, 2010, 10:53:38 AM »
I wish to add a number of physical buttons to my machine to perform various functions such as jogging, drawbar release, etc. I figured I simple way to do this would be to write a series of macros and then assign an F key to each one which in turn would be controled by a pokeys card.

Is this a sensible idea or are there better ways ? Also how does one go about assigning a macro to a keyboard shortcut ? I vaugely remember being able to assign keyboard shortcuts to custom buttons in the screen designer software but is there a way to do it without creating a virtual button? - An on screen button would be redundant as I would be using 'real' buttons.

Also where can I find doccumention on writing vbscript for mach? A list of functions & syntax along with a few examples might save me from having to ask a lot of 'simple' questions on here.

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Custom Shortcut Keys?
« Reply #1 on: March 26, 2010, 11:09:13 AM »
I personally dont like hotkeys for a couple of reasons, firstly it is easy to press a key by mistake and the machine will do whatever that hotkey is assigned as. Secondly you need to have the button on the screen for a hotkey to work.
If you want to use HotKeys you can make a VB button with your code and have the hotkey set for that button, use either Screen4  or MachScreen to do that.

The way I do things is I use Scott Schaefers (poppabear) MachMad plugin, it will look at a LED and then when seen will run a custom macro of your choosing. That way you can have your switch set to an input and have the plugin look for the inputs LED. If you dont have eonough inputs that have LEDs as standard you can use a Brain to look at OEM Triggers and switch a user LED. You dont actually need the LEDs on the screen either, just as long as the Brain is switching it on Mach will see it.
 Doing it this way (inputs or OEM Trigger)  you will not need to have the button on the screen and it will work no matter what page of the screenset you are on at the time.

Rev 4 of Mach should have that functionality built in but  in the meantime your options are as above.
Hood