-- This script creates an ad-hoc network with a password and changes your
-- network location.
--
-- I just added network passwords and network locations to a script which
-- comes from StefanK:
-- http://bbs.macscripter.net/viewtopic.php?pid=99243
-- Set NetworkName to be the name of the wireless network you wish
-- to create. This will also attempt to set the network location
-- to that name as well.
-- Set NetworkPassword to be your wireless network password. It MUST BE
-- 13 characters long (or 26 hex digits).
property NetworkName : "MyAdHocNetwork"
property NetworkPassword : "thirteenchars"
property CreateMenuName : "Create Network…"
try
do shell script "/usr/sbin/scselect " & NetworkName
delay 2
end try
tell application "System Events"
tell process "SystemUIServer"
tell menu bar 1
set menu_extras to value of attribute "AXDescription" of menu bar items
repeat with the_menu from 1 to the count of menu_extras
if item the_menu of menu_extras is "Airport Menu Extra" then exit repeat
end repeat
tell menu bar item the_menu
perform action "AXPress"
delay 0.2
perform action "AXPress" of menu item CreateMenuName of menu 1
end tell
end tell
repeat until exists window 1
delay 0.5
end repeat
tell window 1
keystroke NetworkName
click checkbox 1
keystroke NetworkPassword
keystroke tab
keystroke NetworkPassword
click pop up button 2
click menu item 2 of menu 1 of pop up button 2
delay 0.5
click button 1
end tell
end tell
end tell
Weil ich den Mini auch ins Auto mit nehme.
Danke.
Kann einer mit der Fehler Meldung was anfangen?
error "„System Events“ hat einen Fehler erhalten: „menu item \"NetzwerkMini\" of menu 1 of menu bar item 8 of menu bar 1 of process \"SystemUIServer\"“ kann nicht gelesen werden." number -1728 from menu item "NetzwerkMini" of menu 1 of menu bar item 8 of menu bar 1 of process "SystemUIServer"
ich habe die etwas weiter untere für 10.6 genommen
property NetworkName : "MacMiniServer"
property NetworkPassword : "Passwort"
property CreateMenuName : "NetzwerkMini"
try
do shell script "/usr/sbin/scselect " & NetworkName
delay 2
end try
tell application "System Events"
tell process "SystemUIServer"
tell menu bar 1
set menu_extras to value of attribute "AXDescription" of menu bar items
repeat with the_menu from 1 to the count of menu_extras
if item the_menu of menu_extras is "Airport Menu Extra" then exit repeat
end repeat
tell menu bar item the_menu
perform action "AXPress"
delay 0.2
perform action "AXPress" of menu item CreateMenuName of menu 1
end tell
end tell
repeat until exists window 1
delay 0.5
end repeat
tell window 1
keystroke NetworkName
click checkbox 1
keystroke tab
keystroke tab
keystroke tab
keystroke NetworkPassword
keystroke tab
keystroke NetworkPassword
click pop up button 2
click menu item 2 of menu 1 of pop up button 2
delay 0.5
click button 1
end tell
end tell
end tell
property NetworkName : "MacMiniServer"
property NetworkPassword : "Passwort"
property CreateMenuName : "NetzwerkMini"
try
do shell script "/usr/sbin/scselect " & NetworkName
delay 2
end try
tell application "System Events"
tell process "SystemUIServer"
tell menu bar 1
set menu_extras to value of attribute "AXDescription" of menu bar items
repeat with the_menu from 1 to the count of menu_extras
if item the_menu of menu_extras is "Airport Menu Extra" then exit repeat
end repeat
tell menu bar item the_menu
perform action "AXPress"
delay 0.2
perform action "AXPress" of menu item CreateMenuName of menu 1
end tell
end tell
repeat until exists window 1
delay 0.5
end repeat
tell window 1
keystroke NetworkName
click checkbox 1
keystroke tab
keystroke tab
keystroke tab
keystroke NetworkPassword
keystroke tab
keystroke NetworkPassword
click pop up button 2
click menu item 2 of menu 1 of pop up button 2
delay 0.5
click button 1
end tell
end tell
end tell
error "„System Events“ hat einen Fehler erhalten: „menu item \"NetzwerkMini\" of menu 1 of menu bar item 8 of menu bar 1 of process \"SystemUIServer\"“ kann nicht gelesen werden." number -1728 from menu item "NetzwerkMini" of menu 1 of menu bar item 8 of menu bar 1 of process "SystemUIServer"
Wir verwenden essentielle Cookies, damit diese Website funktioniert, und optionale Cookies, um den Komfort bei der Nutzung zu verbessern.
Für die Ihnen angezeigten Verarbeitungszwecke können Cookies, Geräte-Kennungen oder andere Informationen auf Ihrem Gerät gespeichert oder abgerufen werden.
Anzeigen und Inhalte können basierend auf einem Profil personalisiert werden. Es können mehr Daten hinzugefügt werden, um Anzeigen und Inhalte besser zu personalisieren. Die Performance von Anzeigen und Inhalten kann gemessen werden. Erkenntnisse über Zielgruppen, die die Anzeigen und Inhalte betrachtet haben, können abgeleitet werden. Daten können verwendet werden, um Benutzerfreundlichkeit, Systeme und Software aufzubauen oder zu verbessern.
Durch das Klicken des Buttons "Zustimmen" willigen Sie gem. Art. 49 Abs. 1 DSGVO ein, dass auch Anbieter in den USA Ihre Daten verarbeiten. In diesem Fall ist es möglich, dass die übermittelten Daten durch lokale Behörden verarbeitet werden.