Archiv 7. Oktober 2010

Donnerstag, 7. Oktober 2010

Mit AppleScript den Namen der Applikation im Vordergrund auslesen

Beim Upgrade von Mac OS X 10.4 (Tiger) auf Mac OS X 10.5 (Leopard) musste ich folgenden Code anpassen:

tell application "System Events"
	set app_name to name of the second process whose frontmost is true
end tell

… wurde neu zu …

tell application "System Events"
	set app_name to name of item 1 of (every process whose frontmost is true)
end tell

Quelle: Writing AppleScripts That Dynamically Target Either Safari or WebKit

Tags: ,
Labels: IT

Keine Kommentare | neuen Kommentar verfassen