Apple Script and keys

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?


  • Reply 1 of 1
    doughboydoughboy Posts: 47member

    You can try downloading a free scripting addition called <a href=""; 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"


    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 tell

    end 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.