jockel06
Aktives Mitglied
Thread Starter
- Dabei seit
- 16.12.2007
- Beiträge
- 1.213
- Reaktionspunkte
- 67
Hallo Leute ich habe gestern herausgefunden, weil ich es vorher nie brauchte, dass man den iMac als WLAN repeater nutzen kann, doch wenn man die Internet Freigabe gesetzt hat geht der iMac nicht in den Ruhezustand, nun habe ich im Netz ein Applescript gefunden, welches das beim einschalten und ausschalten automatisch regeln soll:
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
click menu item "Sharing" of menu "View" of menu bar 1
delay 10
tell window "Sharing"
if (exists tab group 1) then
tell tab group 1
click radio button "Internet"
delay 1
click button "Start"
delay 1
end tell
end if
if exists sheet 1 then
tell sheet 1
click button "Start"
end tell
end if
end tell
end tell
end tell
ignoring application responses
tell application "System Preferences" to quit
end ignoring
Doch beim Ausführen kommt eine Fehlermeldung:
error "„System Events“ hat einen Fehler erhalten: „menu bar 3 of process \"System Preferences\"“ kann nicht gelesen werden. Ungültiger Index." number -1719 from menu bar 3 of process "System Preferences"
Leider kenn ich mich mit Applescript nicht aus, ich kopiere nur das in den Applescript Editor, was ich im Netz finde.
Wer weiss Rat ???
Danke im Voraus
Gruß Volker
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
click menu item "Sharing" of menu "View" of menu bar 1
delay 10
tell window "Sharing"
if (exists tab group 1) then
tell tab group 1
click radio button "Internet"
delay 1
click button "Start"
delay 1
end tell
end if
if exists sheet 1 then
tell sheet 1
click button "Start"
end tell
end if
end tell
end tell
end tell
ignoring application responses
tell application "System Preferences" to quit
end ignoring
Doch beim Ausführen kommt eine Fehlermeldung:
error "„System Events“ hat einen Fehler erhalten: „menu bar 3 of process \"System Preferences\"“ kann nicht gelesen werden. Ungültiger Index." number -1719 from menu bar 3 of process "System Preferences"
Leider kenn ich mich mit Applescript nicht aus, ich kopiere nur das in den Applescript Editor, was ich im Netz finde.
Wer weiss Rat ???
Danke im Voraus
Gruß Volker