Re: current date --> error number -10004
Re: current date --> error number -10004
- Subject: Re: current date --> error number -10004
- From: KOENIG Yvan <email@hidden>
- Date: Mon, 01 Aug 2011 23:09:41 +0200
Le 1 août 2011 à 22:49, email@hidden a écrit :
> Is there a way around this -10004 error? or is it okay to just leave this as is? Looks like it gives the error and then performs the request anyway. Or am I missing something? Running 10.7:
>
> From Applescript Editor:
> try
> tell application "iCal"
> activate
> view calendar at the current date
> switch view to day view
> end tell
> end try
It's a behavior which I already described.
Don't trigger the function Current date in a tell block.
try
set current_date to current date
tell application "iCal"
activate
view calendar at current_date
switch view to day view
end tell
end try
would behave flawlessly.
You may also use :
try
tell application "iCal"
activate
view calendar at my get_current_date()
switch view to day view
end tell
end try
on get_current_date()
return current date
end get_current_date
Yvan KOENIG (VALLAURIS, France) lundi 1 août 2011 23:09:32
_______________________________________________
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