Problem quitting a script when it's done.

Hello all,

Here is a little script i have modified. It converts pictures from jpeg to pict and scales them. I named it “JPEG → PICT”
The only thing i would like to add : the mini application created should quit when finished. But if i add

the script editor says : The run manager has been specified more than one time or there have been higher level commands in addition to the run manager" ((Translated from french, sorry for inaccurate words…))

How can i tell my script to quit when the job is done ? It used to work with other scripts.

Thanx in advance for any help !

By default, applets and droplets (applescript standalone applications) will quit themselves when the code is finished, unless you save explicitly the app as “stay-open”. If you did it, a simple “quit” will do the job.

Hi,

Thanks for answering… but it doesn’t work.
Have you tried this ? Copy-paste my script (JPEG->PiCT) and then run it . It is perfect. But doesn’t quit after the job is done… I tried to put a “quit” command at the end but it didn’t work.
Thanks again !

Romain

I did it and it works (though under OS X).
Try this: do it the same yourself, copy-paste, then save as application and make sure that the checkbox “stay-open” or “dejar abierto” or “whatever-in-french” is unchecked.
This should work, unless there is something corrupted in your os or as-installation…

There is a “bad” use of TIDs in your code. When you manipulate “applescript’s text item delimiters”, you should make the needed operations, then reset them again immediatelly to their previous value, for satety’s sake. Eg, in your code:

set the text item delimiters of AppleScript to "."
set theName to (text item 1 of theName)
set the text item delimiters of AppleScript to {""}

I have modified my script. It works fine now, but i will have to test it in my school lab !

Thanks for answering !

:stuck_out_tongue: