Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 10th, 2025, 5:32 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Update a variable from text object on start?
PostPosted: June 14th, 2006, 10:30 am 
Offline

Joined: November 8th, 2004, 5:23 pm
Posts: 279
Opus: Opus Pro 9
OS: Win 10/64
I have a text object in which I write some data in authoring mode.

I put these data into a variable and other functions get data from this variable to execute some other functions in runtime mode.

Unfortunately it seems that the data in the text object are only written into the variable in runtime mode when you press Enter when this object has the focus.

What I like to do is to write the data from the text object into the variable on page start without clicking on it and pressing Enter.

Any idea how to to this?

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 14th, 2006, 10:54 am 
Offline

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

As I learned a few minutes ago is that what I meant in the posting above is rather a text field or a text input box than a text object.

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 14th, 2006, 11:00 am 
Offline

Joined: October 25th, 2004, 12:32 pm
Posts: 397
Location: Digital Workshop
I am not sure I fully follow what you are trying to do. If you want to
preset the text input box without tryping or hitting enter you can set a
value for the varialbe used for the text input in the publication properties
Variables Tab.

Hope this helps

Brenden Knifton ddww


Top
 Profile Visit website  
 
 Post subject:
PostPosted: June 14th, 2006, 11:35 am 
Offline

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

sorry that I had not explained this a bit more detailed.

I have several pages with multiple choice questions with one question on each page. Each question has 5 checkboxes which the user can tick. On each page different checkboxes are correct answers.

What I want to do is simply write the right combinations in a textfield on each page.
For example on page 1: "2,3,5" On page 2; "1,2,4" and so on.

The textfield is only visible in authoring mode.

I do this in this way because it is very easy to see on first sight which answeres are correct. And it is very easy to change these settings without going to Actions and set a variable to do the same.

As there is no textinput in runtime mode the variable in which I store the combination for each page does not update.

So I look for a way to update the variable on each page start automatically with the text from the invisible textfield.

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 16th, 2006, 4:05 pm 
Offline

Joined: December 2nd, 2004, 4:03 pm
Posts: 56
Location: California, (USA)
Opus: Pro 7.6
OS: Vista 64
System: Vista 64, HP, 6GB RAM. Basically "Out of the box" with no special graphics. Very robust.
Tarantoga wrote:
Brenden,

sorry that I had not explained this a bit more detailed.

I have several pages with multiple choice questions with one question on each page. Each question has 5 checkboxes which the user can tick. On each page different checkboxes are correct answers.

What I want to do is simply write the right combinations in a textfield on each page.
For example on page 1: "2,3,5" On page 2; "1,2,4" and so on.

The textfield is only visible in authoring mode.

I do this in this way because it is very easy to see on first sight which answeres are correct. And it is very easy to change these settings without going to Actions and set a variable to do the same.

As there is no textinput in runtime mode the variable in which I store the combination for each page does not update.

So I look for a way to update the variable on each page start automatically with the text from the invisible textfield.

T.


Hi Tarantoga,

My understanding of what you are attempting to do is to enter data into a variable, using a text input box, in Preview mode, and then, later,
also in Preview mode, display the same data when the page is
opened at a later time.

The only way I know to do this in Opus, is to store the variable by writing the variable/data to an external file, and then, later, when the page is opened (On Show, or Preshow), read the same file, and the data into the same variable (or a different variable, if your choose.)

I hope this helps !

Steve Hawley


Top
 Profile Visit website  
 
 Post subject:
PostPosted: June 19th, 2006, 10:07 am 
Offline

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

thanks for your reply. I think you are right.

What is really missing - or at least I have not found it - is the possibility to put the text from a normal textfield into a variable via scripting. Something like:

var newtext = text (mytext) or var newtext = mytext.text

Another way to solve this without scripting could be a new property of text fields which can be marked as "text output". The text of these text fields should be stored with the publication and should write their texts into a user defined variable on startup.

Maybe I overlooked something and putting text from a normal text field into a variable can be done via scripting though. If so I would be glad If someone could tell me how to do this.

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 19th, 2006, 10:58 am 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
Tarantoga wrote:
What is really missing - or at least I have not found it - is the possibility to put the text from a normal textfield into a variable via scripting.

Look at SetSelection() and GetSelectionText() in the script help. This will allow you to retrieve the text from any text object.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: June 19th, 2006, 11:11 am 
Offline

Joined: October 25th, 2004, 12:32 pm
Posts: 397
Location: Digital Workshop
Please take a look at the attached example:


Regards

Brenden Knifton ddww


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


Top
 Profile Visit website  
 
 Post subject:
PostPosted: June 20th, 2006, 11:43 am 
Offline

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

thank you very much. This is exactly what I was looking for :D

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

All times are UTC [ DST ]


Who is online

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