GUI Script, Datum und Uhrzeit verstellen

Pollibus

Mitglied
Thread Starter
Dabei seit
15.02.2006
Beiträge
22
Reaktionspunkte
0
Hallo, ich versuche (ohne jegliche Vorkenntnisse, anfängerfehler sind also zu erwarten^^) Ein AS zu schreiben mit dem ich das Datum meines Macs umzustellen, die automatische Apple-Zeit einstellung auszumachen und ein Script vice versa.

Hier mal was ich schon habe:
Code:
tell application "System Preferences"
	activate
end tell

tell application "System Events"
	tell process "System Preferences"
		tell menu bar 1
			tell menu bar item "Einstellungen"
				tell menu "Einstellungen"
					click menu item "Datum & Uhrzeit"
					tell window "Datum & Uhrzeit"
						tell tab group 1
							tell group 1
								click checkbox "Datum & Uhrzeit autom. einstellen:"
							end tell
						end tell
					end tell
				end tell
			end tell
		end tell
	end tell
end tell

Ich bekomme aber nur einen Fehler!?

Danke für jede Hilfe,
Pollibus
****
 
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.datetime"
end tell

tell application "System Events"
tell process "System Preferences"
tell group 1 of tab group 1 of window "Datum & Uhrzeit"
set timeserver to get value of checkbox "Datum & Uhrzeit autom. einstellen:"
if timeserver as boolean then
click checkbox "Datum & Uhrzeit autom. einstellen:"
end if
set value of UI element 6 to date "21. Februar 2006 7:24:12"
click button "Einstellen"
end tell
end tell
end tell

--debug
--return get value of every UI element of group 1 of tab group 1 of window "Datum & Uhrzeit"
--return get name of every UI element of group 1 of tab group 1 of window "Datum & Uhrzeit"

--ohne ui-scripting
--set mydate to "011316271985" --mmddhhmmyyyy
--do shell script "date " & mydate with administrator privileges

bei Fehlermeldung unter Bedienungshilfen "Zugriff für Hilfsgeräte aktivieren"

tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
end tell
 
Zurück
Oben Unten