Indigo Rose Software

Go Back   Indigo Rose Software Forums > Old Versions > AutoPlay Media Studio 6.0

Reply
 
Thread Tools Display Modes
  #1  
Old 09-22-2005
Jonas DK's Avatar
Jonas DK Jonas DK is offline
Forum Member
 
Join Date: Jul 2004
Location: Denmark
Posts: 282
Huh? how to save variables in text file???

Hi can anyone help with an idea for this...

I have a project where the user can save and load a profile.
the profile is to consist of different things:
answered questions, menu settings and time the program have been used.

I can set all this in run time, I can load a file and save a file.

But how do i save all these different things in a file that i can load for next time I use the app.?

I can get the ams app to save the variables one by one in the text file, but I cant work out how to load them again so that they work...

Jonas DK
Reply With Quote
  #2  
Old 09-22-2005
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
hi. The easiest is probably to use a table. As for restoring the data just create an arbitrary data grid, i.e.

item #1 = First Name
item #2 = Last Name
item #3 = Font Color
item #4 = Font Face
item #5 = Start Page

And so forth. You can write the table to a text file using the TextFile.WriteFromTable action, and you can read it back in using the TextFile.ReadToTable action. Restoring values is simply a matter of walking through your data and acting on each entry accordingly.
Reply With Quote
  #3  
Old 09-22-2005
Jonas DK's Avatar
Jonas DK Jonas DK is offline
Forum Member
 
Join Date: Jul 2004
Location: Denmark
Posts: 282
Smile

Quote:
Originally Posted by Corey
hi. The easiest is probably to use a table. As for restoring the data just create an arbitrary data grid, i.e.

item #1 = First Name
item #2 = Last Name
item #3 = Font Color
item #4 = Font Face
item #5 = Start Page

And so forth. You can write the table to a text file using the TextFile.WriteFromTable action, and you can read it back in using the TextFile.ReadToTable action. Restoring values is simply a matter of walking through your data and acting on each entry accordingly.
Sorry Corey
but Im a bit dumb when it comes to this, I am not a programmer but I have learnt to control a lot of the functionallety in AMS but I'm afraid that it has been a very long time since I last used it, so what you are saying makes as good as no sence to me..

would it bee to much to ask to have it cut out in big shine letters, so even a preschool student could understand. I looked in the help files under tables but that is just as cryptic, the thing is if I can just see the funtionallety i can get it to make sence.. if you understand what I mean...

cheers,
Jonas DK
Reply With Quote
  #4  
Old 09-22-2005
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Hi. Sorry, I don't have time this week to build it for you but I'll be happy to assist you build your own. It's not that hard once you get in there and start messing around with the code. Give it a shot and let us know whenever you come across any specific obstacles and we'll help you through them.
Reply With Quote
  #5  
Old 09-22-2005
Jonas DK's Avatar
Jonas DK Jonas DK is offline
Forum Member
 
Join Date: Jul 2004
Location: Denmark
Posts: 282
Quote:
Originally Posted by Corey
Hi. Sorry, I don't have time this week to build it for you but I'll be happy to assist you build your own. It's not that hard once you get in there and start messing around with the code. Give it a shot and let us know whenever you come across any specific obstacles and we'll help you through them.
Hi Corey
Thanks. I dident mean for you to build it for me. I just wantet some poiters on how to get going with the tables. If i see the bit in action I can figure out the rest.

I tried to set it up from one of the templates I've attached it here, in cluded the xml quiz example (witch is why I ask if you could replace the test with png's..) the text is in danish but I think you can get the idea.

Student create a profile on first start up that will remember what they have been through so they can take tests acordingly.
nice...

But I'll try fidling about with the tables and when I think I got it I'll post the code..

cheers for the help,
Jonas DK
Attached Files
File Type: apz student e-learning.apz (79.8 KB, 39 views)
Reply With Quote
  #6  
Old 09-22-2005
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Hi, for a great introduction to Tables click on "- Tables : An Easy Explanation [8:12] (Click here to view this video now!)" on this page:
http://speedytraining.com/site/cd3.php
Reply With Quote
  #7  
Old 09-23-2005
Jonas DK's Avatar
Jonas DK Jonas DK is offline
Forum Member
 
Join Date: Jul 2004
Location: Denmark
Posts: 282
Quote:
Originally Posted by Corey
Hi, for a great introduction to Tables click on "- Tables : An Easy Explanation [8:12] (Click here to view this video now!)" on this page:
http://speedytraining.com/site/cd3.php
fantastic... that was exactly the push I needed... thanks Corey

