Type a text from a palette stack to an external window

Paul Claude paulclaude at postino.it
Wed Mar 1 09:38:40 EST 2006


Hi Lynn,

unfortunately this does not work for me. Perhaps the problem is that my
stack has a systemWindow style.

I've created this property, running it as Applescript:

tell application "System Events" to set frontApp to name of (item 1 of
(processes whose frontmost is true))
tell window 1 of application frontApp to activate
tell application "System Events"
    keystroke "Test"
end tell
return frontApp

It properly return the name of the text editor that's already open
(frontApp), but doesn't bring it really to the front, and fails to type.



on 1-03-2006 14:46, Lynn Marie Peterson at lmpeterson at mac.com wrote:

> ````````````````
> Hi Paul ~
> 
> I am relatively new to RunRev, but I just ran into this recently in my own
> project. I had the same problem with AS, but this is what I did (note this
> does not include AS routine to transfer text, just activate an external app
> window:
> 
> on mouseUp
>   put "tell application" && quote & "Microsoft Word" & quote & return into
> tAppleScript
>   put "open" & return after tAppleScript
>   put "end tell" after tAppleScript
>   do tAppleScript as AppleScript
>   put "tell application" && quote & "Microsoft Word" & quote & return into
> tAppleScript
>   put "activate" & return after tAppleScript
>   put "end tell" after tAppleScript
>   do tAppleScript as AppleScript
> end mouseUp
> 
> I tried putting the AScript into one "put tell application", but I found the
> same thing you did... it would launch the Word app, but not bring it to the
> frontmost app, so I had to tell it to open and then activate in separate
> "tell application" statements. I'm sure there is a more concise, elegant way
> which the experts here on the list will provide.
> 
> Lynn P.
> --
> View this message in context:
> http://www.nabble.com/Type-a-text-from-a-palette-stack-to-an-external-window-t
> 1205435.html#a3183270
> Sent from the Revolution - User forum at Nabble.com.
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 





More information about the use-livecode mailing list