Digital Workshop

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: A Script to change the Variable name of a text box
PostPosted: February 1st, 2007, 1:32 am 
Offline

Joined: January 23rd, 2006, 6:23 am
Posts: 23
Location: Hollywood
Concerning Opus Pro 5, I'm trying to find a script statement that changes the name of the variable (not just the contents of the variable) of the variable used for the text input of a text box. I searched through the Opus User Guide and the Opus Script Reference manual and found nothing that would do it.

The reason why I need the script is so I can change the text input variable of a text box before it is cloned so that each cloned text box has its own separate text input variable.

It would look somthing like this:

NameOfTextBox.ReplaceInputVariable(NameOfNewVariable)

But I can't find a function like "ReplaceInputVariable.


Top
 Profile  
 
 Post subject:
PostPosted: February 1st, 2007, 2:25 am 
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
Hi

As previously stated, I'm no expert at scripting. So, I hope another forum member who is, provides additional leads.

Until others reply:

I would check the scripting guide re: SetSelection and ReplaceSelection for text. Perhaps, this will take you in the right direction.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: February 1st, 2007, 11:26 am 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
I'm afraid what you are attempting is not possible. You cannot change a variable within a text item in that way.

However, I would come at the problem an entirely different way. Just have a single text input box and copy the entered values into an array of answers whenever the OK button (or whatever) is pressed. That way you are only limited by the number of questions you have.

If you really want multiple items then it would be better to work the other way round; rather than creating items on the fly; create enough to cover your needs, assign a variable to each and then hide the ones currently not required.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 1st, 2007, 12:38 pm 
Offline

Joined: January 23rd, 2006, 6:23 am
Posts: 23
Location: Hollywood
I believe Stephen suggested using the limited number of boxes. But, unfortunately, my situation could call for 2 boxes or as many as several thousand boxes or more.

Now that I know that it won't work with text boxes. I will stop wasting time on boxes and research using list items.

Thanks for helping me through the boxes thing.


Top
 Profile  
 
 Post subject:
PostPosted: February 1st, 2007, 4:04 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
mysecondproject wrote:
But, unfortunately, my situation could call for 2 boxes or as many as several thousand boxes or more.

Which is why I would suggest that you use a single text box that you change the question text above and store each result into an array. What are you trying to achieve - I cannot imagine a situation in which a user would spend the hours/days required to fill in thousands of text boxes?

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 2nd, 2007, 8:58 pm 
Offline

Joined: January 23rd, 2006, 6:23 am
Posts: 23
Location: Hollywood
Actually the clicking of the text box is just for the test. In the actual application it will be a counter that will be causing the new variable names and cloned boxes to be created. The counter value could be up to two-thousand and more, or a few as one or two.

I wrote a game on Opus Pro 5 which takes actor's dialog lines from a Microsoft Access *.mdb file and displays the dialog lines on the computer monitor. Each *.mdb file is a separate story script. Each file could be as short as a 3-line joke or could be as long as a two-thousand-line books-on-tape of "War and Peace". The game is like a teleprompter with cued music and effects. (It's at www.dramaoke.com if you're curious).

The game works fine, but the problem is that the users are not writing or editing their own scripts because they don't want to bother learning Microsoft Access (or a lesser program that edits *.mdb files).

So, I'm trying to add an editor page in the game so that the user can go to that editing page and edit his or her own scripts. The editing page will contain separate text input boxes corresponding to the data in the *.mdb script file. But the number of boxes is different with each script.


Top
 Profile  
 
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: No registered users and 43 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