I’m trying to access hidden preferences and choosing scripts - tabs - open hidden preferences doesn’t do anything. If I open the script and run it, I get the error “missing value”
I’m running DT 3.9.8 on MacOS Sequoia 15.3.1
appreciate any help you can give me.
This is what’s In the script:
– Open Hidden Preferences
– Created by BLUEFROG/Jim Neumann on Mon Oct 07 2024
– Copyright 2024 DEVONtechnologies, LLC. All rights reserved.
(* Due to changes in macOS Sequoia, URL schemes in the Tips.app no longer work. This script gives access to the hidden preferences.
Note: You can only change settings with On/Off options. Read the preamble to the section if you need to change other settings, e.g., AdditionalPlainTextExtensions. *)
tell application id “DNtp”
set hiddenPrefs to (“file://” & POSIX path of (path to it as string) & “Contents/Resources/DEVONthink.help/Contents/Resources/pgs/appendix-hiddenpreferences.html”)
set encodedURL to (do JavaScript “encodeURI("” & hiddenPrefs & “")”) in think window 1
open tab for URL encodedURL
end tell
The code is bogus, since you posted it as text – it uses curly quotes where straight quotes are required and mixes curly and straight quotes in other places. Please enclose code in three backticks like so
code goes here
I don’t know where this script comes from and don’t see it in my script menu.
This variant works for me:
tell application id "DNtp"
set hiddenPrefs to ("file://" & POSIX path of (path to it as string) & "Contents/Resources/DEVONthink.help/Contents/Resources/pgs/appendix-hiddenpreferences.html")
set encodedURL to (do JavaScript "encodeURI('" & hiddenPrefs & "')") in think window 1
open tab for URL encodedURL
end tell
Christian, this is what I see in the menu item “Open Hidden Preferences.scpt”
-- Open Hidden Preferences
-- Created by BLUEFROG/Jim Neumann on Mon Oct 07 2024
-- Copyright 2024 DEVONtechnologies, LLC. All rights reserved.
(* Due to changes in macOS Sequoia, URL schemes in the Tips.app no longer work. This script gives access to the hidden preferences.
Note: You can only change settings with On/Off options. Read the preamble to the section if you need to change other settings, e.g., AdditionalPlainTextExtensions. *)
tell application id "DNtp"
set hiddenPrefs to ("file://" & POSIX path of (path to it as string) & "Contents/Resources/DEVONthink.help/Contents/Resources/pgs/appendix-hiddenpreferences.html")
set encodedURL to (do JavaScript "encodeURI(\"" & hiddenPrefs & "\")") in think window 1
open tab for URL encodedURL
end tell
Where did I get it from - I guess something Jim posted at some point?
The paste part was probably causing the issue. I suppose that the discourse software tries to be “smart” about quotes. Which is the opposite in the context of code
Ugh - rebooted and no change. Maybe I’m looking for the wrong thing. I’m expecting some type of window to open with additional preferences in it. Is something else supposed to happen?
Well, I’m not having any luck here. Figure it must be a permissions thing, but no idea which permissions. If I run the script in script editor, the log gives me this:
Also, you have apparently installed DT in a non-standard location, i.e. in ~/Applications instead of /Applications. Why? And do you see the same problem if you move DT to /Applications
Thank you. I try to instal all non-apple apps in my local application folder. Mostly paranoia and ease of use. I have a separate admin account on the machine to prevent me from doing stupid stuff when it’s late and I’m tired. So putting non-apple apps in my local folder adds one more layer of protection for me.
I have no clue how you’re getting the replies you are.
path to current application points to Script Editor, not DEVONthink. And just repeating it should have no different effect.
Does Script Editor have Full Disk Access?
Try this…
tell application id "DNtp" to open tab for URL "file:///Applications/DEVONthink%203.app/Contents/Resources/DEVONthink.help/Contents/Resources/pgs/appendix-hiddenpreferences.html"