Digital Workshop

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Problem reading data via script from CD in Windows XP
PostPosted: September 15th, 2005, 4:22 pm 
Offline

Joined: November 3rd, 2004, 8:12 pm
Posts: 129
Location: New Brunswick, Canada
Opus: 8.6
OS: Win 8 (ASUS) - Win 7: (ASUS)
System: Asus - Windows 7 - 8 - Intel Core 3 - 4RAM - 16RAM
I have a program that reads data from text files located in a sub folder using the following script. I should add that the folders and files are hidden. The program works correctly when installed to the hard drive on Windows XP, Win2000 and 98.

When the program is placed on a CD-ROM, the program reads the data from the text files correctly on Windows 98 but not on Windows XP and Win2000, the input fields are blank.

I changed the folders and file attributes from hidden to read only and burnt a new CD but Windows XP still does not read the data. I thought it might be a path problem but the programs run fine with hidden folders and files from the hard drive on Windows XP. I should add that I was logged in as administrator on Windows XP and 2000.

I tried programs created with Opus 2.81 and Opus 5.14. All suggestions appreciated?

(The script)
var textObj = OpenFile(SYSTEM_PUBLICATION_DIR+"mc100-1\\mc1-1001.txt");
textObj.GotoFirstLine();
LINE_ONE=textObj.ReadLine(false);
LINE_TWO=textObj.ReadLine(false);
LINE_THREE=textObj.ReadLine(false);
LINE_FOUR=textObj.ReadLine(false);
LINE_FIVE_A=textObj.ReadLine(false);
LINE_SIX_B=textObj.ReadLine(false);
LINE_SEVEN_C=textObj.ReadLine(false);

Thanks,


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

_________________
Leo Taylor
Win XP Home / Opus Pro 7.01 & 6.4 / P4-2.8 / 1.5 GB RAM / ATI All-in-Wonder 9600 /160GB-HD


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 15th, 2005, 5:29 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
As a first guess I suspect you're having a problem attempting to open a file from a read-only medium, but with the Read Only flag not set on the OpenFile().

Try changing
Code:
var textObj = OpenFile(SYSTEM_PUBLICATION_DIR+"mc100-1\\mc1-1001.txt");

to
Code:
var textObj = OpenFile(SYSTEM_PUBLICATION_DIR+"mc100-1\\mc1-1001.txt",false,false);


As to why 98 allows this I don't know - probably because it is more "stupid" than NT based versions.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 15th, 2005, 11:17 pm 
Offline

Joined: November 3rd, 2004, 8:12 pm
Posts: 129
Location: New Brunswick, Canada
Opus: 8.6
OS: Win 8 (ASUS) - Win 7: (ASUS)
System: Asus - Windows 7 - 8 - Intel Core 3 - 4RAM - 16RAM
Duncan,

I changed the script as you suggested (below) but it didn't make a difference. :(

var textObj = OpenFile(SYSTEM_PUBLICATION_DIR+"mc100-1\\mc1-1001.txt",false,false);

Any other ideas?

_________________
Leo Taylor
Win XP Home / Opus Pro 7.01 & 6.4 / P4-2.8 / 1.5 GB RAM / ATI All-in-Wonder 9600 /160GB-HD


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 12th, 2008, 12:03 am 
Offline

Joined: December 25th, 2004, 3:31 pm
Posts: 178
This is same issue as I am having and have tried Duncans solution but does not work.

The same occurs if you make the text file read only via Windows and then try and use with publication. Opus will not open the Readonly text file.


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

Joined: December 25th, 2004, 3:31 pm
Posts: 178
Oh wait, it's the other way around, so it's not false, false. It is false, true.

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  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 40 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group