Tja so richtig zum Erfolg hat es leider nicht gereicht.
Ich habe mein Script nun nicht als Programm abgespeichert sondern das Script mit der Endung SCPT belassen und diese Datei zum Starten angegeben.
Leider tut sich nichts.
Im Log kann ich leider auch nichts erkennen.
hier ein Ausschnitt
12:39:18 T:2898156072 DEBUG: OnKey: down (f081) pressed, action is Down
12:39:19 T:2898156072 DEBUG: SDLKeyboard: scancode: 7d, sym: 0112, unicode: f701, modifier: 0
12:39:19 T:2898156072 DEBUG: OnKey: down (f081) pressed, action is Down
12:39:19 T:2898156072 DEBUG: SDLKeyboard: scancode: 24, sym: 000d, unicode: 000d, modifier: 0
12:39:19 T:2898156072 DEBUG: OnKey: return (f00d) pressed, action is Select
12:39:19 T:2898156072 DEBUG: ExecuteXBMCAction : Translating RunAppleScript(special://masterprofile/Logout.scpt)
12:39:19 T:2898156072 DEBUG: ExecuteXBMCAction : To RunAppleScript(special://masterprofile/Logout.scpt)
12:39:20 T:2898156072 DEBUG: ------ Window Deinit (DialogButtonMenu.xml) ------
12:39:24 T:2898156072 INFO: Python, unloading python shared library because no scripts are running anymore
12:39:29 T:2898156072 DEBUG: SDLKeyboard: scancode: 00, sym: 0136, unicode: 0000, modifier: 0
12:39:29 T:2898156072 DEBUG: GetActionCode: Trying Hardy keycode for 0xf200
12:39:29 T:2898156072 DEBUG: Previous line repeats 3 times.
12:39:29 T:2898156072 DEBUG: OnKey: 0 (f200) pressed, action is
12:39:30 T:2898156072 DEBUG: CAnnouncementManager - Announcement: OnQuit from xbmc
12:39:30 T:2898156072 DEBUG: GOT ANNOUNCEMENT, type: 4, from xbmc, message OnQuit
12:39:30 T:2957578240 DEBUG: Thread Jobworker 2957578240 terminating (autodelete)
12:39:30 T:2960240640 DEBUG: Thread Jobworker 2960240640 terminating (autodelete)
12:39:30 T:2958110720 DEBUG: Thread Jobworker 2958110720 terminating (autodelete)
12:39:30 T:2958643200 DEBUG: Thread Jobworker 2958643200 terminating (autodelete)
12:39:30 T:2898156072 NOTICE: Storing total System Uptime
das wäre das Script wobei der Bereich der Interessant ist zu Testzwecken über einen Dialog ausgegeben wird.
set LocalIP to do shell script "ifconfig en0|grep 'inet '|cut -d ' ' -f 2"
set ServeriP to "10.0.0.1"
if LocalIP is ServeriP then
display dialog "Logout am Server"
# tell application "System Events"
# [definition='1','0']log[/definition] out
# end tell
else
display dialog "Logout and sleep local"
# tell application "System Events"
# [definition='1','0']log[/definition] out
# sleep
# end tell
end if
hier noch der Auszug aus der XLS Datei wo ich das onclick event bearbeitet habe
<control type="button" id="6">
<description>Suspend button</description>
<width>340</width>
<height>40</height>
<textcolor>grey2</textcolor>
<focusedcolor>white</focusedcolor>
<align>center</align>
<textwidth>290</textwidth>
<texturefocus border="25,5,25,5">ShutdownButtonFocus.png</texturefocus>
<texturenofocus border="25,5,25,5">ShutdownButtonNoFocus.png</texturenofocus>
<onclick>RunAppleScript(special://masterprofile/Logout.scpt)</onclick>
<visible>System.CanSuspend</visible>
<pulseonselect>no</pulseonselect>
<font>font13</font>
<label>13011</label>
</control>
Tja ich hoffe ihr könnt mir weiterhelfen. !?!?
Ciao