Line tracing
Ken Ray
kray at sonsothunder.com
Sat Feb 1 22:14:01 EST 2003
Richard,
It must be a bug in OS X. If you assign the value to a variable first, and
then get the count, you actually get the right number. For example, if you
select to documents in the Finder and do this:
tell application "Finder"
get the number of items of the selection
end tell
...you get "0". But if you do this:
tell application "Finder"
copy the selection to mySel
get the number of items of mySel
end tell
... you get "2". Go figure...
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: "Richard Gaskin" <ambassador at fourthworld.com>
To: <use-revolution at lists.runrev.com>
Sent: Saturday, February 01, 2003 4:34 PM
Subject: Re: Line tracing
> erik hansen wrote:
>
> >>> Richard Gaskin has this nifty AppleTalk
> >>> application he wrote to make
> >>> the conversion painlessly. You just have to
> >>> drag the document onto
> >>> the icon and presto, PC to Mac conversion. I
> >>> can send it to you off
> >>> line if you can't find it on his web site--I
> >>> am assuming it that is
> >>> alright with Richard???
> >>
> >> Absolutely, Jim. Thanks for helping to spread
> >> it around where it can be useful.
> >
> > shouldn't the RunRev people
> > (when they get some time)
> > have "this nifty AppleTalk application"
> > installed on their site?
>
> It wouldn't be their doing -- I'd have to send it to them first. :)
>
> They have a great tools repository at
>
<http://www.RunRev.com/revolution/developers/developerdownloads/usercontribu
> tions.html> and are quick about posting new submissions.
>
> I just hadn't thought of uploading it there. All I did was find a snippet
> off the Web and modified it for the Rev type code, and then compiled it to
a
> droplet:
>
> 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.
>
> Hopoefully one of you AppleScript gurus can explain: Why would the method
> by which I'm obtaining the file list work perfectly in Classic but not in
OS
> X?
>
> --
> Richard Gaskin
> Fourth World Media Corporation
> Developer of WebMerge 2.2: Publish any database on any site
> ___________________________________________________________
> Ambassador at FourthWorld.com http://www.FourthWorld.com
> Tel: 323-225-3717 AIM: FourthWorldInc
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list