Keystroke und Umlaute in AppleScript

Umlaute wie ö, ä oder so in AppleScript zu tippen ist etwas schwierig, auch wenn man sich die Ascii Nummer der Umlautes ausgeben lässt.. der folgende Code tut schafft es aber, indem er eben genau die Tastenkombinationen
ausführt, die auf einer amerikanischen Tastatur nötig wären, um einen Umlaut zu schreiben (Achtung, beim Ausführen direkt im Skript Editor das Skript nicht über einen ShortCut, sondern über einen Klick starten ;=) ):

tell application "System Events"

set k to name of every application process whose frontmost is true

end tell

set k to k as text

tell application k

tell application "System Events"

keystroke "u" using option down

keystroke "u"

end tell

end tellü

This entry was posted in OS X and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA:


7 + = eight

Subscribe without commenting

  • Seite übersetzen:


    Paypal for Pizza:




  • Kategorien


  • Letzte Kommentare

    • Niklas: Vielen Vielen Dank! So klappt es!
    • hubi: Servus Niklas, ich habe mir den Quellcode noch einmal angesehen und habe nun unter 10.7.3 einen Weg gefunden...
    • Niklas: Klingt super das Script. Leider bekomm ich immer folgende Fehlermeldung: error “„Mail“ hat einen Fehler...
    • Jürgen: Hallo Hubi, beim Abfragen von Kennworten gibt es noch eine böse Falle: Das Format, in dem security antwortet,...
    • hubi: Am einfachsten Du öffnest im AppleScript-Editor mal das Funktionsverzeichnis (unter Ablage) von iTunes. Ein...