macOS grants DT full permission control with Accessibility enabled, but DT is unavailable in Automation. Scripts run directly in a folder function normally when no documents are selected or when text within PDFs is selected. However, selecting entire PDF documents causes the script to fail.
What version and edition of DT do you have installed? Are all scripts grayed out or only those in the āChatā submenu?
What does this sentence mean? I have no idea what a āfolder functionā is. And does ānormallyā mean that they do run when either no document is selected or PDF text is selected? Or is that what you experienced earlier or somewhere else?
Which āthe scriptā? And how does it āfailā? Error message? Smoking CPU?
Thanks for your reply. DT version is the latest version 4.0.1. In DT if no specific file is selected, the script menu is not grayed out and is available, but if any file is selected, the menu is grayed out and shows that all scripts are not available, not just the AI submenu.
Thatās not what Iām seeing. So, something must be different on your machine. Does DT have full disk access?
Selected where?
Mouse click on the entry. There is no need to be skeptical about the operation, as the same operation has worked without any problems before.
And it does so here. Iām not skeptical about anything, Iām asking questions, some of which you chose not to answer (which is of course your prerogative). Iām out of ideas, so perhaps a DEVONtechnologies person will step in and figure it out.
I am not seeing this behaviour either. Perhaps you could provide a couple of screen shots so we can better understand your problem. We may be misunderstanding you.
Thanks anyway.
Maybe itās a bug.
Probably. But not in the DEVONthink app. See clues to resolve above by @chrillek
I have the ticket in my queue. Thanks for your patience.
This same issue described by panxq has now occurred in my DEVONthink 4 Pro install, having worked properly until today. I had installed your years earlier script of appending yyyymmdd to file title. The Script appears in the āRenameā dropdown folder. All of the folder based scripts are now greyed out. I will await the outcome. Thanks.
Weird! Went out and had a coffee - come back in an hour
and one of the file titles allowed me to apply the script - another didnāt with all still greyed out. The example aforementioned now will not allow further script action as the drop down menu items remain greyed out again.
Further to this - I have this same setup synced to a MacBook Pro and the āgreyed outā issue does not appear a problem. Indeed, I applied the script on my MacBook Pro and it synced back to my Mac Desktop fine.
Do you use any smart rules or reminders which execute scripts?
No⦠I apply the script on a case-by-case approach to a specific range of files - not all - some in bulk and some individually.
Does restarting the app fix this?
Hi Christian, Sorry for the delay⦠I closed all the databases and shutdown the app. On startup - without a database open - the dropdown menu is no longer greyed out. I opened one database and the dropdown is Ok until I add a file and attempt to apply the script - at which time - it is greyed out again.. I have just tried it with another database after closing down the app and the same thing occurred. I appears to be triggered by adding files. When I closed and reopened the app and installed a database, the greyed out affect is gone, but immediately returns when I highlight a file title to apply the script action, preventing it from doing so.
Which script actually?
This may have been one you made years ago - Mine is in the dropdown as āInsert yyymmdd at start of Fileā
Actually I canāt tell, I wrote too many scripts Please post the source code of the script, thank you.
As requested ⦠with apologies ⦠this is not laid out per script editor.
tell application id "DNtp"
set thisSelection to the selection
try
--Check selection
if not (exists think window 1) then error "No window is open."
repeat with theRecord in thisSelection
--Build creation date stamp string
set dtRecordDate to date of theRecord
set strYear to year of dtRecordDate
set strMonth to rich texts -1 thru -2 of ("0" & (month of dtRecordDate as number))
set strDay to rich texts -1 thru -2 of ("0" & day of dtRecordDate)
set strDateStamp to strYear & strMonth & strDay & " - "
--Rename with date stamp prefix
set strNewName to strDateStamp & " " & name of theRecord
set name of theRecord to strNewName as string
end repeat
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
end try
end tell
(Edited for script formatting)