Isent it posible to get the training videoes by email dilivery like ams?
I can only see an option to buy the cd set, but that takes ages to get to me....



Jonas DK
Reply With Quote
  #8  
Old 09-23-2005
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Hi. No sorry there isn't an ESD option available for the 5.0 CDs. The new training videos will be downloadable, but it's going to be a few months until there are the same number of training videos available for 6.0 as there are for 5.0. I'll be putting them out one module at a time starting pretty soon. FWIW Most of the stuff on the 5.0 CDs is directly applicable to 6.0, especially all the stuff on scripting.
Reply With Quote
  #9  
Old 09-23-2005
Jonas DK's Avatar
Jonas DK Jonas DK is offline
Forum Member
 
Join Date: Jul 2004
Location: Denmark
Posts: 282
Wink

cool
I now have this in my page on.show
PHP Code:
Profile = {Name="John"test2="test3"test3="end"}; 
And on the projects on.menu I have this

PHP Code:
....
elseif 
e_ID == 103 then
HomeFolder 
Shell.GetFolder(SHF_MYDOCUMENTS);
strName Dialog.Input("Navn""Skriv dit Navn""JaneDoe"MB_ICONINFORMATION);
strFolder Dialog.FolderBrowse("Hvor skal din profil gemmes?"""..HomeFolder);
TextFile.WriteFromTable(strFolder.."\\"..strName..".ele"Profile(), false);
.... 
But when I try to run it... when i Save i get an error telling me Im trying to call a Global Profile (table)

What did I mis?

(btw It would be nice if the forum CODE box colour coded like the PHP one does...)
Jonas DK
Attached Images
File Type: jpg error.jpg (50.7 KB, 30 views)
Reply With Quote
  #10  
Old 09-23-2005
csd214 csd214 is offline
Forum Member
 
Join Date: Oct 2001
Location: Norway
Posts: 939
Quote:
Originally Posted by Jonas DK
I can only see an option to buy the cd set, but that takes ages to get to me....
“ages” might be equal to 8,640 min.

Look at this thread posts #22 & 24
Reply With Quote
  #11  
Old 09-23-2005
Jonas DK's Avatar
Jonas DK Jonas DK is offline
Forum Member
 
Join Date: Jul 2004
Location: Denmark
Posts: 282
Quote:
Originally Posted by csd214
“ages” might be equal to 8,640 min.

Look at this thread posts #22 & 24
We shall see... I just ordered the set CD's this morning (local time)
Reply With Quote
  #12  
Old 09-23-2005
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Thanks for the support, I hope you find lots of value in them.
Reply With Quote
  #13  
Old 09-23-2005
Jonas DK's Avatar
Jonas DK Jonas DK is offline
Forum Member
 
Join Date: Jul 2004
Location: Denmark
Posts: 282
Quote:
Originally Posted by Corey
Thanks for the support, I hope you find lots of value in them.
well if the rest is as good as the one you showed me... I wouldent expect less...
Reply With Quote
  #14  
Old 09-23-2005
Jonas DK's Avatar
Jonas DK Jonas DK is offline
Forum Member
 
Join Date: Jul 2004
Location: Denmark
Posts: 282
Huh?

So now I have created the table but I keep getting an error trying to save it to file....
PHP Code:
elseif e_ID == 103 then
HomeFolder 
Shell.GetFolder(SHF_MYDOCUMENTS);
student.name Dialog.Input("Navn""Skriv dit Navn""JaneDoe"MB_ICONINFORMATION);
student.folder Dialog.FolderBrowse("Hvor skal din profil gemmes?"""..HomeFolder);
TextFile.WriteFromTable(student.folder.."\\"..student.name..".ele"student(), false); 
something about the table not being defind right... see attached error

is it something about not defining the indevidual strings in the table?
Attached Images
File Type: png errorTable.png (22.9 KB, 13 views)
Reply With Quote
  #15  
Old 09-23-2005
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Hi. Try adding this before your code and see if it works:

student={};

Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Example: Loading Paragraph Text Using a Timer Jonas DK AutoPlay Media Studio 5.0 Examples 7 11-25-2004 06:10 PM
Writing Text to a File Desmond AutoPlay Media Studio 5.0 Examples 0 09-22-2003 03:02 PM
HOWTO: Create a Project Template Support AutoPlay Media Studio 4.0 Examples 0 10-28-2002 02:49 PM
Text File Actions csd214 Setup Factory 6.0 0 12-06-2001 01:50 AM
Install only into one of several directories with specific existing file? RichardShaw Setup Factory 5.0 0 08-17-2000 03:29 PM


All times are GMT -6. The time now is 04:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software