Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
Autor |
Nachricht |
Chris_Zuerich •->

Anmeldedatum: 09.05.2010 Beiträge: 2 Wohnort: Zürich
|
Verfasst am: 09.05.2010 - 12:47 Titel: Entourage 2008 und AS |
|
|
Geehrte Spezialist/inn/en
Ich habe ein Script (nachfolgend), welches aus dem AppleScript-Editor gestartet bestens funktioniert. Es hat zur Aufgabe, den Typ des gerade in Entourage 2008 selektierten Eintrags zu ermitteln, damit gestützt darauf alles weitere bestimmt werden kann. Wird das Scirpt nun aus dem Entourage Script-Menü (oder aus dem Script-Menü des Finders gestartet, werden E-Mails, die ausgewählt wurden, nicht mehr erkannt und das Script gibt eine "ungültige Auswahl" zurück (wenn effektiv kein Mail, Termin, Aufgabe oder Kontakt gewählt ist, meldet es korrekt "Bitte ... auwählen").
Gibt es für dieses Verhalten a) eine Erklärung und - besser noch - b) Abhilfe ?
Herzlichen Dank für jeden Hinweis.
property pNoSubjectString : "(kein Betreff)"
tell application "Microsoft Entourage"
-- activate
try
set theSelection to selection of the first window
on error
beep
display dialog "Bitte ein Mail, einen Termin oder eine Aufgabe auswählen !" buttons {"OK"} with icon 2
return
end try
if class of theSelection is list then
try
set theObject to item 1 of theSelection
-- falls es ein E-Mail ist
if ((class of theObject) as string) contains "message" then
display dialog "E-Mail ausgewählt, Funktion noch nicht implementiert." buttons {"OK"} with icon 1
else if class of theObject is event then
display dialog "Termin ausgewählt, Funktion noch nicht implementiert." buttons {"OK"} with icon 1
else if class of the theObject is task then
display dialog "Aufgabe ausgewählt, Funktion noch nicht implementiert." buttons {"OK"} with icon 1
--falls ein Kontakt ausgewähl wurde:
else if class of the theObject is contact then
display dialog "Kontakt ausgewählt, Funktion noch nicht implementiert." buttons {"OK"} with icon 1
else
display dialog "ungültige Auswahl" buttons {"OK"} with icon 2
end if
on error
beep
display dialog "Bitte ein Mail, einen Termin oder eine Aufgabe auswählen !" buttons {"OK"} with icon 2
end try
else
beep
display dialog "Bitte ein Mail, einen Termin oder eine Aufgabe auswählen !" buttons {"OK"} with icon 2
end if
end tell
 _________________ OS X 10.6.3. |
|
Nach oben |
|
 |
hubionmac •--->


Anmeldedatum: 26.02.2004 Beiträge: 245 Wohnort: Münster
|
Verfasst am: 01.03.2011 - 14:44 Titel: |
|
|
So hat es am Ende bei mir funktioniert....
Zitat: | property pNoSubjectString : "(kein Betreff)"
tell application "Microsoft Entourage"
-- activate
try
set theSelection to selection of the first window
on error
beep
display dialog "Bitte ein Mail, einen Termin oder eine Aufgabe auswählen !" buttons {"OK"} with icon 2
return
end try
set mymailclasses to {incoming message, outgoing message, message}
if class of theSelection is list then
try
set theObject to item 1 of theSelection
-- falls es ein E-Mail ist
if class of theObject is in mymailclasses then
display dialog "E-Mail ausgewählt, Funktion noch nicht implementiert." buttons {"OK"} with icon 1
else if class of theObject is (event) then
display dialog "Termin ausgewählt, Funktion noch nicht implementiert." buttons {"OK"} with icon 1
else if class of the theObject is task then
display dialog "Aufgabe ausgewählt, Funktion noch nicht implementiert." buttons {"OK"} with icon 1
--falls ein Kontakt ausgewähl wurde:
else if class of the theObject is contact then
display dialog "Kontakt ausgewählt, Funktion noch nicht implementiert." buttons {"OK"} with icon 1
else
display dialog "ungültige Auswahl" buttons {"OK"} with icon 2
end if
on error
beep
display dialog "Bitte ein Mail, einen Termin oder eine Aufgabe auswählen !" buttons {"OK"} with icon 2
end try
else
beep
display dialog "Bitte ein Mail, einen Termin oder eine Aufgabe auswählen !" buttons {"OK"} with icon 2
end if
get class of (item 1 of theSelection)
end tell |
in das Forum schaue ich nur alle halbe Jahre mal rein, AppleScript X ist belebter. _________________ hubionmac.com akzeptiere Paypal und Pizza |
|
Nach oben |
|
 |
|
|
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
Powered by phpBB © 2001, 2002 phpBB Group Deutsche Übersetzung von phpBB.de
|
|
|