Launch Not work on OSX/OSX Rotate image trick

Sannyasin Sivakatirswami katir at hindu.org
Fri Nov 29 20:17:01 EST 2002


I copied this to the improve list as it appears we have a bug or a 
needed feature. It could be an Adobe problem also...

See below. OSX 10.2.2

I. Failure to see inside package.

I tested the following:

answer file "Search for an application that is a package"
put it

/Applications/Adobe Photoshop 7/Adobe Photoshop 7.0/

is returned.

indicating a failure to "see" inside the package... it is not possible 
from inside the dialog box to cntrl-select a file inside a package. 
Leaving it as a directory, one cannot use the path to launch a file.

launch "some.jpg" with "/Applications/Adobe Photoshop 7/Adobe Photoshop 
7.0/"

will not work.


2. Doing as Ken says.  control clicked on the package. The actual 
application file appears, ais the same name, appending this to the path 
one gets:

/Applications/Adobe Photoshop 7/Adobe Photoshop 7.0/Adobe Photoshop 7.0

launch "some.jpg" with "/Applications/Adobe Photoshop 7/Adobe Photoshop 
7.0/Adobe Photoshop 7.0"

YES! this does work. Subsequent attempts to open a file with Photoshop 
already open do not work (as documented) will have to use applescript.

3.
Close process  "/Applications/Adobe Photoshop 7/Adobe Photoshop 
7.0/Adobe Photoshop 7.0"

Does nothing if Photoshop is open. Openprocesses still returns path to 
PS.

4. kill process  "/Applications/Adobe Photoshop 7/Adobe Photoshop 
7.0/Adobe Photoshop 7.0"  returns "Process did not die" if Photoshop is 
still open.

5. Quit Photoshop:

--Openprocesses() still returns the path.
--Close process  doesn't do anything. Launch command will not work even 
though Photoshop has been quit.

--Kill process "/Applications/Adobe Photoshop 7/Adobe Photoshop 
7.0/Adobe Photoshop 7.0" returns "Process did not die"

BUT! after running the kill process on the application that was already 
quit... the Launch command does in fact boot Photoshop now... even 
though the kill command didn't think it had killed the process.

??? Some engine anomalies there... but

Solutions: on OSX if helper app is open, use applescript to launch the 
file.
If the helper app was previously opened by Rev, but subsequently quit 
then
use a kill command before trying to use it again in the same session.

global gCurrentFolder
on menuPick which
   switch which
   case "Photoshop"
     put (fld "PhotoshopLoc" of stack "prefs") into tAppPath
     kill process tAppPath
     break
case "ImageReady"
     put (fld "ImageReadyLoc" of stack "prefs") into tAppPath
     kill process tAppPath
   break
   case "Illustrator"
     put (fld "IllustratorLoc" of stack "prefs") into tAppPath
      kill process tAppPath
  break
   case "BBEdit" ## check on some text file...captions etc.
     put (fld "BBeditLoc" of stack "prefs") into tAppPath
      kill process tAppPath
  break
   end switch
   launch (gCurrentFolder& fld "currentImage") with tAppPath
end menuPick


On Thursday, November 28, 2002, at 08:48 PM, Ken Ray wrote:

> Sannyasin,
>
>> Problems with Launch command:
>> Bug:
>> 1) Rev will not "forget' that the application is no longer running.
>>
>> a) set an application path to BBEdit in a preference field.
>> b) Launch a file using
>>
>> launch "some/File/path" with "/Applications/BBedit 6.5/BBEdit 6.5
>>
>> First time (BBedit is not open) the file is opened... as expected.
>>
>> Quit BBEdit...
>>
>> use the launch button again.. .this time the file is not launched...
>>   if I quit Rev and re-boot, it is launched.
>
> The problem (I think) is that Rev thinks that it "owns" the process, 
> and
> therefore since you didn't quit it *from* Rev, it still thinks it's 
> open.
> Try checking the "openProcesses' and see if you have a process listed 
> there
> after you launch. If you do, you should 'kill' the process and see if 
> it
> will work again.
>
>> Not a bug, but a "how to?"
>> 2) The documentation clearly states that if the application is already
>> open then "launch" will do nothing... OK, so, then, how does one open 
>> a
>> file in an already running application?  Of course I can use
>> applescript... but would rather stay in xTalk.
>
> Sorry; I think you have to use AppleScript until this is resolved.
>
>> 3) this is totally obscure problem with Adobe products... anyone know
>> about this?
>>
>> Launch "somepath/some.jpg" with "/Applications/Adobe Photoshop
>> 7.0/Adobe Photoshop 7.0
>>
>> will not work... and, what is even stranger, if you do
>>
>> answer file "Find your copy of Photoshop"
>> put it
>>
>> and locate the application, Rev returns:
>>
>> /Applications/Adobe Photoshop 7.0/Adobe Photoshop 7.0/
>>
>> with a "/" at the end, even though it appears that you are pointing to
>> the Adobe photoshop file and not a folder??
>
> No, that's not strange at all under OS X. Technically applications ARE
> folders (actually "packages"); if you control-click on them and choose 
> "Show
> Package Contents" you can see what is inside - including the REAL
> application. You might try including the trailing "/" after the path 
> name to
> the app and see if it launches properly.
>
> Ken Ray
> Sons of Thunder Software
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution


>
>
Om Shanti,
Sannyasin Sivakatirswami

Himalayan Academy Publications
katir at hindu.org

www.HimalayanAcademy.com, www.HinduismToday.com
www.Gurudeva.org, www.Hindu.org





More information about the Use-livecode mailing list