Faking keypresses on Mac OS X

Jim Sims sims at ezpzapps.com
Wed Feb 27 13:55:36 EST 2008


On Feb 27, 2008, at 7:39 PM, Ben Rubinstein wrote:

> An ingenious suggestion, which might indeed work for some apps; but  
> not for a browser instance inside Rev.  Your suggestion did make me  
> test what happened if my Rev app executed 'paste' while the focus  
> was on a text field in the web page in the browser instance in the  
> stack: the result was can't "paste (empty clipboard or locked  
> destination)".


I haven't tested here so this is more of a question...

My suggestion was  to have applescript perform the paste.
I think the following is paste but might be copy (cannot find my key  
code
cheat sheet).
-------------------

tell application "System Events"
	set frontApp to name of first application process whose frontmost is  
true
end tell


tell application  frontApp
	activate
	tell application "System Events"
		key code 8 using command down  --34 id for Dvorck keyboard
	end tell
end tell



sims
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ClipaSearch Pro
http://www.ClipaTools.com

Across Platforms - Code and Culture
http://www.ezpzapps.com/blog/







More information about the use-livecode mailing list