Launching Acrobat twice
Ken Ray
kray at sonsothunder.com
Tue Apr 9 12:03:01 EDT 2002
Thanks, Mark!
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: "Mark Luetzelschwab" <luetzm at texasreading.org>
To: <metacard at lists.runrev.com>
Sent: Monday, April 08, 2002 9:38 AM
Subject: Re: Launching Acrobat twice
>
> Hi Ken, (and others)
>
> This is the end result - it seems to work quite well on 2000 and 98.
> Quite a bit simpler than using query registry, etc. Works for any
> kind of file *that is properly associated with an application*.
>
> I still have to add the error handling in case I get an error from
> the shell script.
>
> Both mac and PC code are here - the mac uses AppleScript
>
>
>
> function system_OpenFile filePath
>
> if there is a file filePath then
> switch the platform
> case "Win32"
> # hide the console window so you don't get the flashing black box
> set the hideConsoleWindows to true
>
> # important - strip the quotes, or the shell wont deal with it
> replace quote with empty in filePath
>
> # make the path a DOS path (ah, the wonders of windows)
> # then make a "start filename" shell script
> # funny thing is, shell doesn't seem to mind the / instead of the \
> put "start"&&shortFilePath(filePath) into sCommand
>
> put shell(sCommand) into sError
>
> break
> case "MacOS"
>
> # convert the MC file path to a mac path
> replace "/" with ":" in filePath
> if char 1 of filePath is ":" then delete char 1 of filePath
>
> # tell the finder to open it.
> put "tell application " & quote & "Finder""e&" to open file
> ""e&filePath& quote into tScript
> send tScript to program "Finder" with "sysodsct"
>
> put the result into sError
> break
> end switch
>
> else
> put "error_file_not_found" into sError
> end if
> return sError
>
> end system_OpenFile
>
> >
> >Mark,
> >
> >How are you launching Acrobat? You mentioned the registry, but can you
post
> >the code?
> >
> >Thanks,
> >
> >Ken Ray
> >Sons of Thunder Software
> >Email: kray at sonsothunder.com
> >Web Site: http://www.sonsothunder.com/
>
> --
> Mark J. Luetzelschwab luetzm at mail.utexas.edu
> Texas Center for (v) (512) 232 9477 *new*
> Reading and Language Arts (f) (512) 232 2322
> http://www.texasreading.org
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>
More information about the metacard
mailing list