Log Showing Multiple Errors
Bunch Beta 1.4.16 Sonoma 14.0
A newbie here...
I've been experimenting a simple Bunch that opens Devonthink for a context to skim RSS headlines. In all of them, Devonthink opens fine but may or may not be focused, depending on whether a finder window appears. When closing the Bunch, Devonthink always remains open, and sometimes the desktop items return (if I've included "hide desktop") but often don't.
---
title: RSS News
---
* tell application "Finder" to close every window
x-devonthink-item://E9071907-F6DD-46EF-A403-DED0C8F7A104
* "Toggle Dark|Light Mode.scpt"
(hide desktop)
@DEVONthink 3
Here's a sample of the logs:
2023-10-21 08:39:05: 🔴{
NSAppleScriptErrorBriefMessage = "A identifier can\U2019t go after this identifier.";
NSAppleScriptErrorMessage = "A identifier can\U2019t go after this identifier.";
NSAppleScriptErrorNumber = "-2740";
NSAppleScriptErrorRange = "NSRange: {0, 13}";
}
2023-10-21 08:39:31: 🔴App not running () 2023-10-21 08:39:31: 🔴App not running ()
2023-10-21 08:47:37: 🔴Unable to retrieve URL for app () 2023-10-21 08:47:37: 🔴Unable to retrieve URL for app ()
2023-10-21 08:48:44: 🔴App not running () 2023-10-21 08:48:44: 🔴App not running ()
2023-10-21 08:49:02: 🔴Unable to retrieve URL for app () 2023-10-21 08:49:02: 🔴Unable to retrieve URL for app ()
2023-10-21 08:49:12: 🔴App not running () 2023-10-21 08:49:12: 🔴App not running ()
2023-10-21 08:52:30: 🔴Unable to retrieve URL for app () 2023-10-21 08:52:30: 🔴Unable to retrieve URL for app ()
2023-10-21 08:54:00: 🔴App not running () 2023-10-21 08:54:00: 🔴App not running ()
2023-10-21 08:55:00: 🔴Unable to retrieve URL for app () 2023-10-21 08:55:00: 🔴Unable to retrieve URL for app ()
2023-10-21 08:55:49: 🔴App not running () 2023-10-21 08:55:49: 🔴App not running ()
Bunch Beta 1.4.16 Sonoma 14.0
Apologize for my post... I hadn't read the Troubleshooting section carefully... After doing so, decided there might be an issue with the app name. As it turns out, adding the command !!!AppName solved the biggest issue with this bunch. The only other issue I have now is with (show|hide desktop) and have decided to leave it out for now. I haven't found the right way to use it without Finder issues.
Here's my revised Bunch
---
title: Test
---
* tell application "Finder" to close every window
x-devonthink-item://E9071907-F6DD-46EF-A403-DED0C8F7A104
# Run this when opening the Bunch
* "Toggle Dark|Light Mode.scpt"
# Run this when closing the bunch
!* "Toggle Dark|Light Mode.scpt"
!!!DEVONthink 3
Sorry, I replied to this via email but the response never showed up here. So the Finder issue is that a window opens and messes up the flow, and that desktop icons don't consistently reappear?
I can't prevent a Finder window from opening if anything happens to activate Finder, including hide/show desktop (which requires a Finder restart) as Finder will ALWAYS open a new window if none are open. You might have better luck hiding Finder rather than closing all windows. You can do so with a Finder_ line, which should activate and then hide Finder. Run that after a hide/show desktop command and see if you get better results.
As far as icons not always hiding/reappearing, I tested and am also seeing some inconsistency with re-showing icons on close. This works:
(desktop hide)
!(desktop show)
But Finder seems to be relaunching multiple times and I'm seeing odd behavior. I'll have to look into this further.