Unsubscribe
Unsubscribe
- Subject: Unsubscribe
- From: "Reyes, Augustine" <email@hidden>
- Date: Tue, 5 Feb 2008 16:50:26 -0500
- Thread-topic: Unsubscribe
Please unsubscribe me!!
Thanks
<Augustine>
-----Original Message-----
From:
applescript-users-bounces+augustine.reyes=email@hidden
le.com
[mailto:applescript-users-bounces+augustine.reyes=simonandschuster.com@l
ists.apple.com] On Behalf Of email@hidden
Sent: Tuesday, February 05, 2008 3:03 PM
To: email@hidden
Subject: AppleScript-Users Digest, Vol 5, Issue 85
Send AppleScript-Users mailing list submissions to
email@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.apple.com/mailman/listinfo/applescript-users
or, via email, send a message with subject or body 'help' to
email@hidden
You can reach the person managing the list at
email@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of AppleScript-Users digest..."
Today's Topics:
1. Re: Apple Mail - "content" command suddenly does not work -
Found Culprit - Time Machine! (Joe)
2. Re: Apple Mail - "content" command suddenly does not work -
Found Culprit - Time Machine! (Michelle Steiner)
3. Re: Scope/Context issue? (Skeeve)
4. Sorting photos in iPhoto (parag vibhute)
5. Re: Scope/Context issue? (Kurt Klamp)
6. on error result, how to parse (email@hidden)
7. re:on error result, how to parse (email@hidden)
8. Re: strings, again and again (Gary (Lists))
9. Re: on error result, how to parse (Gary (Lists))
10. Re: Apple Mail - "content" command suddenly does not work
(Sean Todd)
11. Re: Apple Mail - "content" command suddenly does not work (Joe)
12. Setting the correct linefeed. (Arnold Nefkens)
----------------------------------------------------------------------
Message: 1
Date: Mon, 4 Feb 2008 20:56:35 -0800
From: Joe <email@hidden>
Subject: Re: Apple Mail - "content" command suddenly does not work -
Found Culprit - Time Machine!
To: Applescript Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
I didn't have the problem either until today and I have been running
Leopard since early November.
I think I am going to start using Time Machine manually from now on
and only mount the TM drive for backups until the problem gets fixed.
The "Open Dictionary" command in my Script Editor shows 7 copies of
Mail app when the Time Machine disk is mounted. I don't see any way to
tell which is the "real" Mail from the others in the list - Not that
it should make a difference, but it seems to!
Joe
On Feb 4, 2008, at 8:43 PM, Michelle Steiner wrote:
> On Feb 4, 2008, at 9:11 PM, Joe wrote:
>
>> Well! I found out how to make it work again (and break again).
>> Ejecting my Time Machine F W drive cures the problem. Mounting the
>> Time Machine drive breaks it.
>
> Strange; I have Time Machine running, and didn't have that problem.
>
> -- Michelle
>
> --
> If Liberals hated America, they'd vote Republican.
------------------------------
Message: 2
Date: Mon, 4 Feb 2008 23:37:55 -0700
From: Michelle Steiner <email@hidden>
Subject: Re: Apple Mail - "content" command suddenly does not work -
Found Culprit - Time Machine!
To: Applescript Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
On Feb 4, 2008, at 9:56 PM, Joe wrote:
> The "Open Dictionary" command in my Script Editor shows 7 copies of
> Mail app when the Time Machine disk is mounted. I don't see any way
> to tell which is the "real" Mail from the others in the list - Not
> that it should make a difference, but it seems to!
Click on the Browse button in the lower left corner of the dialog;
that will take you to an Open-File dialog, and you can then navigate
to, and select, the correct copy of mail.
-- Michelle
--
I am a pseudomasochist.. I like it when people pretend to beat me.
------------------------------
Message: 3
Date: Tue, 05 Feb 2008 08:21:22 +0100
From: Skeeve <email@hidden>
Subject: Re: Scope/Context issue?
To: Applescript Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Kurt Klamp wrote:
> No need to use 'my'
> a property is visible inside the script as is
I know. It was a leftover from an experiment whether or not it makes a
difference using "my".
> ScriptA in ScriptB is just a script object hold by a variable (here a
> local too).
> I you want script b to be stored with its current state, use a
> store script a in file "PathToScriptA"
> when finishing ScriptB
Did you test it? Did it work? Which Version of OS X/AppleScript? On
10.4.11 it does not work. Neither with an on quit handler nor if I store
a directly after running it.
------------------------------
Message: 4
Date: Tue, 5 Feb 2008 13:22:08 +0530
From: "parag vibhute" <email@hidden>
Subject: Sorting photos in iPhoto
To: email@hidden
Message-ID:
<email@hidden>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I have following script which sorts images based on "Title"
tell application "iPhoto"
activate
end tell
tell application "System Events"
tell process "iPhoto"
tell menu bar 1
tell menu "View"
tell menu item "Sort Photos"
tell menu "Sort Photos"
click menu item "by Title"
end tell
end tell
end tell
end tell
end tell
end tell
As you know, it requires to enable checkbox of "Enable access for
assistive
devices" in Universal pane of system preferences bcoz it is based on UI
scripting.
My question is there any other way to sort the photos without requiring
to
enable that checkbox?
Thanks,
Palav
--
There are many things in your life that will catch your eye but only a
few
will catch your heart....pursue those'.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.apple.com/mailman/private/applescript-users/attachments/200
80205/8cfb2466/attachment.html
------------------------------
Message: 5
Date: Tue, 5 Feb 2008 09:35:15 +0100
From: Kurt Klamp <email@hidden>
Subject: Re: Scope/Context issue?
To: Applescript Users <email@hidden>
Cc: Kurt Klamp <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Am 05.02.2008 um 08:21 schrieb Skeeve:
>> ScriptA in ScriptB is just a script object hold by a variable
>> (here a local too).
>> I you want script b to be stored with its current state, use a
>> store script a in file "PathToScriptA"
>> when finishing ScriptB
>
> Did you test it?
yes
> Did it work?
yes
> Which Version of OS X/AppleScript? On 10.4.11 it does not work.
here OS 10.4.11
> Neither with an on quit handler nor if I store a directly after
> running it.
try this
-- ScriptB.app
property a : 0
property pathtoA : "PathToScriptA"
on run
set a to load script file pathtoA
repeat 3 times
tell a to run
end repeat
store script a in file pathtoA
end run
-- -- -- -- -- -- -- --
HTH,
Kurt
------------------------------
Message: 6
Date: Tue, 5 Feb 2008 11:20:18 +0000
From: email@hidden
Subject: on error result, how to parse
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset="us-ascii"
tried a search, its kinda poor searching the list eh!
still
hopefully nice n simple, in a try block when i hit an error i want to
parse the
error to my logger...
sudocodeish
on error
my log_eventlocal("Error with Account Creation. Error:" &
error_message)
i just want the error returned by what-ever application i'm trying to
be added to the end of my error message...
hope this makes enough sense and i'm sure its simple!
thanks
tp
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.apple.com/mailman/private/applescript-users/attachments/200
80205/46ab67ef/attachment.html
------------------------------
Message: 7
Date: Tue, 5 Feb 2008 11:40:10 +0000
From: email@hidden
Subject: re:on error result, how to parse
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset="us-ascii"
Yes replying to my own post!
on error errtxt
my log_eventlocal("Error with Account Creation"& errtxt)
end try
on log_eventlocal(themessage)
set theLine to (do shell script "date +'%Y-%m-%d %H:%M:%S'" as
string) & " " & themessage
do shell script "echo " & theLine & " >> " & logpath &
"/test.txt"
end log_eventlocal
but the error returned by the lovely Entourage has a ' in text..
which catches out my shell script!
:(
i'll have a think....
----
tried a search, its kinda poor searching the list eh!
still
hopefully nice n simple, in a try block when i hit an error i want to
parse the
error to my logger...
sudocodeish
on error
my log_eventlocal("Error with Account Creation. Error:" &
error_message)
i just want the error returned by what-ever application i'm trying to
be added to the end of my error message...
hope this makes enough sense and i'm sure its simple!
thanks
tp
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.apple.com/mailman/private/applescript-users/attachments/200
80205/76e9e8c1/attachment.html
------------------------------
Message: 8
Date: Tue, 05 Feb 2008 06:47:48 -0500
From: "Gary (Lists)" <email@hidden>
Subject: Re: strings, again and again
To: AppleScript Users <email@hidden>
Message-ID: <C3CDB714.5A25%email@hidden>
Content-Type: text/plain; charset="US-ASCII"
"Kurt Klamp" wrote:
>> Now you've got lists of lists. I don't understand the need for that.
>>
>> Why is the data that way?
>> Where does the data come from?
>
>
> Maybe i can clarify a little bit:
>
> getting/setting(values) of parts of a sheet in excel you do with
> range objects.
> They are always row-column structured. Each row is a list and each
> column is a item in this list. So we get/have to use always a list of
> list,
Ah. Okay, that's useful information. (As I said, I don't script Excel,
so I
don't know how it works...AppleScript-wise.)
So the OP's inner-listing is warranted, but s/he still has a problem
with
the appending empty lists {""} to the end of the match list.
But, I'll let that go. I think I've offered all I can on that, until a
more
complete script is produced.
See you, Kurt.
--
Gary
------------------------------
Message: 9
Date: Tue, 05 Feb 2008 06:52:26 -0500
From: "Gary (Lists)" <email@hidden>
Subject: Re: on error result, how to parse
To: AppleScript Users <email@hidden>
Message-ID: <C3CDB82A.5A26%email@hidden>
Content-Type: text/plain; charset="US-ASCII"
"email@hidden" wrote:
> sudocodeish
A fine-looking puzzle-solver?
--
Gary
------------------------------
Message: 10
Date: Tue, 5 Feb 2008 08:20:43 -0800
From: Sean Todd <email@hidden>
Subject: Re: Apple Mail - "content" command suddenly does not work
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Odd, I have also been experiencing the same problem with the content
not working. I can get the source and everything else just fine, but
the content just hangs. Usually when this occurs I am able to delete
the IMAP account and re-create it. Unfortunately, that trick seems to
have run its course and is no longer working.
Also, for those that seem to running on the hope that it is
TimeMachine working its evil magic on AppleScript, I don't have
TimeMachine running and I still have the same problem.
I have also checked all of the console logs and found nothing. I have
also rebuilt the envelope indices, repaired permissions, repaired the
disk (including rebuilding the b-tree), cleared the caches, changed
the way IMAP caches read messages and stuff, and still nothing.
Hopefully Apple will fess up to this bug soon.
~Sean
--------------------
Mann Consulting, LLC
282 Second Street, 4th Floor
San Francisco, CA, 94105
Phone: 415-546-6266
Email: email@hidden
------------------------------
Message: 11
Date: Tue, 5 Feb 2008 09:01:37 -0800
From: Joe <email@hidden>
Subject: Re: Apple Mail - "content" command suddenly does not work
To: Applescript Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
On Feb 5, 2008, at 8:20 AM, Sean Todd wrote:
> Odd, I have also been experiencing the same problem with the content
> not working. I can get the source and everything else just fine,
> but the content just hangs. Usually when this occurs I am able to
> delete the IMAP account and re-create it. Unfortunately, that trick
> seems to have run its course and is no longer working.
>
> Also, for those that seem to running on the hope that it is
> TimeMachine working its evil magic on AppleScript, I don't have
> TimeMachine running and I still have the same problem.
>
> I have also checked all of the console logs and found nothing. I
> have also rebuilt the envelope indices, repaired permissions,
> repaired the disk (including rebuilding the b-tree), cleared the
> caches, changed the way IMAP caches read messages and stuff, and
> still nothing. Hopefully Apple will fess up to this bug soon.
My problem may not be Time Machine, but my particular Time Machine
backup files.
I deleted my backup folder last noc and let Time Machine run all night
creating a new backup.
Today "content" works with the Time Machine disk mounted.(?)
Ditto with the system logs. No hints there, just nothing.
Joe
------------------------------
Message: 12
Date: Tue, 5 Feb 2008 20:59:36 +0100
From: Arnold Nefkens <email@hidden>
Subject: Setting the correct linefeed.
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset="iso-8859-1"
Hello list,
Im currently building a AppleScript Studio application that creates a
series of set folders and creates 2 shell scripts . The problem is
that the shell scripts do not get set with the correct linefeed. They
are set to the Mac <CR> setting instead of the , correct in my case,
setting.
Below the basis of the shell script creation:
set fileRef to (open for access alias scriptinstall with write
permission)
write "#!/bin/sh" & return to fileRef as <class utf8> starting
at eof
write "# Date:" & Thedate & return to fileRef as <class utf8>
starting at eof
write "# Build by:" & BouwerNaam & return to fileRef as <class
utf8>
starting at eof
write "# " & return to fileRef as <class utf8> starting at eof
write "# This script installs :" & RadiaNaam & ". Logfile
located at /
var/log/radia/" & RadiaNaam & ".log" & return to fileRef as <class
utf8> starting at eof
write "# " & return to fileRef as <class utf8> starting at eof
write "# Installationline:" & return to fileRef as <class utf8>
starting at eof
write return to fileRef as <class utf8> starting at eof
write "/usr/sbin/installer -pkg /Library/Radia/package/" &
RadiaNaam
& ".pkg " & "-target / -allow -verboseR >>/var/log/radia/" & RadiaNaam
& ".log" & return to fileRef as <class utf8> starting at eof
write return to fileRef as <class utf8> starting at eof
close access fileRef
I've found the following at macscripter.net:
http://macscripter.net/articles/402_0_10_0_C/
I've followed the second example and created the following routine:
set txt to " #!/bin/sh" & return & "# Aanmaakdatum:" & Thedate &
return & "# Script build by:" & BouwerNaam & return & "# " & return &
"# This script installs:" & RadiaNaam & ". Logfile located at /var/log/
radia/" & RadiaNaam & ".log" & return & "# " & return & "#
installation line" & return & "/usr/sbin/installer -pkg /Library/Radia/
package/" & RadiaNaam & ".pkg " & "-target / -allow -verboseR >>/var/
log/radia/" & RadiaNaam & ".log"
set tid to AppleScript's text item delimiters
set AppleScript's text item delimiters to ASCII character 10 --
(a
line feed)
set newTxt to text items of txt -- not text of, text items of
set AppleScript's text item delimiters to tid -- whatever they
were
before - ALWAYS SET THEM BACK!
set fileRef to (open for access alias scriptinstall with write
permission)
write newTxt to fileRef starting at eof
close access fileRef
The script does work, however the linefeed is still set to Mac <CR>...
And to open all the scripts build by the application using
TextWrangler in order to set them correct is not really a option...
Building around a 60 to a 100 unix scripts a month....
Does someone know what to do? And what to change?
Thank you in advance.
---
Arnold Nefkens
Nefkens Advies
email@hidden
Apple Certified Desktop Technician
Apple Certified Portable Technician
Apple Certified Helpdesk Specialist
Apple Certified Technical Coordinator
Apple Certified System Administrator
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.apple.com/mailman/private/applescript-users/attachments/200
80205/d4c1ca24/attachment.html
------------------------------
_______________________________________________
AppleScript-Users mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/applescript-users
End of AppleScript-Users Digest, Vol 5, Issue 85
************************************************
_______________________________________________
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