PDA

View Full Version : Read me file



Slobey
03-23-2005, 12:29 PM
Hi everyone,

I tried to find a thread with this topic and was unsuccessful. I am a newbie to this forum and to Setup Factory.

What i am trying to do is add a dialog (Ithink) after installation that will ask the user if they would like to view the readme file. And if he picks yes, then launch it. The user manula and help, show some examples but not how and where I should put them.

Any help would be greatly appreciated, and I apologize if I am asking a dumb question.

Mike

Adam
03-23-2005, 02:33 PM
You may be better off using a "checkbox" screen to accomplish this task. regardless here is a script that should get you started for the dialog type:



result = Dialog.Message("Notice", "Would you like to read the file", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);
if result == IDYES then
File.Open("C:\\file.ext", "", SW_SHOWNORMAL)
else
-- do nothing or perhaps do something else
end


Adam Kapilik

Jason Pate
03-23-2005, 03:43 PM
IT could look something like this.


resultYN = Dialog.Message("Read Me", "Would you like to Read the read me file?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1) --Display Dialog I picked Yes/No Dialog other might work too
if resultYN == 6 then --6 is the return for Clicking YEs
Shell.Execute(_SourceFolder.."\\readme.txt", "open", "", _SourceFolder, SW_SHOWNORMAL) --Open a file
end


Also you could use Elseif to do another test to no another action.

Slobey
03-23-2005, 04:51 PM
Thanks guys that helped alot.