Airport per Skript deaktivieren

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Airport per Skript deaktivieren

      Hallo
      ich habe ein Script im Netz gefunden mit dem man Bluetooth aktivieren und deaktivieren kann :

      tell application "System Events" to tell the front menu bar of process "SystemUIServer"
      try
      click bt_menu
      tell the second menu item of the front menu of bt_menu to if title contains "Bluetooth" then
      click
      else
      error
      end if
      on error
      repeat with x in menu bar items
      click x
      try
      if the title of the first menu item of the front menu of x starts with "Bluetooth" then exit repeat
      end try
      end repeat
      set bt_menu to x
      try
      tell the second menu item of the front menu of bt_menu to if title contains "Bluetooth" then
      click
      else
      error
      end if
      on error
      click bt_menu
      display alert "Bluetooth Menu Extra not found."
      end try
      end try
      end tell

      Jetzt habe ich versucht mit diesem Script auch Airport ein- bzw. auszuschalten, in dem ich einfach den Text "Bluetooth" gegen "Airport" ausgetauscht habe.
      Das funktioniert leider nicht, obwohl das Airport-Icon auch in der Menüleiste angezeigt wird.

      Ist es überhaupt möglich Airport über ein Skript zu deaktivieren und wenn wie funktioniert es?

      Gruß Michael
    • Hallo,

      schau mal hier: Airport per Skript deaktivieren. Dort wird jeder fündig!

      Registrieren bzw. einloggen, um diese und auch andere Anzeigen zu deaktivieren
    • Ja Du müsstest das ganze Skript durchlesen und die Menustruktur anschauen dann würdest Du auf folgendes Ergebnis kommen:

      tell application "System Events" to tell the front menu bar of process "SystemUIServer"
      try
      click bt_menu
      tell the second menu item of the front menu of bt_menu to if title is "AirPort deaktivieren" then
      click
      delay 1
      else
      error
      end if
      on error
      repeat with x in menu bar items
      click x
      try
      if the title of the second menu item of the front menu of x starts with "AirPort deaktivieren" then exit repeat
      end try
      end repeat
      set bt_menu to x
      try
      tell the second menu item of the front menu of bt_menu to if title is "AirPort deaktivieren" then
      click
      else
      error
      end if
      on error
      click bt_menu
      end try
      end try
      end tell
      Core2Duo 2.16GHz; 3GRAM; 10.5.5; iPhone 3G 2.1
      A Trick of the Tail; Foxtrot; Nursery Cryme