Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 11th, 2024, 8:16 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: How to stop actions?
PostPosted: April 12th, 2006, 3:50 pm 
Offline

Joined: November 8th, 2004, 5:23 pm
Posts: 279
Opus: Opus Pro 9
OS: Win 10/64
I have put a script and some actions into a button. The script is in the first place of the actions order. What I like to do is to stop the actions for this button if the script finds some conditions which I check within an if statement.

Is there a command like stop() or break() or something which stops the script and prevents that the following actions are executed?

Thanks in advance for any hint.

T.

_________________
Opus Pro 9.75, Win 10/64, 8 GB RAM, Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz (4 CPUs), ~3.4GHz, NVIDIA GeForce GTX 660 Ti, Roland OctaCapture


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 12th, 2006, 5:41 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
Put the subsequent actions in an If action, dependent on a variable set in the script checking.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 13th, 2006, 5:36 pm 
Offline

Joined: December 14th, 2004, 5:08 pm
Posts: 55
Location: Holland
Opus: version 8.0
OS: XP, Vista, Windows7, Windows8
System: Intel Corei7-2600 CPU 3.400GHz
Put the following between script lines
break
or
return


Cheers


Top
 Profile  
 
 Post subject:
PostPosted: April 13th, 2006, 10:25 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
I'm afraid neither of those will work in this case - or indeed at all in the way you seem to be suggesting.
break provides a way to escape early from a loop (i.e. for or while loops). return returns a value from a function. Calling either outside of those uses will result in undefined behaviour and will not prevent any subsequent Opus actions being called. Script cannot directly affect standard actions; only by interaction with page/global variables.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject: script - break...
PostPosted: April 18th, 2006, 7:21 pm 
Offline

Joined: December 22nd, 2004, 10:00 am
Posts: 28
Opus: Opus Pro 7.5
OS: Windows 7 32 bit on BootCamp
System: MacBook Pro, 3 GBytes RAM, Core2Duo T8300@2.4 GHz,
Hello Tarantoga,

here's my view on your issue:

You currently have :

Script
{ bla bla bla
}
Action 1 (e.g. show image1)
Action 2 (e.g. show image2)

So everytime the button is pressed, all the above are executed.
You need the following:
Script
{bla bla bla
but if a condition is met
then stop here
}
Action 1 (not executed)
Action 2 (not executed)


What I would do is:

Script
{bla bla bla
if condition is met (e.g. if x=2)
then set variable actionstop = true
}

If actionstop = false then
Action 1
Action 2
Else (nothing)

I think that this was suggested by Duncan Lilly, only I elaborated a bit!

Hope I got it right!


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 20th, 2006, 12:14 pm 
Offline

Joined: November 8th, 2004, 5:23 pm
Posts: 279
Opus: Opus Pro 9
OS: Win 10/64
Thank you very much for your suggestions.

I think a stop command for all actions could be useful. Maybe this is an idea for the wishlist?

Thanks again.


T

_________________
Opus Pro 9.75, Win 10/64, 8 GB RAM, Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz (4 CPUs), ~3.4GHz, NVIDIA GeForce GTX 660 Ti, Roland OctaCapture


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group