Digital Workshop

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Arranging variables in a listbox
PostPosted: March 1st, 2006, 4:16 am 
Offline

Joined: February 5th, 2006, 3:39 am
Posts: 55
Location: Scotland
I hope one of you more experienced users can help me here.
I'm trying arrange a variable in a text box so that it can be read in columns. I have tried a few things but cannot seem to get the lists to line up vertically!

I enclose an imp file. Each text box has a maximum input of 8 characters and a minimum input of 1. These would be alphanumeric.

As I build the list, I would like the info to be spaced so that they would have the appearance of being in columns. Is this possible?

I would be grateful if someone could point me in the right direction.


Many thanks, Jim


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


Top
 Profile  
 
 Post subject:
PostPosted: March 1st, 2006, 7:53 am 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
Hi Synergy

I had a look at your publication and variables.

Unfortunately, I can't for the life of me, figure out what you want in terms of variable output. It looks like a bit of a mess to me.

Anyhow, if you could add an explanitory text box in your publication, it would help fellow Opus users to understand what you want to do.

I've altered your publication and called it maybethis.imp

The variables line up in a text box. Is this what you want?

Graham


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

_________________
Too much coffee can result in frequent toilet breaks!


Top
 Profile  
 
 Post subject:
PostPosted: March 1st, 2006, 9:21 pm 
Offline

Joined: February 5th, 2006, 3:39 am
Posts: 55
Location: Scotland
Totally agree there Graham! I "forgot" to put in an update for the text box.
I have uploaded an ammended file which may be a bit clearer for you all.

I was nearing the end of a 12hr nightshift and my head was pickled!!

hope this ones a bit easier to understand.


Jim


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


Top
 Profile  
 
 Post subject:
PostPosted: March 2nd, 2006, 10:47 am 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
Hi Jim

I've had a quick look and I think I know what you are trying to do.

Unfortunately, I don't have an answer but I do have a possible solution.

Have you thought about using an array variable? It seems you are trying to set up an array of data but how arrays work in Opus is something of a mystery to me.

I've printed out some help pages and whilst I've read them, the proverbial penny has not dropped yet.

The help file explains the following. You'll need to look up the Index for the word 'table" then select "create table". If you look at the example graphic, you get a nice screen picture plus the following text

____________________
Array Element Example

The Text object on the right is going to be used to create a table, 3 columns wide and 3 rows long:
Each object in the table is going to contain one Array Element from the Array variable named score:

When the table is created, it will look like this:
Example 1: What is displayed in Opus Editor
When the user runs the publication, the Array Element in each box is replaced by the value contained in the element:
Example 2: What the user will see
______________________

I'll give your problem more thought Jim but that's all I can come up with at the moment.

Cheers

Graham

_________________
Too much coffee can result in frequent toilet breaks!


Top
 Profile  
 
 Post subject:
PostPosted: March 2nd, 2006, 1:30 pm 
Offline

Joined: February 5th, 2006, 3:39 am
Posts: 55
Location: Scotland
Thanks for having a look Graham. I also do not have any understanding of how an array works but it looks like now might be the time to find out.
I will keep you posted and if I am successful, I will upload a working example!!


Jim


Top
 Profile  
 
 Post subject:
PostPosted: March 3rd, 2006, 7:07 pm 
Offline

Joined: April 1st, 2005, 6:59 pm
Posts: 98
Location: Maastricht, The Netherlands
Opus: V7
OS: Mac OS X 10.7.2 | Windows 8 Dev
System: i5 2.7 | 8G Ram | 1 T HD
Hi,

Perhaps you can use this code, without arrays :

Code:
Listbox.ReplaceSelection(a + " " + b + " " + c " "d)


Change the a,b and c fields for your input fields and an action when the last variable is changed.

Hope this helps

Cheers

Ronnie


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 4th, 2006, 4:12 am 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
Hi again Jim

My son (a programmer living on the Gold Coast) popped in for a few mins and I asked him to tell me about how arrays work. Anyway, one thing led to another and he ended up writing a script and getting what I think you want, to work well.
This publication only uses three input boxes but you could extend it to four quite easily.
It also checks to make sure the inputter has not missed an entry box as well.
Anyway, have a look at the attached and if you have any questions, ask away. I'm not sure I'll be able to answer but can always find the answer out.
HTH
Cheers
Graham


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

_________________
Too much coffee can result in frequent toilet breaks!


Top
 Profile  
 
 Post subject:
PostPosted: March 4th, 2006, 4:42 am 
Graham

Your example is great. For a while now, for me using arrays has been one of those arcane mysteries of life. This sample has gone a long way towards unravelling some of that.

Many thanks to you and your son.


Top
   
 
 Post subject:
PostPosted: March 4th, 2006, 9:00 am 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
On his behalf - Thanks Ray

Except that it is not my work. I explained what I interpreted that Jim wanted and my son took over and basicaly wrote the script on the spot.

As I say, the whole kabang took him less than 20 minutes to nut out and then he added the line that checks to make sure all boxes have been inputted.

Watching him work would suggest that it would really be worth the time to learn scripting as he has done - not specifically Opus script though; he has adopted the principles that govern other types of script syntaxes to how Opus wants its script inputted.

He will be pleased to know he did a good job and that others will find his work useful for their learning.

I'm still mystified by arrays but the concept is slowly taking hold. Thank goodness my kids are much brighter than me. :D

Cheers

Graham

_________________
Too much coffee can result in frequent toilet breaks!


Top
 Profile  
 
 Post subject:
PostPosted: March 4th, 2006, 10:17 am 
Hi Graham

Quote:
Thank goodness my kids are much brighter than me.


Mine too! :D

Ray


Top
   
 
 Post subject:
PostPosted: March 5th, 2006, 10:48 am 
Offline

Joined: February 5th, 2006, 3:39 am
Posts: 55
Location: Scotland
Graham, my thanks to yourself and Wade. You have removed some of the mystery surrounding array variables.

I will use your sons ideas in my publication.

Thanks to alll of you for your help. As you may have gathered, I am not a programmer. My company bought Opus for a totally unconnected project.
I have learned the basics and have been successful in that project.
Unfortunately I suggested that Opus may be able to provide a solution regarding a problem we had. Guess what....... I got the task.

Without this forum and its contributers, this task would be so much more difficult.
One day I hope to be in a position to be able to offer advice and help instead


Until then.......

Thanks,
Jim


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

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