Re: Applescript and referring to a folder
Re: Applescript and referring to a folder
- Subject: Re: Applescript and referring to a folder
- From: Luther Fuller <email@hidden>
- Date: Tue, 26 Jan 2010 09:36:36 -0600
On Jan 25, 2010, at 3:04 AM, Rowland McDonnell wrote: tell application "TeXShop" repeat with this_document in documents set this_documentX to path of this_document as string set this_documentM to this_documentX tell application "Finder" make new alias to POSIX file this_documentX end tell end repeat end tell
I got a copy of TeXShop so I could test this. Here is a script that seems to do what want, according to your original script (above). (But, I'm not sure.)
set destination to alias "OS_X:Users:lutherfuller:Desktop:TeXShop aliases" -- a file system pointer tell application "TeXShop" repeat with this_document in documents try (POSIX file (path of this_document)) as alias -- another file system pointer tell application "Finder" to make new alias file to the result at destination -- creates an alias file in the destination folder end try end repeat end tell
I had to use a 'try ... end try' block in case there was a new unsaved document window open which, of course, has no path. Now, we can discuss why this works, if there are further questions.
|
_______________________________________________
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