Page 1 of 1

Break Script

PostPosted: Mon May 31, 2010 5:50 am
by Linton9
Hi,

I've created a script which repeats itself using "WDCustomScriptClick,1" at the end of the script.

What I need now is the script to break this loop and stop it from repeating indefinitely.

Cheers
Lynden

Re: Break Script

PostPosted: Tue Jun 01, 2010 10:07 am
by Julia Foest
Hi Linton,

you could do it this way:
Create a normal button (not CS button) and the following node chain: button input node --> script output node.
In the script node, enter:
if Button input value = 1
then "your script list", and as last script [WDButtonClick,'ID'].

As soon as you press the button, the script cycle starts.
To break this routine, there are several possibilities.
1. (pausing the routine): create a CS Button with the script [WDNodeDisableOutput,'NodeID'], to continue the routine, use [WDNodeEnableOutput,'NodeID'].
2. (stopping the routinge): create a CS Button with the script [WDNodeSetParam,'NodeID','ParamID','Value']. With this you can change the Button ID parameter inside the Button Input Node (displayed with the little index 1) to eg. 0, so the script output node won't get a new trigger. To be able to start the routine again via Buttonclick, set the Button parameter ID back to its origin value.

Hope this is not confusing..

Best regards,
Julia

Re: Break Script

PostPosted: Tue Jun 01, 2010 11:31 am
by Linton9
Julia,

Should have mentioned I am using Widget Designer standard, not pro...

So the node related stuff wont work - correct?

Cheers for your response! Hope there's a way without nodes! Keep us posted...

Re: Break Script

PostPosted: Wed Jun 02, 2010 4:30 pm
by Julia Foest
Hi Linton,

sorry, I think you won't do it without WD Pro, I do not have an idea how to..

Best regards,
Julia