Line tracing

J. Landman Gay jacque at hyperactivesw.com
Sun Feb 2 22:21:01 EST 2003


Richard Gaskin <ambassador at fourthworld.com> wrote:
>
> on open theList
>     tell application "Finder"
>         set selectionLength to number of items of selection
>         if selectionLength = 0 then
>             say "Nothing is [[emph +]] selected."
>         else
>             --  first change all the files selected
>             set the creator type of every file of selection to "Revo"
>             set the file type of every file of selection to "RSTK"
>         end if
>     end tell
> end open
> 
> 
> While this works great in OS 9 it fails in OS X, providing the "Nothing is
> selected" feedback.

I avoid the whole selection thing and use the following, which works 
okay in both OS 9 and OS X:

on open theFiles
	tell application "Finder"
		repeat with x in theFiles
			set the creator type of x to "Revo"
			set the file type of x to "RSTK"
		end repeat
	end tell
end open

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list