Path To blessed items (OSX and OS9): Odd or Normal?
Path To blessed items (OSX and OS9): Odd or Normal?
- Subject: Path To blessed items (OSX and OS9): Odd or Normal?
- From: Gary Lists <email@hidden>
- Date: Fri, 20 Jun 2003 14:03:12 -0400
Listerines,
A few weeks ago, Rob J. and I solicited your assistance for some 'path to'
blessed items scripts. His is targeted (mostly) to X and mine deals
(mostly) with OS9. (Actually...oh, never mind.)
Now we need your assistance again. We're both reading along, so thanks in
advance.
The scripts basically loop through a list of 4-char codes, return the 'path
to' information as a string, and then present a list to the user showing the
code and the path...a choose from list.
It came to my attention that when I would run either of the scripts, for
every code processed for which there was _not_ a pre-existing folder, the
simple execution of the 'path to' command created one.
I was a bit shocked that I hadn't noticed this before, and so I contacted
Rob to see how his newer (and much more organized) version was handling the
similar case in OSX. He did some testing and...
Astonishingly (to us), the same thing happens.
Execute the command
path to "xxxx" -- where xxxx is an OS-valid 4-char folder code
If the folder equivalent did not already exist, then a folder is created at
its default location. If a user does not have 'Apple Extras' or 'Users' and
then they see them sitting there when the script finishes, it is a bit
disconcerting ... and more than rude! ;)
The same behavior occurs with
path to "usrs" as string
"" & (path to "usrs" as string)
We are not saying this is not the proper (um...well known?) behavior, though
it does seem unexpected. We do, however, need to deal with it in our
respective scripts.
Further complicating our plans to deal with this 'problem' is that even
though the command returns an alias on both OS-es, for OSX, the alias is
_really_ followed, even to the trash.
Rob dramatically confirms for X 10.2.6:
>
I'll be a sunnuva...
There is a difference, however. OHM, if he moves one of the undesirably
created folders to the trash, then runs the script again, the result is an
alias which points to the item in the trash (with no additional creation.)
OMM, OS9.1, moving the item to the trash and running the script creates
another new item, disregarding the one in the trash.
Frankly, I don't know which is worse or more annoying in our particular
case.
If you have any comments about the broader context of the 'path to' command
for "blessed" items (with 4-char codes) or about how we might best handle
the problem of unintentionally creating directories which the user has
obviously deleted.
Thanks for any ideas.
--
Gary
MacOS 9.1 / "9 is Fine"
OMM: osa:AS 183 / osa:JS 103 / FM 55 / BB 612 / Smile 188
______________________________________________________________
Please reply directly to the list.
Incoming messages are auto-deleted. (It's anti-spam, that's all.)
_______________________________________________
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.