Applescript zum Öffnen des Netzwerkfensters von Audio MIDI Setup

540
user3238732

Ich versuche, ein Applescript zum Erstellen einer Netzwerk-Audioverbindung mit dem Audio-MIDI-Setup ( / Programme / Dienstprogramme / Audio-MIDI-Setup.app ) zu schreiben . Ich kann das Netzwerk-Setup- Fenster nicht öffnen . Es scheint ein Bild zu geben, auf das ich klicken muss, um das Netzwerkfenster zu öffnen.

Das habe ich versucht:

 tell application "System Events" tell process "Audio MIDI Setup" set to position of image 1 of group 1 of scroll area 1 of window "MIDI Studio" end tell end tell  tell me to do shell script "/usr/bin/cliclick c:" & xPos & "," & yPos click at --image "Network" of group 1 of scroll area 1 of window "MIDI Studio" delay 0.1 --click image "Network" of group 1 of scroll area 1 of window "MIDI Studio" 
0

2 Antworten auf die Frage

0
CJK

Sie haben Recht, dass das von Ihnen erwähnte Bild mit einer AppleScript-Aktion verbunden ist, die das MIDI Network Setup- Fenster öffnen soll, aber in Wirklichkeit tut es nichts.

Um dieses Problem zu umgehen, versuchen Sie Folgendes, um das Fenster " MIDI Network Setup" zu öffnen :

 tell application "Audio MIDI Setup" to activate  tell application "System Events" to tell process "Audio MIDI Setup"  (******************Variable declarations for GUI objects*******************) set _W to a reference to (every window whose ¬ description contains "floating window" and ¬ name is not "MIDI Network Setup") set select_all_menu_item to ¬ a reference to menu item "Select All" of ¬ menu 1 of ¬ menu bar item "Edit" of ¬ menu bar 1 set show_midi_studio_menu_item to ¬ a reference to menu item "Show MIDI Studio" of ¬ menu 1 of ¬ menu bar item "Window" of ¬ menu bar 1 set midi_studio_window to a reference to window "MIDI Studio" set midi_studio_toolbar to a reference to toolbar 1 of midi_studio_window set midi_studio_images to a reference to images of ¬ group 1 of ¬ scroll area 1 of ¬ midi_studio_window set show_info_button to a reference to (the first button of ¬ midi_studio_toolbar whose description is "Show Info") (**********************End of variable declarations************************)  if not (midi_studio_window exists) then click show_midi_studio_menu_item tell midi_studio_window to perform action "AXRaise" -- bring window to front  if the front window is midi_studio_window then tell select_all_menu_item to if it exists then click it --OR: keystroke "a" using command down  if the show_info_button is enabled then click the show_info_button click (every button of _W whose subrole is "AXCloseButton")  tell window "MIDI Network Setup" to perform action "AXRaise" end if end if end tell 

Wenn du Probleme hast, hinterlasse einen Kommentar und ich melde mich bei dir. Andernfalls sollten Sie diese Antwort auswählen, um andere Benutzer darauf aufmerksam zu machen, wenn ähnliche Probleme auftreten.

Lassen Sie keine Kommentare als Antworten. Schreiben Sie auch Ihre Kommentare gegen meine Antwort, wenn sie sich darauf beziehen, wie Ihre. Ich bin nur zufällig hierher zurückgekommen, sonst hätte ich keine Ahnung, dass du versucht hast zu antworten. Welche Version von MacOS und AppleScript verwenden Sie? CJK vor 6 Jahren 0
0
user3238732

Dieses Skript führt die Aufgabe aus, die Anwendung "Audio MIDI Setup" zu aktivieren, um die Anwendung "System Events" zu aktivieren

 if name is "Show MIDI Studio" then click  end tell end tell tell process "Audio MIDI Setup" set to position of image "Network (Online)" of group 1 of scroll area 1 of window "MIDI Studio" do shell script "/usr/local/bin/cliclick dc:" & xPos & "," & yPos & "" end tell 

Beenden Sie das Programm "Audio MIDI Setup", um die Anwendung zu beenden