Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 11:41 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Checking if an object exists?
PostPosted: June 26th, 2006, 4:02 pm 
Offline

Joined: November 8th, 2004, 5:23 pm
Posts: 279
Opus: Opus Pro 9
OS: Win 10/64
Is it possible to check if a certain object exists via opus script? I have some scripts e.g. for checking checkboxes and radiobuttons. On some pages I have 5 radiobuttons on others only 3 or 2.

When checking the button states via script I naturally get an error message when one of the buttons which the script checks is not on the current page.

So I like to check first if the buttons exists and start the check function only if this is the case.

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: June 26th, 2006, 5:04 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
If you put all of your objects in a frame you could then use the following to determine how many objects are on that particualr page.

Code:
var numOfChildren = framename.GetNumberChildren();


And use the numOfChildren as a counter for your other scripts, and that way it would cycle through as many as you needed.

Code:
for (x=0;x<numOfChildren;x++)
{
...
}

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


Top
 Profile Visit website  
 
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 45 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