Query failed: connection to localhost:9312 failed (errno=111, msg=Connection refused). Apple Script and keys - Mac Software Discussions on AppleInsider Forums Toggle navigation All Forums Recent Posts Sign In Apple Script and keys stevegongrui Posted: June 17, 2002 5:39AM in Mac Software edited January 2014 Is it possible to make a script in Apple Script which holds down a key on the keyboard? If so, what must I do? Comments Reply 1 of 1 doughboy Posts: 47member June 17, 2002 5:21PM Hi,You can try downloading a free scripting addition called <a href="http://www.eagrant.com/Sigmas-Additions.sit.hqx" target="_blank">Sigma's Additions</a>, which adds a single command: type text. You can add text to a document and also select various menu items, provided they have keyboard equivalents. To use it, you would do something like:[code]tell application "AppleWorks 6" activate make new document at beginning tell front document type text "This is a test." type text "a" holding down command -- select all type text "b" holding down command -- make bold end tellend tell</pre><hr></blockquote>Unfortunately, there's a twenty character limit, so entering a large amount of text is cumbersome.Hope this helps.[ 06-17-2002: Message edited by: DoughBoy ]</p> Sign In or Register to comment.