Hello Guest it is July 21, 2019, 05:39:45 AM

Author Topic: Wizard and VB Script questions (Brian Barker)  (Read 14598 times)

0 Members and 1 Guest are viewing this topic.

Re: Wizard and VB Script questions (Brian Barker)
« Reply #30 on: January 23, 2006, 09:40:06 AM »
Hi Brian

I am so sorry about my ignorant comment about the size of the input field, I just had a quick look at it this morning. I don't mean to be full of crap. It seems like I was still asleep.
I do apologise.

Thanks
Deon
If A is a success in life, then A equals X plus Y plus Z.
                               Work is X: Y is play and Z is keeping
                                                             your mouth shut.
Re: Wizard and VB Script questions (Brian Barker)
« Reply #31 on: January 23, 2006, 10:38:45 AM »
No problem I do it all the time :)

How is the new logic working for you?
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Wizard and VB Script questions (Brian Barker)
« Reply #32 on: January 23, 2006, 12:33:16 PM »
Hi Brian

Well I am so glad to see you are a softy at heart that can look beyond someone else's mistakes .......THANKS.

I am still busy figuring it out.......I managed to sort out the YES Button. It now allows me change a field.... then it auto updates that DRO and carry on with the processing of the script.

I have not been successful with the NO button as yet, but I am working on it. At the moment it is aborting the processing of the script. What I am actually trying to accomplish is for it to cancel the warning and to continue with processing the script.
This is what I added to auto update the DRO.


If  Tool = 0 Then
    Button = MsgBox("Possible wrong Tool!!!!! Would you like to change it???",4,"Lathe program error...")
   If Button = 7 Then
   Exit Sub
   End If
   X = Question("Enter New Tool Number")
   Call SetUserDRO(1092,X)
   End If
   If Button = 6 Then
   End If

This is how far I am but I will keep on trying until I crack it.

Will let you know when I succeed.

Thanks
Deon

If A is a success in life, then A equals X plus Y plus Z.
                               Work is X: Y is play and Z is keeping
                                                             your mouth shut.
Re: Wizard and VB Script questions (Brian Barker)
« Reply #33 on: January 23, 2006, 08:43:25 PM »
Here you are:

If  Tool = 0 Then
    Button = MsgBox("Possible wrong Tool!!!!! Would you like to change it???",4,"Lathe program error...")
   If Button = 6 Then 'Button = 6 when you press the "yes" button
   X = Question("Enter New Tool Number")
   Call SetUserDRO(1092,X)
End If
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Wizard and VB Script questions (Brian Barker)
« Reply #34 on: January 24, 2006, 03:09:38 AM »
Hi Brian

EUREKA!!!!!!! Finally I think I've cracked it. I tried yours but it gave me a script error not on your part but right at the end of the complete script......End Sub. I'm not sure why?

In playing and shuffling it around I managed to get it working as I want it to. This is the changes I made......It may be a longer way or not a standard way but it works!!!!!!!

If  Tool = 0 Then
    Button = MsgBox("Possible wrong Tool!!!!! Would you like to change it???",4,"Lathe program error...")
   If Button = 7 Then
   End If
   If Button = 6 Then
   X = Question("Enter New Tool Number")
   Call SetUserDRO(1092,X)
   End If
End If


Just a word of encouragement to all out there that really would like to try his hand at making his own wizard, please go ahead and try.
Have a look at other wizards and try. It really is fun and satisfying. Like they say ,if at first you fail, try and try again.

There will always be someone on the forum willing to help. I personally knew nothing when I started out.

Once again Brian Thanks for the patience and help. Talk to you again soon.

Deon
If A is a success in life, then A equals X plus Y plus Z.
                               Work is X: Y is play and Z is keeping
                                                             your mouth shut.