iChatStatus 1.2.1 / Eigenes Script

freeek!

freeek!

Aktives Mitglied
Thread Starter
Dabei seit
10.11.2002
Beiträge
618
Reaktionspunkte
0
Hi!

Ich habe mir http://www.ittpoi.com/ichatstatus geladen und bin damit absolut zufrieden (hi David :D ).

Aber mein Problem liegt mehr darin, das ich mir ein eigenes Script gemacht habe, was folgendes macht.
iChat staren, wenn iTunes an -> iTunesstatus wird übernommen, wenn iTunes off -> die gerade geöffnete App. wird angezeigt (working with ...!), wenn diese App. dann auch noch Safari ist dann wird Safari to ... (Fesntername) gezeigt :D

Bevor ihr jetzt denk, mensch da hast ja toll was gebastelt - nein hab nur die angefügten Scripts zusammen gepackt!


Was jetzt aber passiert ...
Rechner starten, dann wird per AutoStartProgramme "iChatSet" geladen, was zu iChatStatus gehört ... es fragt mein Script ab und dann werden meine definierten Apps. geladen, heist es laden automatisch iTunes und Safari ... arrrgh - wieso das?

Hier mal das Script evtl. fällt jemanden ja ein Fehler auf, bzw. eine Möglichkeit nur die aktivität des Tools abzufragen und nicht es zu starten!

--- Script --- die "Einrückung" müsst ihr euch jetzt mal denken ...

tell application "System Events"
if ((application processes whose (name is equal to "iTunes")) count) is greater than 0 then
tell application "iTunes"
if player state is playing then
set the_artist to artist of current track
set the_song to name of current track
if the_artist is not missing value then
return "iTunes plays " & the_song & " from " & the_artist
else
return "iTunes plays " & the_song
end if
else if player state is paused then
return "iTunes is paused"
else if player state is stopped then
return "iTunes plays ... lovely silence!"
end if
end tell
else
tell application "System Events"
set appName to name of item 1 of (application processes whose frontmost is true)
if appName is "ScreenSaverEngine" then
set appName to "Screen Saver - i think i'am away!"
else if appName is "Microsoft Entourage" then
set appName to " checking my emails!"
else if appName is "iPhoto" then
set appName to " viewing some pictures!"
else if appName is "Internet Explorer" then
set appName to " working on www.dk-online.de"
else if appName is "Netscape" then
set appName to " just surfing around!"
else if appName is "iChat" then
set appName to " talking via iChat!"
else if appName is "Reunion 8" then
set appName to " study of my ancestors"
else if appName is "Toast Lite" then
set appName to " burning cds!"
else if appName is "Microsoft Word" then
set appName to " working with Word!"
else if appName is "Microsoft Excel" then
set appName to " working with Excel!"
else if appName is "Microsoft PowerPoint" then
set appName to " working with PowerPoint!"
else if appName is "Dreamweaver MX" then
set appName to " working with DreamWeaver MX!"
else if appName is "Photoshop Elements 2.0" then
set appName to " working with Photoshop Elements 2!"
else if appName is "Palm Desktop" then
set appName to " working with Palm Desktop!"
else if appName is "LimeWire" then
set appName to " leeching music!"
else if appName is "Sherlock" then
set appName to " working with Sherlock!"
else if ((application processes whose (name is equal to "Safari")) count) is greater than 0 then
tell application "Safari"
if (count of windows) is greater than 0 then
return "?Safari to " & name of front window
end if
end tell
end if
return "?" & appName
end tell
end if
end tell

--- end script ---

Hat jemand ne Ahnung ?!? - Biiiiittttee :D
 
törööö!

Hi ...

So, ein neuer Morgen, neues Glück!
Und siehe da ... Fehler gefunden.

Ich habe nachdem die Variante mit iTunes abgefragt wurde leider ein weiteres:
tell application "System Events"
eingebaut!

Ist einfach zuviel und fragt nicht ab, ob die App. läuft und dann den Status, sondern fordert die App. an. Somit wurde diese dann auch gestartet :eek:

Also, jetzt funzt es!
Und wenn jemand Interesse an dem Script hat, einfach ne PM :D
Denn jetzt geht es ...
 
Zurück
Oben Unten