Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: Tony Bullard on January 12, 2012, 02:37:47 PM
-
I’m using a “OEM Button Pause Preparation Move” in a Feed Hold Sub in a macropump. There are two, Cancel and OK, buttons in the dialog box and I cant seem to find a way to read the return from the call. I read the MachMsg like this:
Ret =MachMsg("Torch Failed to start","Torch",2) ‘2 = Abort, Retry, Ignore buttons .
Any help on how to read this would be appreciated.
OEM Button Pause Preparation Moves 285
OEM Button Pause (remember state) 286
Return to paused state 285
Remember paused state 286
Thanks,
Tony
-
Hi Tony - I'm not entirely sure I understand what you want. If you mean you want to know whether cancel or ok was hit on the prep move box I'm not sure you can.
Your Ret =MachMsg("Torch Failed to start","Torch",2) will just pop up a dialog with the three buttons, abort, retry and ignore and return 3, 4 or 5. but with no connection to the prep move dialog.
Can you explain more - post your code maybe.
Ian
-
Thanks Ian,
I would like to read the return value of the prep move box. The MachMsg line was just an example of how some boxes can be read. I Didn't mean to muddy the waters. I have worked around it but it would be cleaner and easier if I knew if the Cancel button was hit in the subroutine.
As an example if the OK button was hit the next line in the sub may have been "Cycle Start". If Cancel was hit the next line may be Stop and Rewind.
I'll live with it.
Tony
-
listen to me carefully.....I want to tell you something about helicopter ahh!!!!you can buy rc ,too.i would like to see you>>>
------------------------------------------------------------------
Rc Hobby (http://www.hobbycool.com/)|Rc Helicopter Reviews (http://rc-helicopters-reviews.com/)|Rc Helicopter (http://www.rchelicoptershops.com/)