PDF question
FlexibleLearning at aol.com
FlexibleLearning at aol.com
Thu Sep 16 02:58:55 EDT 2004
> What would be the code to open a PDF file (Windows, and Mac) from within
> Revolution?
Solutions for both platforms are in
The Scripter's Scrapbook
www.FlexibleLearning.com/ssbk.htm
as launchURL and isAcrobatInstalled but the skinny is:
case "MacOS"
replace "/" with ":" in tURL
if char 1 of tURL is ":" then delete char 1 of tURL
put quote&"Finder""e into tApp
put quote&tURL"e into tURL
put "tell application"&& tApp &cr&\
"open file"&&tURL &cr&\
"end tell" into tScript
do tScript as AppleScript
if "error" is in the result then put the result into tResult
end if
break
case "Win32"
set the hideConsoleWindows to true
put empty into tApp
if ("NT" is in the systemVersion) then
set the shellCommand to "cmd.exe"
put quote & quote into tApp
end if
get shell("start" && tApp && quote & tURL & quote)
if the result is not empty then put the result into tResult
break
end switch
Hope this helps
/H
Hugh Senior
The Flexible Learning Company
Web: www.FlexibleLearning.com
E: h at flexiblelearning.com
T/F: +44(0)1483.27 87 27
More information about the use-livecode
mailing list