Digital Workshop

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Find and replace
PostPosted: December 31st, 2011, 5:15 pm 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
Hi,

Is it possible to change a set of actions at once.
For the project i need to make 200 actions per player.
For example i have to change all the variables named "SCORE1" in "SCORE2"
and in the scripts i also use variables that must be changes.

I tried Find and replace, but that only works with text.
Do i realy have to change all the variables one by one?

Ad


You do not have the required permissions to view the files attached to this post.

_________________
Opus Pro v9.75
Windows 10 on HP EliteBook i7
http://www.csnmedia.nl


Top
 Profile Visit website  
 
 Post subject: Re: Find and replace
PostPosted: December 31st, 2011, 7:00 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Opus does not have a global replace utility in the Editor to swap out variables the way you describe --- other than to operate on text in scripts (and also a find/replace for text object contents, words, etc).

You can approach this project at least a couple ways:

1) Export your Page and Publication variables. Perform the find/replace operation using some good developer's Editor (e.g., crimson editor, or notepad++). Probably best to Save As different sets in separate files. Then Import those changed sets back into Opus Pages and Publication (variables). Still a bit tedious, but possible to save some time.

2) Think about restructuring your Pub. If you have several Page or Publication variables named as SCORE1, CORRECT1, etc. --- leave those in-place. But then perform transforms in Script Objects, and possibly necessary in Script Actions. By "transforms" I mean, run through a Script that stores your USER7 set of values in the fixed USER1 set: SCORE1 = SCORE7 ; CORRECT1 = CORRECT7;


As a bit of a variation... Mackavi, and others, have posted several examples of code in past discussions about manipulating variable names in scripts using either ARRAYS or by concatenating a varname_ with a numerica suffix (e.g., "varname_" + "07" ;)

3) You could decide to use ARRAY type of variable from the beginning. Then USER1 uses all variables with index 0, USER7 has index 6, etc.
HOWEVER, I think this will NOT serve you very well if you employ Script Actions more than Opusscript and Script Objects.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Re: Find and replace
PostPosted: January 5th, 2012, 9:06 pm 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
Thanks Lar,
I am not that good with Arrays but let's start with your first suggestion.

Ad

_________________
Opus Pro v9.75
Windows 10 on HP EliteBook i7
http://www.csnmedia.nl


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 28 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