Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 9:28 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: CD - OpenFile
PostPosted: March 11th, 2008, 11:45 pm 
Offline

Joined: December 25th, 2004, 3:31 pm
Posts: 178
Using OpenFile() in script as I wanted to create a publication that will run from CD-ROM and not require installation. I have a problem as the function will not work when reading from CD-ROM.

I expect this has to do with read only of CDs, but I only want to read from text file and not write. Or am I using incorrect code for what I want to to.

Code is below:

Code:
var TextPulled = OpenFile(SYSTEM_PUBLICATION_DIR + "List.txt")
while (TextPulled.EndOfFile() == false)
{
featureArray[i] = TextPulled.ReadLine();
}
TextPulled.Close();


Top
 Profile  
 
 Post subject:
PostPosted: March 12th, 2008, 12:01 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Joseph

could you publish it as 'run as a webpage'?
does the 'Run publication from CDrom only' option help? (Pub Properties >>> Security). That may still require an installation.... I haven't used.

Be interesting to see what solutions others recommend.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: March 12th, 2008, 12:09 am 
Offline

Joined: December 25th, 2004, 3:31 pm
Posts: 178
Thanks Lar,

Got it working now I think, will try it out on a burned CD tomorrow. But works from local read only text file here.


It is not false, false. It is false, true. Great.

var TextPulled = OpenFile(SYSTEM_PUBLICATION_DIR + "List.txt", false, true)
while (TextPulled.EndOfFile() == false)
{
featureArray[i] = TextPulled.ReadLine();
}
TextPulled.Close();


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: No registered users and 14 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