Erinnerungs App

S

Schmedt

Neues Mitglied
Thread Starter
Dabei seit
27.01.2019
Beiträge
14
Reaktionspunkte
0
Hallo zusammen,

Ich habe ein Skript. welches mir aus der Mail direkt eine Erinnerung in die "Errinnerung -App " einträgt. Das funktioniert aus alles soweit prima.
Wenn Ich in der Erinnerung -App direkt einen neuen Eintrag tätige gibt es auf der Rechten Seite das (i) wo ich die Priorität und eine URL eintragen kann.
Mein Problem ist , dass ich nicht weis, wie ich die URL im Apple Skript direkt anspreche .

name = der Titel der Errinnerung
body = sind die Notizen
remind me date = der Erinnerungstag
URL = ?
Priorität = ?

Könnte mir da jemand weiterhelfen?

Vielen Dank schon mal


Gruß

Schmidt
 
Magst das Skript mal zeigen?
 
Hier ist mein Code

Code:
#tell application "Mail"

#    set _selection  to selection
#    set _message to item 1 of _selection
#    set _from to (sender of _message as string)
#    set _subject to (subject of _message as string)
#    set _body to content of _message
#    set _body to paragraph 1 of _body & return & paragraph 2 of _body & return & paragraph 3 of _body
#    set _ID to message id of _message
#    set _URL to "message://%3c" & _ID & "%3e"
#    set _alarm to ((current date) + 2 * days)
#    set time of _alarm to 60 * 60 * 9
#end tell

#tell application "Reminders"
#    make new reminder with properties {name:"1. Nachfassen", body:"Von: " & _from & return & _body & return & _URL, remind me date:_alarm}
#end tell

using terms from application "Mail"
    
    on perform mail action with messages theMessages for rule theRule
        
        
        tell application "Mail"
            
            repeat with _message in theMessages
                
                
                set _from to (sender of _message as string)
                
                
                set _subject to (subject of _message as string)
                
                
                set _body to content of _message
                
                
                set _body to paragraph 1 of _body & return & paragraph 2 of _body & return & paragraph 3 of _body
                
                
                set _ID to message id of _message
                
                
                set _URL to "message://%3c" & _ID & "%3e"
                
                #set _URL to "message://" & _ID
                
                set _alarm to ((current date) + 2 * days)
                
                
                set time of _alarm to 60 * 60 * 9
                
                
                
                
                tell application "Reminders"
                    
                    
                    make new reminder with properties {name:"1. Nachfassen", body:"Von: " & _from & return & _body & return & _URL, remind me date:_alarm}
                    
                    #make new reminder with properties {name:"1. Nachfassen", URL:_URL, remind me date:_alarm}
                    
                end tell
                
                
            end repeat
            
        end tell
        
        
        tell application "Mail"
            
            repeat with _message in theMessages
                
                
                set _from to (sender of _message as string)
                
                
                set _subject to (subject of _message as string)
                
                
                set _body to content of _message
                
                
                set _body to paragraph 1 of _body & return & paragraph 2 of _body & return & paragraph 3 of _body
                
                
                set _ID to message id of _message
                
                
                set _URL to "message://%3c" & _ID & "%3e"
                
                
                set _alarm to ((current date) + 14 * days)
                
                
                set time of _alarm to 60 * 60 * 9
                
                
                
                
                tell application "Reminders"
                    
                    
                    make new reminder with properties {name:"2. Nachfassen", body:"Von: " & _from & return & _body & return & _URL, remind me date:_alarm}
                    
                    
                end tell
                
            end repeat
            
        end tell
        
        
        tell application "Mail"
            
            repeat with _message in theMessages
                
                
                set _from to (sender of _message as string)
                
                
                set _subject to (subject of _message as string)
                
                
                set _body to content of _message
                
                
                set _body to paragraph 1 of _body & return & paragraph 2 of _body & return & paragraph 3 of _body
                
                
                set _ID to message id of _message
                
                
                set _URL to "message://%3c" & _ID & "%3e"
                
                
                set _alarm to ((current date) + 60 * days)
                
                
                set time of _alarm to 60 * 60 * 9
                
                
                
                
                tell application "Reminders"
                    
                    
                    make new reminder with properties {name:"3. Nachfassen", body:"Von: " & _from & return & _body & return & return & _URL, remind me date:_alarm}
                    #make new reminder with properties {name:"3. Nachfassen", body:"Von: " & _from & return & _body & return & return & _URL, URL:_URL, remind me date:_alarm}
                    
                    
                end tell
                
                
            end repeat
            
        end tell
        
    end perform mail action with messages
end using terms from

ich hoffe das hilft weiter

Danke
 
Hallo,

priority (integer) : The priority of the reminder; 0: no priority, 1–4: high, 5: medium, 6–9: low

Das URL Feld ist in macOS 11 mit AppleScript nicht ansprechbar

Gruß
 
Zuletzt bearbeitet:
echt schade , auf dem iPad kann ich auf den Link ( in Errinnerung) klicken, da sehe ich den Anhang. Leider geht es nicht auf dem I Phone da müsste ich den link kopieren und in das URL Feld manuell einfügen , damit es funktioniert.

Oder gibt es noch ne andere Möglichkeit

Gruß
Schmedt
 
oder kann man das Skript umschreiben für den Kalender anstelle für errinnerung??

Gruß
Schmedt
 
Hab gerade in macOS 10.13 geschaut … auch kein URL property für reminder items vorhanden im AppleScript Dictionary …

Edit: das Problem wurde auch auf Stackoverflow diskutiert …
https://stackoverflow.com/questions/63586975/fill-in-url-in-a-newly-created-reminder

Es bliebe nur noch zu testen ob es „Dirty“ über UI-Scripting gelöst werden kann …
Aber das wäre aufwändig zu programmieren und instabil.
 
Zurück
Oben Unten