Sign in to follow this  
Followers 0
PdL

CX-Supervisor 2.0 Script "display" command

7 posts in this topic

Trying to use the display command in a CXS 2.0 script to display a page: display("page") but I get the following error: This is both in VB script and in CX-Supervisor script mode. In CXS 1.3 this command works fine. Running CXS 2.01 (1). Is there any other way to open a page by script ? Am I doing something wrong ?

Share this post


Link to post
Share on other sites
I have just tried to do the same thing - no error displayed. Also have cx-s 2.01 on vista ultimate. the script, on the push button object is: display("ALARMS") and cx-supervisor script radio button is checked. as I said, the script interpreter reports no error - after clicking OK everything is ok. I start the runtime, click the button and it works, the page ALARMS is open. Hm, what could be the problem Pim? WAIT... here is the problem. if I write script display("ALARMS") and THEN check the radio button CX-Supervisor script I get following script: @VBSCRIPT display("ALARMS") @ENDSCRIPT then in runtime I get the error message like you have. when I delete the @VBSCRIPT and @ENDSCRIPT there is no error in runtime. obviously they put VB Script to be default but the CX-Supervisor Script radio button invokes @VBSCRIPT and @ENDSCRIPT which marks start and the end of VB Script. probably a little bug. if you FIRST check CX-Supervisor Script radio button AND THEN write the script it will work. Edited by tashinz

Share this post


Link to post
Share on other sites
Thanks Zoran You're right, it seems the 2 radio buttons work exactly opposite of what they should do - they need to swap the buttons text and then it all works fine ? In V1.3 it is the same, only it seems the initial default script mode in V2.0 has been set on VB Script instead of CX-Supervisor! Nice one Omron devvers!

Share this post


Link to post
Share on other sites
Radio buttons seem to work properly on my machine. Are you missing the point that when you change from VBScript to CX-Supervisor script the editor wraps up any exising VBScript in the @VBSCRIPT / @ENDSCRIPT so that it will still work? That good isn't it? The CX-Supervisor script would go outside the tags - then the radio buttons make sense don't they? Bertie

Share this post


Link to post
Share on other sites
yes, good idea, only the @VBSCRIPT / @ENDSCRIPT wraps existing CX-S script. maybe it is better to insert something like @VBSCRIPT insert VB Script code here... @ENDSCRIPT and existing CX-S script to be outside of this. also, when first script editor is opened, the default is VB Script but no @VBSCRIPT / @ENDSCRIPT. Edited by tashinz

Share this post


Link to post
Share on other sites
Is it existing CX-Supervisor script if the radio button was on VBScript? Surely it was existing VBScript? That's the way I think of it and that seems to make sense. This seems to work when all old scripts are marked as 'CX-Supervisor Script'. The only confusion I see here is if you start a NEW script, with the default to VBScript and then start writing CX-Supervisor script, and only at the end click 'CX-Supervisor Script' - hence the editor tries to wrap. Of course if you select the radio button before typing there's no confusion.

Share this post


Link to post
Share on other sites
I agree, also I think that the CX-Supervisor should be default script. user should change it on general preferences.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0