Grouping items by date opened or like a daily journal

In DT

Open the script in Script Editor and choose Script > Compile. Where does it error?

Not much clearer I’m afraid (though perhaps it means something to you!):

Screen Shot 2022-03-03 at 18.35.29

Can you post a full size, uncropped shot of Script Editor with the script open?

I just did the compile button again and it’s highlighting a number in script, does this mean something?

Interesting… I am compiling @stephenjw’s script here and getting no error.

Put two hyphens in front of the line above starting with tell (1000000 and try to compile it again.

Ok so this is even more baffling. (Adding the dashes doesn’t do anything.) I’ve just compared my script (which I have not altered and was working when I was last on DT!), and in the second line of the tell instruction you just noticed Bill, “text” has gained an s, and now reads “texts”, like this:

tell (1000000 + secs div hours * 10000 + secs mod hours div minutes * 100 + secs mod minutes) as string ¬
		to return **texts** 2 thru 3 & ":" & texts 4 thru 5 & ":" & texts 6 thru 7
end secsToHMS

If I remove that s in Script Editor, so the script says “text” once more, the script now compiles in Script Editor. BUT, if I now copy this script back over to DT, it’s still giving the same error message as before?

it’s possibly being hijacked as text is a DEVONthink class.

Try changing text to word, just out of curiosity.

I foolishly skipped Rule 1 of IT troubleshooting. :woman_facepalming:

Have you tried turning it off and on again?

It’s Rule 1 for a reason! I’ve just done that and now the script is magically working again :thinking:

Thank you for troubleshooting this with me Bill, apologies for leading us both on a missing character quest!

Glad to hear it.
I suspected it may help since that’s a very odd error with nothing seeming to cause it.
Glad it’s working again. :slight_smile:

Some sort of rogue autocorrect going on? Glad you got it sorted.

(It’s Jim, not Bill, I think :wink: - thank goodness he’s always coming to the rescue).

1 Like

@BLUEFROG I have a feature request in stemming from the way I use this script.

Currently it’s possible to exclude an item from Classification, See Also, Search, Tagging, and Wiki Linking. I would like the option to exclude items from counting towards the total displayed in the Incoming Item Links column.

I am requesting this feature because I rely on the Incoming Item Links column to quickly determine quickly which items in my database I have referenced within other items. For example, I want to quickly find out which texts I have cited in my own writing, and the Incoming Item Links column is generally a good proxy for this purpose. For me, sometimes I deliberately link items together, and these deliberate links are the ones I am interested in counting. Other times (ie. when this script is running) I link items in ways that are not meaningful in the context of my work. These non-meaningful links are an important part of the way I keep myself organized, but they are not relevant to my research, so they end up acting like junk data that throw the count of Incoming Links out of balance.

This would be something Development would have to assess the feasibility and broader appeal of. It’s the first request I can recall hearing.

1 Like

This script has randomly stopped working today, again with the same error message that I reported last time. I think I’ve figured out what’s causing it, but I don’t know why and it would seem to be a bug? As with last time, I left the computer idle for several days and forgot to quit DT, and something seems to have happened to the script.

Although the error message in DT is the same this time, the error message in Script Editor is different. This time it says:

Expected “given”, “in”, “of”, expression, “with”, “without”, other parameter name, etc. but found unknown token.

I can’t see an error, I’ve tried closing and reopening DT (no change) and I have exhausted my own tech knowledge :joy: I’m going to go through the code side by side with the original to see what’s different, but I wanted to flag this as I think it’s something that’s happening when DT is idle?

This Smart Rule looked like something I’ve been trying to figure out for a long time! However, I could not get it to work. After setting it all up and even trying to restrict the Kind to Markdown as well as a specific beginning of a file name, it generates for me a list that continues to populate with all kinds of junk, even things I haven’t touched today. Not quite sure how to fix that but will keep digging.

Fiddled around and got it to work. Cool!

Glad you’re sorted. I still have the occasional glitch with the script stopping due to the quotation mark issue discussed above, but I know it’s triggered by DT being left open and I’ve worked out that closing and re-opening DT usually fixes the problem. And I try to be stricter nowadays about closing DT when I’m not using it to stop this from happening.