How do I paste into a different app?

Bill Vlahos bvlahos at mac.com
Thu Dec 31 10:27:47 EST 2009


Thanks Sarah.

I figured it out and have it working on the Mac with AppleScript. I'm not using a paste function but the AppleScript "keystroke" function. It looks like the Windows API "keybd_event" can do the same type of thing.

I don't really know anything about VBScripting. If I know what the VBScript commands for keybd_event can I do the same thing? How?

Bill

On Dec 30, 2009, at 3:19 PM, Sarah Reichelt wrote:

> On Thu, Dec 31, 2009 at 8:55 AM, Bill Vlahos <bvlahos at mac.com> wrote:
>> It looks like on the Mac you can get AppleScript to send keystrokes by telling the application "System Events".
>> 
>> tell application "System Events"
>>        keystroke "x"
>> end tell
>> 
>> How can I tell Rev to execute this AppleScript code?
> 
> 
> Store that script in a field or custom property, then when you need
> it, put it into a variable and use "do as AppleScript".
> e.g.
> 
>    put the cPasteAppleScript of this stack into tScript
>    do tScript as AppleScript
> 
> To emulate a paste command, you will need something like:
>    keystroke "v" using command down
> 
> However you probably want to make sure the correct app is frontmost
> before you paste.
> So you can use something like this as the first line of your AppleScript:
>    tell application "TextEdit" to activate
> 
> HTH,
> Sarah
> _______________________________________________
> 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