Re: can't get it to work
Re: can't get it to work
- Subject: Re: can't get it to work
- From: Reinhold Penner <email@hidden>
- Date: Wed, 9 Apr 2003 16:14:50 -1000
JD,
is this really you, JD? Don't let me pull out some of your script
samples from the archives ;-)
I challenge you to find one ....
you shouldn't have said that :-)
though we all go through a Romantic phase :-)
I guess, but as you will see below, your Romantic phase spans at least
five years ;-)
Begin forwarded message:
From: John Delacour <email@hidden>
Date: Wed Apr 9, 2003 13:30:56 Pacific/Honolulu
To: email@hidden
Subject: Re: Folder Actions Help
on getScript()
"on adding folder items to this_folder after receiving list_
"this_folder" is pretty similar to theResult, no?
set list_ to list_ as list
sweet, clear, and not the least bit confusing :-)
set ls to {}
set my text item delimiters to \":\"
repeat with file_ in list_
set end of ls to last text item of (\"\" & file_)
end repeat
tell app \"Finder\" to choose from list ls with prompt \"Added:\"
end adding folder items to
"
end
It gets better (this is a fairly recent post):
From: John Delacour <email@hidden>
Date: Fri Mar 21, 2003 08:27:33 Pacific/Honolulu
To: cricket <email@hidden>, Alan Kimelman <email@hidden>
Cc: email@hidden
Subject: Re: Saving Attachment from Mail.app
on writesource(s)
set theSavedClipboard to the clipboard as record
"theSavedClipboard" ??? You really should never start a variable with
"the". It is too confusing ;-)
set the clipboard to s
do shell script "pbpaste > ~/Desktop/temp.txt"
set the clipboard to theSavedClipboard
-- then process with Stuffit Expander
end writesource
here's another example of this (from 1998, JD was a teenager then :-):
From: "John Delacour"<email@hidden>
Date: Mon Aug 17, 1998 02:45:15 Pacific/Honolulu
To: email@hidden, Mark Bjaergager
<email@hidden>
Subject: Re: Choose from list problem
set choice to (choose from list nameList) as text
repeat with i from 1 to count items of nameList
set x to item i of nameList as text
if x = choice then
set thePath to item i of pathList
"thePath", where will it lead us?
exit repeat
end if
end repeat
and finally:
From: John Delacour <email@hidden>
Date: Fri Feb 14, 2003 13:18:13 Pacific/Honolulu
To: email@hidden
Subject: Re: posix path conversion
set URI to "file://localhost/Applications/Address Book.app/"
set posixPath to do shell script "perl -e '
"posixPath" ??? Although I have to admit that it is still better than
POSIXpath or thePOSIXpath :-)
There's nothing like a good challenge (although the last one I posed
remains open (getting the user's download folder).
-Reinhold
_______________________________________________
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.