Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 14th, 2024, 7:15 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: GetSelection() question
PostPosted: June 14th, 2006, 8:41 am 
Offline

Joined: November 8th, 2004, 5:23 pm
Posts: 279
Opus: Opus Pro 9
OS: Win 10/64
In the OpusScript Help I found the following description about how to use the GetSelection function:

------------------------------------
GetSelection()

For a Text object named myText containing the value Mr James Smith, use the following syntax:

var selectedArea = myText.GetSelection()

------------------------------------

I have to admit that I do not really understand what this means. Where can I tell the function which string I want to search for?

And a second question: Can I use GetSelection only with text objects or with string variables too?

Thanks in advance for any advice.

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: Re: GetSelection() question
PostPosted: June 14th, 2006, 10:43 am 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
Tarantoga wrote:
Where can I tell the function which string I want to search for?

GetSelection() does not perform a search - it returns an object with the start and end indexes of the current selection.

Tarantoga wrote:
Can I use GetSelection only with text objects or with string variables too?

GetSelection applies only to graphical text objects. To manipulate strings use the string functions - these are documented in the Strings and Global String sections of the help.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: June 14th, 2006, 10:48 am 
Offline

Joined: November 8th, 2004, 5:23 pm
Posts: 279
Opus: Opus Pro 9
OS: Win 10/64
Duncan,

thanks a lot for your advice!

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  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

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