Push-Nachrichten von MacTechNews.de
Würden Sie gerne aktuelle Nachrichten aus der Apple-Welt direkt über Push-Nachrichten erhalten?
Forum>Software>Mal wieder AppleScript Problem

Mal wieder AppleScript Problem

fluppy
fluppy17.07.1102:25
Folgendes AppleScript habe ich:
tell application "Quartz Debug"
    launch
    delay 1
end tell
tell application "System Events"
    tell process "Quartz Debug"
        tell menu bar 1
            tell menu bar item "Tools"
                tell menu "Tools"
                    click menu item "Enable QuartzGL"
                end tell
            end tell
        end tell
    end tell
end tell
do shell script "killall -9 'Quartz Debug'"
Es erscheint der Fehler:
„System Events“ hat einen Fehler erhalten: „menu item "Enable QuartzGL" of menu "Tools" of menu bar item "Tools" of menu bar 1 of process "Quartz Debug"“ kann nicht gelesen werden.
Was mache ich falsch?
0

Kommentare

fluppy
fluppy17.07.1112:00
Niemand eine Idee?? Anscheinend mache ich etwas falsch beim Zugriff auf den Menüpunkt. Ich möchte, dass QuartzDebug gestartet wird, dann im Menü "Tools" auf "Enable Quartz Debug" geklickt wird. Danach wird Quartz Debug sofort-beendet.
0
_mäuschen
_mäuschen17.07.1112:33



0
_mäuschen
_mäuschen17.07.1115:08

Oben wird getogglet


und hier nur Enabled

tell application ("Quartz Debug") to activate
tell application "System Events" to tell process ("Quartz Debug") ¬
    to tell menu bar 1 to tell menu bar item 4 to tell menu 1
    if (get name of menu item 4) contains "Enable" then
        click menu item 4
    end if
end tell

0
_mäuschen
_mäuschen17.07.1115:21

Und hier war mal was ähnliches

0
fluppy
fluppy21.07.1113:32
Danke, das ursprüngliche Script geht jetzt doch, es fehlt nur Dein Check, ob der Menüpunkt noch "Enable..." heisst.
0

Kommentieren

Diese Diskussion ist bereits mehr als 3 Monate alt und kann daher nicht mehr kommentiert werden.