Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 10:42:25 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Remember state return
Pages: 1   Go Down
Print
Author Topic: Remember state return  (Read 166 times)
0 Members and 1 Guest are viewing this topic.
Tony Bullard
Active Member

Offline Offline

Posts: 83


View Profile
« 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


* Prep Moves.png (3.44 KB, 199x309 - viewed 6 times.)
Logged
stirling
Global Moderator
*
Online Online

Posts: 1,190

UK


View Profile WWW
« Reply #1 on: January 14, 2012, 11:47:57 AM »

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
Logged
Tony Bullard
Active Member

Offline Offline

Posts: 83


View Profile
« Reply #2 on: January 14, 2012, 01:20:08 PM »

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
« Last Edit: January 14, 2012, 01:23:05 PM by Tony Bullard » Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!