Navigation mit Dialogen

MacNoob20

Aktives Mitglied
Thread Starter
Dabei seit
30.01.2020
Beiträge
171
Reaktionspunkte
10
Hi!

Ich möchte mittels Dialogfenstern durch verschiedene Apps navigieren:

Code:
#---------------
#Navigation mit Dialogen
#---------------

display dialog "Hi!"

tell application "Microsoft Word"
    activate
    open "/Users/MacNoob20/Desktop/Test.docx"
end tell

display dialog "Word"

tell application "Thunderbird"
    activate
end tell

display dialog "Thunderbird"

tell application "Google Chrome"
    activate
end tell

display dialog "Chrome"

Das klappt gut, so lange ich es auf einem Desktop mache bzw. die Programme nicht im Vollbild sind.

Sobald ich den Dialog aber z.B. bei Chrome im Vollbild beginne, springt er wie gewollt zum anderen Desktop mit Word und Thunderbird. Zurück zu Chrome geht es allerdings erst NACH Klick auf 'OK' im letzten Dialogfenster.

Wie kann ich das letzte Dialogfenster wieder vor Chrome im Vollbild anzeigen? Bzw. wie kann ich eine App immer direkt nach dem Dialog in den Vordergrund bringen, auch, wenn sie im Vollbild ist?

Danke!
 
Code:
tell application "System Events"
   tell application process "Chrome"
     set frontmost to true
   end tell
end tell
 
  • Gefällt mir
Reaktionen: mausfang
HI, danke, aber das funktioniert bei mir leider nicht. Ich springe trotzdem erst nach klick auf OK auf den Bildschirm mit Chrome.
 
Code:
#---------------
#Navigation mit Dialogen
#---------------

display dialog "Hi!"

tell application "Microsoft Word"
    activate
    open "/Users/MacNoob20/Desktop/Test.docx"
end tell

display dialog "Word"

tell application "Thunderbird"
    activate
end tell

display dialog "Thunderbird"

tell application "System Events"
    tell application process "Chrome"
        set frontmost to true
    end tell
end tell

display dialog "Chrome"

So :)
 
Zurück
Oben Unten