Any way to use "path to me" when a script/app is hidden
Any way to use "path to me" when a script/app is hidden
- Subject: Any way to use "path to me" when a script/app is hidden
- From: "David A. Cox" <email@hidden>
- Date: Wed, 5 Dec 2007 15:27:40 -0800
I am trying to make an applescript that will work if it is hidden or
not. I would like it to do tome things to the files that are in the
folder with it.
The following script works fine if it is saved in a folder, but if I
make the application hidden, it tosses up the error (the
"fullPathToTheApp" is replaced by the real path:
"Can't make alias "FullPathToTheApp" into type file.
I am making the app hidden with the 'chflags hidden' command in
terminal.
Does anyone know of a way to make 'path to me' work in this type of
environment?
The sample script is:
tell application "Finder"
activate
set folderpath to (path to me)'s folder
set mypath to path to me
set MyName to name of file mypath
set selection to {}
select (every item of folderpath whose name is not MyName)
select every item of folderpath
end tell
Thanks,
DAC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden