Hallo Leute,
Ich bin neu hier. Ich nutze DTOP und bin dabei mein Leben auf ein Papierloses so weit als möglich zu Organisieren.
Ich nutze eine ScanSnap IX500 um meine Dokumente zu Scannen und dann in DT zu Importieren.
Nun würde ich gerne folgendes machen bzw. machen lassen.
Ich Scanne ein Dokument in denn HotFolder. dort wird dann erkannt das es sich um ein PDF handelt, es wird in den Globalen Eingang kopiert, OCR ausgeführt und die alte Datei gelöscht.
Was mir hierbei noch fehlt, ist die Möglichkeit, das ein Datum aus dem Brief (Dokument ausgelesen wird, und als Erstelldatum der Datei Gesetzt wird.
Wie kann ich dieses Verwirklichen.
Derzeit nutze ich ein Script, das den markierten Bereich als Erstelldatum ändert. aber bei 30.000 Dokumenten wird dies eine mühevolle Arbeit.
Vielen Dank für eure Hilfe vorab.
Hier noch das Script das ich derzeit verwende:
set theText to get_date_String()
if theText is missing value or theText is “” then
set theText to “”
set theResult to display dialog theText buttons {“Cancel”, “Ok”} default button 2 default answer “” with icon 1
set theText to text returned of theResult
end if
set theText to my replaceText(theText, “ä”, “ä”)
set theDate to date theText
set_creation_date_to(theDate)
on get_date_String()
tell application “DEVONthink Pro”
try
if not (exists think window 1) then error “No window is open.”
if not (exists content record) then error “Please open a document.”
return selected text of think window 1 as string
on error error_message number error_number
if the error_number is not -128 then display alert “DEVONthink Pro” message error_message as warning
end try
end tell
end get_date_String
on set_creation_date_to(d)
tell application “DEVONthink Pro”
try
set theSelection to the selection
repeat with theRecord in theSelection
set creation date of theRecord to d
end repeat
on error error_message number error_number
if the error_number is not -128 then display alert “DEVONthink Pro” message error_message as warning
end try
end tell
end set_creation_date_to
on replaceText(theString, find, replace)
if theString contains find then
local od
set od to text item delimiters of AppleScript
set text item delimiters of AppleScript to find
set theString to text items of theString
set text item delimiters of AppleScript to replace
set theString to "" & theString
set text item delimiters of AppleScript to od
end if
return theString
end replaceText
Hoffe es gibt Hilfe für mein anliegen.
Grüße
Nico