AS in OC and Emailer
AS in OC and Emailer
- Subject: AS in OC and Emailer
- From: David Groover <email@hidden>
- Date: Tue, 2 Apr 2002 12:35:05 -0500
OK,
I have already posted this on an old OneClick list. But I am wondering if
anyone here has the knowledge of AS and OC and Emailer, enough to have an
idea of how to problem solve the following:
// I am not sure how to register a modifier keystroke to change the
script with an IF Else statement. On the normal press of the key I want
the application Emailer to open, or if already open, to bring the browser
window to the front and to check for incoming mail
// The If Else AS is then qualified by the modifier key being held down,
and should create the same process as above but with sending instead of
checking going on. Specifically, when I use it I want it to send my
current top mail message, if it can be sent, or send all messages if no
current send ready message is open and on top.
// I realize that the last lines are not in the equation yet (send only
from the top window else send all messages). I mention that only because
that is my aim.
I was trying:
If
// create the variable
Variable isHeldDown
// is the shift key down?
isHeldDown = KeyMap 56
AppleScript
tell application "Claris Emailer"
activate
connect to "Mindspring.com" with sending
end tell
End AppleScript
Type Command "b"
Else
AppleScript
tell application "Claris Emailer"
activate
connect to "Mindspring.com" with checking
end tell
End AppleScript
Type Command "b"
End If
// Emailer wants to interpret the shift modifier as a garbage character
which it types in, but it does nothing to the script or the OC button.
Perhaps I could change the variable to a global var? Would that help
override Emailer's interpretation of the keys? I wouldn't want Emailer
overridden other than that hot key and then only while the commands are
relevant. Would setting the global variable stay around after the AS is
run?
// I am hoping to hear from someone on the OC list about ways to have the
modifier key work. I am not certain I have gotten it right yet. But, very
important, I also am unsure about ways to do the AS part. So, better to
post here to review at least the AS part so as to limit my unknowns.
// Do I assume correctly that AS can not use a key modifier in it's
scripts? If it can then that would make all the difference. Assuming
again that I can get Emailer to let me use it over it's own key mapping
schema.
// The script starts with an FKey. I am trying to use the same Fkey with
the modifier key to run the script as I used to launch it. Does that
sound problematic? I am wondering how I can expect a process to run that
is looking for a modifier when it was already launched without one. Any
ideas?
Dave
_______________________________________________
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.