Source language: Translate to:

Variables OR Database...Help

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Variables OR Database...Help

Postby dbmike » Sun Nov 26, 2006 3:39 pm

I am trying to set up a small program that will require numbers (miles and money) to be entered into list boxes.
Then click on a caluclate button. The product will display "in" 2 other list boxes.
Example of "on click":


There will be a total of 3 fill in list boxes and 2 list boxes that will display the answers (products).
I am not sure this should be set up (if possable) using variables OR to
use a database. Any help / ideas will be used as I need to get this done A.S.A.P.
Thanks in advance...
Posts: 3
Joined: Sat Dec 10, 2005 4:43 am
Location: Michigan, USA

Postby Gaev » Sun Nov 26, 2006 5:00 pm


Welcome to the forum.

Since I am not aware of your technical background, I am not sure whether the added complexity of working with databases is going to mesh with your urgency in developing this.

If you are comfortable with databases (records, fields etc.), the dbfShowTable command will save you a lot individual NeoBook commands vs. displaying items in multiple ListBoxes ... and keeping them in Sync.

With the database approach, you could display the Table view (dbfShowTable ; ReadOnly mode) ... and as the user navigates from record to record, you could display the contents of the fields in the "Current Record" in TextEntry boxes (i.e. the ones user can change) ... and a button that does the calculations and updates other fields in the database with the answers ... that way, a user can see the various sets of data like in a SpreadSheet.
User avatar
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby virger » Sun Nov 26, 2006 5:11 pm


A) Option
1) How many LINES or items per List ?
2) I use a File_money, File_Miles1 and File_Miles2
3) Usings a LOOP read the lines to make the calculation
1) Whenever digito a data it control to file/listbox
2) The file/listbox, has the result

Input [Money]
Input [Miles1]
Input [Miles2]
file1/listbox1: [money] ~ [miles1] ~ [miles2]
file2/listbox2: math "[money]/[miles2]" ~ math "[money]/([miles1] + [miles2]"


Gdo From Costa Rica "Pura Vida"
User avatar
Posts: 510
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Postby virger » Sun Nov 26, 2006 5:24 pm



filelen "[pubdir]Sum.Txt" "[ln]"
loop "1" "[ln]" "[c]"
fileread "[PubDir]Sum.Txt" "[c]" "[dt]"
strparse "[dt]" "~" "[m]" "[x]"
math "[m1]/[m2]" "2" "[r1]"
math "[m1]/([m2]+[m3])" "2" "[r2]"
math "[st1]+[r1]" "2" "[st1]"
math "[st2]+[r2]" "2" "[st2]"
delay "500"

Gdo Again....
Pura Vida
User avatar
Posts: 510
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest