Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 15th, 2024, 5:20 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Simple Arithmetic Script
PostPosted: July 7th, 2006, 9:21 am 
Offline

Joined: November 28th, 2005, 2:37 pm
Posts: 8
Location: North Hampshire UK
Hello,
I am working on a presentation, part of which is to demonstrate a simple stock management system. I know I could use 'doc view' and go off into Excel and make my life easier, but I would like to keep it within OPUS so that I can make it look 'sexier' and also improve my knowledge of this software.
At base level I have three text input boxes, A, B and C, where A = A stock holding figure, B = Actual stock and C = An order quantity generated based on A - B.
I found an example on here yesterday which multiplied the value in one text box by the value in another and printed the result in a third. I adapted this and it worked well using 'Set Variable to Expression'. However, I would quite like to know how to script this, as I am getting into scripting now, and I would also like the value that appears in C to show as a result of entering a figure in B and then pressing 'enter' so that the cursor does not appear, and stay, in box C (as happens at present).
My hope is that if I can get my head around how this simple(?) bit works, I can adapt it to some of the more complex components I want to demonstrate.
Many thanks in advance for any forthcoming assistance.


For this message John Brackenborough has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: July 7th, 2006, 12:42 pm 
Offline

Joined: October 25th, 2004, 12:32 pm
Posts: 397
Location: Digital Workshop
John,

Please take a look at the attached example, this should help you on your way. When displaying a result it is best to create a standard text object, not a text input box to display the data.
Create a standard text object and then with the cursor flashing in the text object right mouse click on the text object and select insert Variable or Expression from the drop down menu.

Hope this helps

Regards

Brenden Knifton ddww


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


For this message Brenden Knifton has been thanked by : mackavi


Last edited by Brenden Knifton on July 10th, 2006, 9:06 am, edited 1 time in total.

Top
 Profile Visit website  
 
 Post subject:
PostPosted: July 10th, 2006, 8:45 am 
Offline

Joined: November 28th, 2005, 2:37 pm
Posts: 8
Location: North Hampshire UK
Brendan,
Thank you very much. I knew that 'unlocking' the principal of this was all that was needed and it works a treat. It has also opened up other possibilities. I have only used script so far to move graphical objects around as I am not particularly mathematical, but within an hour I was getting buttons to trigger multi-arithmetic functions and all sorts! Great stuff.


For this message John Brackenborough has been thanked by : mackavi


Top
 Profile  
 
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: Google [Bot] and 6 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