Break Script

Moderator: Moderator Group

Break Script

Postby Linton9 » Mon May 31, 2010 5:50 am

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
Lynden Gare
GTV Channel 9
Melbourne, Australia
Linton9
 
Posts: 223
Joined: Sun Sep 06, 2009 9:12 am
Location: Melbourne, Australia

Re: Break Script

Postby Julia Foest » Tue Jun 01, 2010 10:07 am

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
User avatar
Julia Foest
 
Posts: 521
Joined: Tue Nov 18, 2008 2:44 pm
Location: Berlin, Germany

Re: Break Script

Postby Linton9 » Tue Jun 01, 2010 11:31 am

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...
Lynden Gare
GTV Channel 9
Melbourne, Australia
Linton9
 
Posts: 223
Joined: Sun Sep 06, 2009 9:12 am
Location: Melbourne, Australia

Re: Break Script

Postby Julia Foest » Wed Jun 02, 2010 4:30 pm

Hi Linton,

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

Best regards,
Julia
User avatar
Julia Foest
 
Posts: 521
Joined: Tue Nov 18, 2008 2:44 pm
Location: Berlin, Germany


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 16 guests