Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 11th, 2025, 12:16 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Action based on existance of text file?
PostPosted: January 6th, 2006, 3:07 pm 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
I'm producing a multimedia that a salesperson will run on his laptop in a meeting with a potential customer.

On the first page of the multimedia, there's two buttons.... "Presentation" and "Customise".

If they click "Customise" (which they'd do before a meeting) they can fill in the customer's name and title. This would be saved to c:/temp/presentation.txt

Then when they're in the meeting, they click on Presentation, and the first screen says "Presentation to Joe Bloggs, Large Financial Organisation"

Fine.

BUT: They might just only have a company name, or no info at all... in which case the first screen would need to be skipped.

I could do this with variables if the customisation was to be done at the same time as the presentation, but it won't be... it'll be done the day before when the salesman is preparing for his meeting.

Can someone point me in the right direction?

Thanks, Linda

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 6th, 2006, 3:40 pm 
Offline

Joined: November 28th, 2004, 6:05 am
Posts: 141
Location: USA
Hi Linda

if(FileExists("c:\\temp\\presentation.txt "))
{
//set variables here
}
else
{
GotoPage("pagename")
}

HTH
Chris

_________________
Opus Resources and Services


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 6th, 2006, 5:04 pm 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
Chris,

Thanks for the prompt response.... brilliant.

I've not done any multimedia work for a couple of months (we had a big video and web project to complete) so I've forgotten too much.... I'll be back with more questions after the weekend!

Linda

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 7th, 2006, 3:56 am 
Offline

Joined: October 26th, 2004, 1:26 pm
Posts: 262
Wow... Linda is still alive and kicking!! Rumours of her being kidnapped must have been false! :lol:

Welcome back Linda... I hope 2006 is a good one for you (and of course all other users & DW). :D

_________________
Cheers,
Steve


Top
 Profile  
 
 Post subject:
PostPosted: January 9th, 2006, 11:59 am 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
Oh yes, alive and kicking!!!

And feeling stupid... I can't get off the ground on this one.

I've got a text input box which stores the inputted text to a variable, name_customer

Then there's a "Confirm" button, the actions of which should save name_customer to a text file.

I'm using the "Write text to file" for the button (right?). What do I type in the "source" box? I tried typing name_customer but that's not working.

Perhaps I've got the wrong action.....

AMENDED.... Yup... wrong action. Now using write to disk file.... I'll just keep talking to myself as ever....

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 9th, 2006, 2:40 pm 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
Chris,

If I've used the "Save to windows temp file" setting in the write to disk file action, then presumably there's a number of places that my text file could be found on different systems.

So I guess that to use your use your "if file exists script" I'd be better off specifying a certain directory.

Is c:/temp good, or would you recommend something else?


Thanks, Linda

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 9th, 2006, 4:58 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Linda

I'm another fan of Opus and use XE 5.14.

If I want to know where the .txt file will be, especially for later copying or deletion, I use the SYSTEM_DOCUMENTS_DIR which will place it in the owner's My Documents directory. Sometimes, I add a folder name as well, in case there will be several files.

I've seen others use SYSTEM_PUBLICATION_DIR since this will store the .txt file where the main .exe itself is installed, likely in Program Files on the C drive.

I suspect our Forum colleagues will have their preferences and rationales and may wish to share these.

Kind Regards,
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: January 9th, 2006, 5:21 pm 
Offline

Joined: November 28th, 2004, 6:05 am
Posts: 141
Location: USA
Hi Linda

You can still use "save to windows temp".
Just modify the script like this

if(FileExists(SYSTEM_TEMP_DIR+"\\presentation.txt "))
{
//set variables here
}
else
{
GotoPage("pagename")
}

HTH
Chris

_________________
Opus Resources and Services


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 10th, 2006, 3:15 pm 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
Chris Jones wrote:
//set variables here


Sorry Chris, I'm more stupid than you thought.... what will I type in to set the variable 'file_name_written' to yes?

(I tried the obvious, but it's not working......)

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 10th, 2006, 4:35 pm 
Offline

Joined: November 28th, 2004, 6:05 am
Posts: 141
Location: USA
file_name_written = "yes"

_________________
Opus Resources and Services


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 46 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