Hi Terry,
I started writing this menu plugin before I decided just to put all wizards into 1 plugin. It needs a button created on screen with # 44444. I can make it be able to be called with a macro/mdi if any 1 needs or prefers it.
Vmax549 wrote:Dan here is a thought, Instead of having to create a NEW button on screen simply setup the wizard as a hotkey in UCCNC I use {ALT_W} to call your Wizard up instead of creating a new screen button.
(;-) TP
[MyPlugins]
Wiz1button=44444
// The bool onscreen parameter is true if the button was pressed on the GUI and is false if the Callbutton function was called.
public void Buttonpress_event(int buttonnumber, bool onscreen)
{
if (onscreen)
{
if (buttonnumber == 128)
{
}
}
}
Vmax549 wrote:It is odd that the hotkey will start the Wiz but not Callbutton().
(;-) TP
dezsoe wrote:I think the difference is in the sample code:
- Code: Select all
// The bool onscreen parameter is true if the button was pressed on the GUI and is false if the Callbutton function was called.
public void Buttonpress_event(int buttonnumber, bool onscreen)
{
if (onscreen)
{
if (buttonnumber == 128)
{
}
}
}
If you check the onscreen value then Callbutton won't work.I did the same some time ago, reported to Balázs as an error. He told me to read the comment before the function declaration...
Edit: Hotkeys also make GUI calls.
dezsoe wrote:To prevent key code collision you could have a key in the profile to define the button code. E.g.:
- Code: Select all
[MyPlugins]
Wiz1button=44444
On startup the plugin could read this key (in Init_event) and check the read code in Buttonpress_event.
Return to Conversational Wizards
Users browsing this forum: No registered users and 2 guests