Put script on DT toolbar

There’s a DT script I use often (Set Date to change the date in the Created column), and I’d like to install it on DT’s toolbar. How do I do this?

I’m using DTPO 2.0p8.

That’s not possible but we might add this to a future release.

Where can I find this date script? I can only see see the “touch date” and “copy date” scripts. Would love to be able to change file creation dates!

The original script can be found e.g. here: viewtopic.php?f=20&t=2522

Thank you! Unfortunately it doesn’t seem to work with DT 2.

I copied this code:

tell application "DEVONthink Pro"
   try
      set this_selection to the selection
      if this_selection is {} then error "Please select some contents."

      set theDate to current date
      set theDate to theDate - 3600 * 7 * 24
      
      repeat with this_record in this_selection
         set the modification date of this_record to theDate
      end repeat
   on error error_message number error_number
      display dialog error_message buttons {"OK"} default button 1
   end try
end tell

and pasted it into Apple Script Editor. I then saved it as a script into the Devon script folder, selected a PDF, and ran the script from the menu. Nothing happened.

Not knowing AppleScript very well I even tried changing


tell application "DEVONthink Pro"

to


tell application id "com.devon-technologies.thinkpro2"

as I had seen in the example scripts. Still nothing. :confused:

Am I doing something wrong?

The first script in the referenced thread just sets the date to one week earlier but the last script opens a dialog to enter the desired date and asks which date should be modified. And it’s compatible to v2, just checked this.

Yes, the option to add a much-used script (e.g. change create-date) to the DT toolbar would be very useful, and it would save a bunch of time. Adding my name to the “please add this feature” list. Has there been any development on this option over the past 3 years or so? Or is it already available (and I don’t know how)?
Thanks.

The feature has been in DEVONthink for quite a long time.

In the Scripts/Toolbar folder – in DEVONthink’s Application Support folder – place a copy of the script(s) you want to add to the toolbar. Restart DEVONthink and then customize the toolbar.

Thanks Korm,
That works fine, the date script is sitting in/on the toolbar now.

Hi,

it’s my first post here and not in the best english language, sorry for that!

I’m not understand how one script can add as a button into the button bar. I can only plug the drop down menu with all of that scripts from the script folder. So I have to use more than one click to run my scripts.

Is that what you mean, a button for the drop down menu? That is the same way to use the script from the menu bar…

Thanks for your helping!
Th.

The script was tested and then added to this folder:
/User/Library/Application Support/DEVONthink Pro 2/Scripts/Toolbar
Also, changed the icon for the script in that folder, which then shows up in the toolbar options when DTP is restarted.

It seems to work Ok (and is probably explained in much better/greater detail elsewhere in this forum).

Hi,

it works also here! Thanks.
Th.

We have the new Sync v2.5 working Ok now (with Db) between two Macs. Great stuff, thanks guys. But what is the status on Scripts? Is there a way to sync them across too? Or do they need to be dealt with manually for each location?

Scripts are not part of the database, so must exist on each Mac used.

Hello,

can your create your own “sub”-toolbar buttons? Like the labels button, but with several scripts underneath?

Bye,
Oliver

Nope.