Digital Workshop

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Scripting 'if' question
PostPosted: May 13th, 2015, 4:47 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
I want to check four variables to see if they contain anything and then do something if they do, and don't.
Right now I have four if/else statements. Is there a better way? The actions for if value is null are different than the actions on if the variable has something in it.


If (){
}
else {
}
If (){
}
else {
}
If (){
}
else {
}
If (){
}
else {
}

It turns out I had a return false; at the end of each if statement, so that's why it only ran once. :oops:

Thanks!

_________________
Opus Pro XE 9.1 Win7 64-bit Core i3 8MB RAM


For this message bwpatric has been thanked by : mackavi


Last edited by bwpatric on May 13th, 2015, 7:08 pm, edited 2 times in total.

Top
 Profile Visit website  
 
 Post subject: Re: Scripting 'if' question
PostPosted: May 13th, 2015, 5:21 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Have a look at the Opus Script Help>Syntax: Switch Case. This may be what you are looking for.

HTH

_________________
Stephen


For this message Stephen has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 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