Please bear with me. Totally new to Hazel and actually looking to achieve immporting / indexing in Devonthink Pro Office.
Running on 10.6.8
Hazel v 3.0.18 (trial)
I'm trying to get this http://forum.devontechnologies.com/viewtopic.php?f=20&t=17344 code running.
I have edited like this:
- Code: Select all
tell application "Finder"
set _path to /Volumes/pt1/Users/erwin/DT/2014.dtBase2/
set {_name, _extension} to {name, name extension} of theFile
-- optional: hide extension in Finder
-- set extension hidden of theFile to true
-- optional: remove extension for DEVONthink displays
-- set _name to text 1 thru -((count _extension) + 2) of _name
-- set _extension to "." & _extension
end tell
-- Launch DEVONthink if it isn't already open.
tell application "System Events"
if not (exists process "DEVONthink Pro Office") then
tell application id "com.devon-technologies.thinkpro2" to activate
end if
end tell
-- Import the file.
tell application id "com.devon-technologies.thinkpro2"
set theGroup to get record with uuid "44F5A879-DF80-46B8-8045-7E4C644C036B"
-- choose one option, Index or Import, comment out the other
-- set theImport to import _path name _name to theGroup
set theIndex to indicate _path to theGroup
end tell
Then tried to import it, open it with Hazel and the same after adding .hazelrules as an extension to no avail.
Can someone enlighten me on how to do this? Or point me to some tutorial showcasing this?
Thanks a lot!