On 18-Dec-04, at 1:42 AM, Ken Ray wrote:

:-) There is light at the end of this tunnel... but I can't tell if
it's the exit or an oncoming train :-)

Try this... put this in a button:

on mouseUp
  put "Call Mom,Buy groceries" into tSubjects
  put "3" into tPriority

put "tell application `iCal`" & cr & \
"copy `" & tSubjects & "` to TheItems" & cr & \
"set AppleScript's text item delimiters to {`,`}" & cr & \
"set TheItems to text items of TheItems" & cr & \
"repeat with m from 1 to (count of TheItems)" & cr & \
"set the NewToDo to make new todo at the end of the todos" && \
"of the calendar 1 with properties {due date:(current date)," && \
"priority:" & tPriority & ", summary:(item m of TheItems)}" & cr & \
"end repeat" & cr & \
"end tell" into tAS


  replace "`" with quote in tAS
  do tAS as AppleScript
end mouseUp

This is how I work with AppleScript - I substitute left angle quotes for
real quotation marks while building the script and replace them with quotes
later, and I try to format it with the same line breaks as it would be if it
were being typed (note the \ line continuation characters).


Hope this gives you some insight on how to work with AppleScript in Rev...

AAAaaaah! the ancient spaghetti script technique. Thank you Sensei!



 There is a crack in everything. That's how the light gets in.
__________<http://home.golden.net/~samu>__________

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to