Machsupport Forum

Mach Discussion => Mach Screens => Topic started by: Greolt on February 19, 2009, 04:05:58 PM

Title: Button to call a menu item ?
Post by: Greolt on February 19, 2009, 04:05:58 PM
I know I have seen info on this somewhere but despite my search efforts I can't find it.  :)

Just want an on-screen button to call the video window plugin, menu item.

Sure I can do this with a button script.     This is with Scream4.

Thanks,  Greg
Title: Re: Button to call a menu item ?
Post by: zealous on February 19, 2009, 05:21:20 PM
Currently you can't acess Plugin control using
Code: [Select]
DoMenu( 6,1 )
You might make a request to Brian to change this.
Title: Re: Button to call a menu item ?
Post by: Greolt on February 19, 2009, 05:53:52 PM
Thanks for that Jason

Brian seems to be snowed under at the moment. 

Might leave it for another time.  :)

Greg
Title: Re: Button to call a menu item ?
Post by: zealous on February 19, 2009, 06:07:07 PM
I don't know if there is any other call to the Video window that can be made, but maybe we can ask Scott(Poppa bear) to make a plugin to open them up ;) I will talk to him.
Title: Re: Button to call a menu item ?
Post by: Greolt on February 19, 2009, 06:11:19 PM
Yeah if any one can do that it will be Scott.   :)

Posted a general question on it on the Yahoo group also.

Greg
Title: Re: Button to call a menu item ?
Post by: poppabear on February 19, 2009, 06:17:15 PM
Whoa...........  I will look if I can get a handle on it, BUT, you would have to make a plugin to then give you the ability to "Open" if from a button. With an LED like I do in MAD, or a Notify Plugins.

It would be far, far, easier for Brian to fix the "DoMenu" glitch..............

I will see if I can get a handle on it, and if I can, see if there is a way to launch it, but again it will have to be from a plugin that is the only way I know to even touch the menu bar.

scott
Title: Re: Button to call a menu item ?
Post by: Greolt on February 19, 2009, 06:45:36 PM
OK as usual I don't realise the complexity of what I am asking for.   ;D

Not worth that sort of effort Scott.  Would have been nice but not a deal breaker.

Greg
Title: Re: Button to call a menu item ?
Post by: Greolt on February 20, 2009, 04:16:47 PM
Sometimes the answer is close to home.

Local CNCer had the answer.

This code used as a button script,

sendKeys "%(P)V"

Calls the video window.  Works a treat.  :)

Thanks Rod.

Greg

EDIT:  No that one caused problems with Mach somehow.

This one seems to work,  SendKeys "+%(P)V"

Again thanks to Rod.
Title: Re: Button to call a menu item ?
Post by: poppabear on February 21, 2009, 09:44:55 AM
Wow!!!

   Thank you for the pearl!! Learned somthing new!! Now I gotta look closer at SendKeys to see how it would work for other menu items..........

Scott
Title: Re: Button to call a menu item ?
Post by: poppabear on February 21, 2009, 10:58:33 AM
Did a little reading/testing.....

this also works 

SendKeys("%PV") 

Scott
Title: Re: Button to call a menu item ?
Post by: Greolt on February 21, 2009, 06:04:04 PM
Scott

That one screws up the MDI for me like the first variant I posted did.

But adding the + seems to make it work OK,

SendKeys ("+%PV")

Greg
Title: Re: Button to call a menu item ?
Post by: poppabear on February 21, 2009, 08:30:44 PM
MDI??

   I was sending it from inside a Button.........

scott
Title: Re: Button to call a menu item ?
Post by: Greolt on February 21, 2009, 08:54:26 PM
Scott

Sorry there is more than one place this is getting discussed and I did not explain well.

When the button is used it calls the video OK but afterwards the MDI will not work.

What happens is the "Shift to over ride jogging" gets stuck on for some reason. Look on the tab flyout window.

Rod worked out that adding the + symbol (shift key) is a work around.

Greg
Title: Re: Button to call a menu item ?
Post by: poppabear on February 22, 2009, 08:42:22 AM
Where are you getting your list of "Symbols" for the various Keys ? Where does it list that the + symbol is the shift key and stuff??

scott
Title: Re: Button to call a menu item ?
Post by: Greolt on February 22, 2009, 03:50:02 PM
http://www.developerfusion.com/article/57/sendkeys-command/
Title: Re: Button to call a menu item ?
Post by: lelelodi on May 21, 2009, 09:39:48 PM
Hi, thanks for the suggestion, but i have a problem.
Somebody know why the SendKeys ("+%PV") work well with the normal button but doesn't work with image button ?
It's only my problem ? How i can fix it ?

Thank you
Lele
Title: Re: Button to call a menu item ?
Post by: Greolt on May 21, 2009, 10:32:29 PM
Yes I found this also.

Interested to see if someone has an answer.

Greg
Title: Re: Button to call a menu item ?
Post by: lelelodi on May 22, 2009, 07:38:34 AM
I've seen now that work with the double click but not with single...uhm.... ???
Anybody know how i can fix this bug ?

Thank you

Lele