• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript TID bug OS 10.2.5?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript TID bug OS 10.2.5?


  • Subject: Re: AppleScript TID bug OS 10.2.5?
  • From: julifos <email@hidden>
  • Date: Thu, 24 Apr 2003 22:08:55 +0200

> I still find your style verbose and superfluous, and besides you are
> neither allowing for the final colon on folders nor replacing it when
> you have found it, no allowing for paths to disks, so the script is
> always going to be unreliable. I would do it like this and I'd be
> surprised if this broke on anyone's machine. I rest my case.

An entry at the app's "plst" resource won't allow the user to drop a folder.
Also, a line of code will allow only 1 file ending in ".0" (which will
exclude also any folder if the "plst" doesn't work). These are the
requirements to go ahead with the rest of the script. So, I will receive
allways anything such as:

alias "whateverDiskName:whateverFileName.0"

I don't think verbosity is the problem. Anyway, I'll compile your code and
will try to get my user to test it, so we'll see if it breaks too...

> set ls to {path to me, path to "cusr", path to startup disk}
> open ls
> --
> on open ls
> set {f, _colon} to {"" & item 1 of ls, false}
> if f ends with ":" then set {f, _colon} to {text 1 through -2 of f, true}
> set text item delimiters to ":"
> if (count text items of f) is 1 then return {"", f & ":"}
> set _container to "" & text items 1 thru -2 of f & ":"
> set _file to last text item of f
> if _colon then set _file to _file & ":"
> set text item delimiters to ""
> {_container, _file}
> end open

Anyway (and I think this is a little off-thopic), I'd like to know the
_real_ differences (appart from verbosity) between your line:

set _container to "" & text items 1 thru -2 of f & ":"

And the mine:

set folder_ to text items 1 thru -2 of (thisFile as text) & "" as text


If you wish take a look (no much to see apart from TIDs question), the
source code is here:
http://homepage.mac.com/julifos/machacha_lite_sourcecode.txt

And the "final art" here:
http://homepage.mac.com/julifos/soft/machacha/lite/machacha_lite_10.sit

Cheers!

JJ
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: AppleScript TID bug OS 10.2.5?
      • From: John Delacour <email@hidden>
References: 
 >Re: AppleScript TID bug OS 10.2.5? (From: John Delacour <email@hidden>)

  • Prev by Date: Path to ... as string [was Re: Complete newbie]
  • Next by Date: Re: Language at a Glance
  • Previous by thread: Re: AppleScript TID bug OS 10.2.5?
  • Next by thread: Re: AppleScript TID bug OS 10.2.5?
  • Index(es):
    • Date
    • Thread