I was able to incorporate some of @ccstone’s great work (thanks, Chris!), and I just posted an update which I think will do what you want. I replaced the link at the top of the first message.
All you need to do is delete the current Go To Group by Name macro, then import the new one. Don’t bother with the Spotlight Search Prompt macro.
I have a problem. Now every time I try to delete the .pkg, it asks me to locate the .pkg file even though I did it earlier. Do you know why that might happen? Didn’t have that issue before I believe.
You’re not the only one who was confused. Clearly, I need to re-think the idea of using package files for resources.
And here, I was so proud of myself for coming up with the idea! Sigh.
I’ll figure something else. Right now, I’ll post a note on all the macros.
Thanks for this info. Keep it coming. Remember, if you’re having issues, chances are someone else will also. Just because things make sense to me doesn’t mean they make sense to other people… In fact, they rarely do!
@DanThomas I moved the Resources package, then clicked several of the installed macros, which asked me to locate the resources package. I located it and clicked OK...but the file dialogue simply pops back up asking to locate the package again, so I'm stuck in a loop until I hit cancel, but the macros don't work. They just ask me to locate the package file again. Love the idea of being able to go to a group quickly and look forward to getting it to work!
If it keeps asking, that means that either it can't read the package, or there's something wrong with the package. Where did you put the package? What folder?
Thanks for your quick response. I tried the pkg file in multiple locations. The first was in a folder in Dropbox. I threw that copy away and unzipped the original zip file to get a fresh copy of the pkg file. I put that fresh copy in a folder named "Spotlight Search Prompt Resources" in the Documents folder. Then I tried putting the pkg file in the documents folder itself. Same result: keeps asking to locate the pkg file. That pkg file is called "Spotlight Search Prompt Resources.pkg". I got it from the zip file at the top of this thread: Go To Group by Name (Spotlight).v1.1.zip.
If you look in the Spotlight Search Prompt macro, two actions down from the top, you should see a group with the description "Verify and/or set DND__sspResourcesPackagePath". If I understand your issue correctly, this is where you get stuck.
Here's the reasons that set of actions would continue to loop:
You're not selecting the package file.
For some reason, it doesn't have rights to read the package file.
Inside the package file, which you can view by right-clicking on it and selecting "View package contents", there should be a file named "Spotlight Search Prompt.html". If there isn't, then there's something wrong with the package file.
That's all I got. So look at the actions I mentioned, and see if you can figure out what's wrong.
Well...I think I figured it out. Occasionally, I get an odd addition in a variable that looks like this...
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist.
/Volumes/.../Spotlight Search Prompt Resources/Spotlight Search Prompt Resources.pkg
The ellipsis is my edit for privacy. I have never been able to completely get rid of that osax file reference. I sometimes have to write a string filter into my script to remove that reference from a variable result before moving on in the script.
I removed the offending text from the variable and...walla.
P.S. So...I went to the scripting additions folder and removed the osax file. Seems like I would've already done that before. Maybe it keeps reappearing. We will see.
I don't have version 9 yet. Can you see if you can isolate which action is causing the error? Put "Prompt" actions throughout the macro, until you can isolate what action causes the error. Then let me know.
Thanks.
@JMichaelTX, @ccstone: Just adding you guys into this in case you have ideas, or can figure this out. I honestly can't imagine why I'd ever be trying to set a window to "true" - it doesn't even make sense. Thanks.
@DanThomas, I suspect this is due to the fact that in KM9 the KM Editor window name/title has changed. For example, it now looks like this: Keyboard Maestro Editor — Go To Macro by Name (Spotlight) (Author.@DanThomas)
tell application "System Events"
tell application process "Keyboard Maestro"
set frontmost to true
tell (first window whose subrole is "AXStandardWindow")
### YOUR CODE HERE ###
end tell
end tell
end tell