MACSCRPT Archives

May 2003

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
doug rogers <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 20 May 2003 21:56:57 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (55 lines)
Mac OS 9.2.2 HyperCard 2.4.1 Applescript 1.8.3

I have an Applescript in the content of a HyperCard button. The script of
the button calls a "do me as Applescript" to send a command to Palm
Desktop 4 to create a new, for instance, appointment in the Datebook, or
a new To Do item.

The script when called from the HyperCard button has begun to stop with
the error message that 'Expected ":" but found property' when trying to
create an appointment, or 'Expected expression but found "to"' when
trying to create a To Do item.

Now the same script when run from Smile fetches the info from the card
and creates the item without a peep.

These scripts used to work from HyperCard:

tell application "HyperCard"
  copy variable "EventTitle" to EventTitle
  copy variable "EventDate" to EventDate
  copy variable "EventStart" to EventStart
  copy variable "EventEnd" to EventEnd
  end tell

  tell application "Palm Desktop"
set NewEvent to make new event with data {title: EventTitle, date:
EventDate, start time: EventStart, end time: EventEnd}
end tell

(This one generates the query about ":"'s)

and:

tell application "HyperCard"
        copy variable "EventTitle" to EventTitle
        copy variable "EventDate" to EventDate
end tell

tell application "Palm Desktop"
set NewToDo to make new to do with data {title:EventTitle, due
date:EventDate, completed:false}
end tell

(generates the query about "to")

Of course the long line is going to wrap strage. So It looks like the
problem is with addressing the Palm Desktop application itself. Why do
these scripts work from the Finder or Smile... but now not from
HyperCard. They used to...



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

ATOM RSS1 RSS2