Help me! About Script of Intouch9.5!

chase_perfect

Member
Join Date
Mar 2013
Location
zhongshan
Posts
7
I want to use MessageBox() function in the script.I fill the argument into the function, but when I click the OK button, a WindowMaker warning window popup with the message"Expecting assignment"!
so who can tell me the reason!
Thanks!
 
Look at the example i posted that should guide you to the proper assignment.

MessageBox( Message, Title, Style);
Message -A Message tag or quoted text (example: "This is the message"). This text will be displayed in the body of the message box.
Title -A Message tag or quoted text (example: "Title"). This text will be placed in the title bar of the message box.
Style -An Integer tag or an integer representing the button(s) and icon that will be displayed when the message box is displayed. See below on how to construct this integer.

Rheinhardt
 
Look at the example i posted that should guide you to the proper assignment.

MessageBox( Message, Title, Style);
Message -A Message tag or quoted text (example: "This is the message"). This text will be displayed in the body of the message box.
Title -A Message tag or quoted text (example: "Title"). This text will be placed in the title bar of the message box.
Style -An Integer tag or an integer representing the button(s) and icon that will be displayed when the message box is displayed. See below on how to construct this integer.

Rheinhardt

To Rheinhardt:
I know the MessageBox have several uses, just like the using method with three auguments which you said and the one I mentioned on top!
OK! I just follow you method, but the same error occurred!
So help me! Thank you!

error2.PNG
 
As you can see from this extract of the webpage Rheinhardt provided the Link to, the "Style" argument must be the sum of "Button type" and "Icon Type".

So, from the numbers given in that page you can see that it can never be 1 which you you have set it as,unless no Icon is allowed to be selected by considering "Icon type" as 0.

MessageBox()_Style.gif
 
Last edited:
As you can see from this extract of the webpage Rheinhardt provided the Link to, the "Style" argument must be the sum of "Button type" and "Icon Type".

So, from the numbers given in that page you can see that it can never be 1 which you you have set it as,unless no Icon is allowed to be selected by considering "Icon type" as 0.
I have try to set the Style as 30!But the problem also exist!:confused::confused::confused::confused:o_O
 
I would advise against using the MessageBox function, as it is no longer supported by Windows. I had to eliminate several MessageBox scripts in a customer's application recently when upgrading their HMI computers. SendKeys and NetDDE are also dysfunctional under Windows 7.
 
Bit_Bucket_07:
I try to copy the application from my staff which contain the MessageBox function, and it works with no eeror! But I used the function in my application, the error came up! why?
thank you for your information all the same! I'll use the window that I created to deal with the warning!
If you know the Keypoint, tell me please! thank you!
 
Why do you want to utilize a script in your application that will inevitably become obsolete sooner, rather than later?

Instead, simply add the options that you want to present to the operator with native InTouch objects and make them invisible unless the operator clicks the button that would have triggered the MessageBox script.
 

Similar Topics

Can someone give a clear explanation of the IOSetAccessName for an Intouch Application Script? - Thanking everyone in advance. The setup is 1 No...
Replies
0
Views
1,157
I need to hide/display a lamp by using a script. It says there is a script error but I cannot figure out where the error is. Can some one please...
Replies
7
Views
2,844
Hello I wanna do script python ( if detect color ==> Set memory bit ) WriteMemory(plc,0,1,S7WLBit,True) if 'orange': (0, 140, 255)==1 this...
Replies
5
Views
2,666
code python: import snap7 from time import sleep import struct import snap7.client as c plc = snap7.client.Client() plc.connect("192.168.0.1")...
Replies
0
Views
1,564
When I simulated the program it gives me an error code python(part of main program): if okLeft: #random.randrange(2): resultLeft = "OK"...
Replies
2
Views
1,768
Back
Top Bottom