I’ve found what I think is a bug—and while it’s not any real inconvenience to me, I thought I’d bring it to your attention:
When I create a new note, paste text into it, then choose Data —> Move to…. from the menu (or Move to “X” again, its content disappears (see attached video).
This occurs regardless of whether the note is Formatted, Rich Text, or Plain Text.
This only occurs when the note is open in its own window, as seen in the attached video. If I create the new note in the main DT3 window, don’t open it in a new window, then choose Data —> Move to…, it works fine: the note is moved without deleting its contents.
The text contents don’t disappear if I manually save the note by using Data —> Save after pasting in text but before moving it.
The only reason I’ve noticed the bug is that I frequently use a script to create a new note from a Safari page (with URL and the page title), and the new note automatically opens in its own, new window. Then I’ll paste copied text from the page and use Data —> Move to… to file it—but I often forget to save before moving. It’s not a big deal, as the window stays open, I see the text disappear, and then simply re-paste the text.
I love DT3 and am not complaining at all—as I said, it’s really no inconvenience to me—I just thought you might want to know, in case it’s something that could cause other issues. It’s also entirely possible, and maybe probable that I’m doing something wrong or need to change some setting—in which case I’d love to remedy it.
But I’m a total novice with scripting—I think you helped me with the original AppleScript.
Attached is a screenshot of it—for some reason I can’t get the indentation to work in this post.
Would I put display group selector instead of in current group—and after it?
Sorry I’m so clueless!
William
PS: the un-indented text of the script…
-- Create empty formatted note with name and url to paste manually
tell application "Safari"
tell current tab of window 1
set theURL to URL
set theName to name
end tell
end tell
tell application id "DNtp"
try
set theRecord to create record with {name:theName, URL:theURL, type:formatted note, source:""} in current group
open window for record theRecord
activate
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
return
end try
end tell
You could replace in current group with in (display group selector) but personally I like to have it on its own line.
-- Create empty formatted note with name and url to paste manually (with group selector)
tell application "Safari"
tell current tab of window 1
set theURL to URL
set theName to name
end tell
end tell
tell application id "DNtp"
try
set theGroup to display group selector "Create note in:"
set theRecord to create record with {name:theName, URL:theURL, type:formatted note, source:""} in theGroup
open window for record theRecord
activate
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
return
end try
end tell
PS You can post a script wrapped in three backticks, like this