I had forgotten about embedded AppleScript which I heard about some
centuries ago. I tried using it following the Users Guide, but the
example is insufficient or incorrect and I can find no sample code
out there that is not so old that RB won't open it.
I have an AppleScript that works fine if I don't use it with a
parameter, but with the parameter (daText) I get a null error:
This works:
on run {}
tell application "TextEdit" to activate
tell application "System Events"
tell process "TextEdit" to keystroke "Just testing"
end tell
end run
This gives a null error, but I assume it is because I am not passing
a parameter:
on run {daText}
tell application "TextEdit" to activate
tell application "System Events"
tell process "TextEdit" to keystroke daText
end tell
end run
This is then saved as an application (TTTE), which I drag to the
Realbasic project.
According to the documentation, I should be able to call it as a
method in my RB code, where daText is a string variable.
TTTE(daText)
RB returns an error that method "Requires fewer parameters than were
passed." which is obviously incorrect.
If anybody can point me to a possible solution to this, I would
appreciate it.
Regards,
Jeffrey
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>