Hi, all:
Context
A client sends me a work package containing, among other things, an Excel file that I want to open in Numbers. Sometimes he has a space before .xlsx; sometimes he doesn't. (Client name blanked for confidentiality.)
I think I've got everything in order but it won't fly.
What I've Tried / Of Possible Interest
Using the current package as an example and using Finder's Copy...as Pathname on the desired file, I get the first line shown below. My tokenized version as set in the Open File action in KM gets resolved (using Display Text in Window) as shown on the second line below. I'm showing them together so you can compare them more easily:
/Users/ckbarlow/Documents/Freelance and Corporate/ClientName/Technical Reviews/Technical Reviews In Progress/Batch 8_3_2023 10-27-32 AM/Wav files sent on 8_3_2023 10-27-32 AM/Tracks to check as of 03-08-2023 .xlsx
/Users/ckbarlow/Documents/Freelance and Corporate/ClientName/Technical Reviews/Technical Reviews In Progress/Batch 8_3_2023 10-27-32 AM/Wav files sent on 8_3_2023 10-27-32 AM/Tracks to check as of 03-08-2023 .xlsx
Here is my tokenized version that yields line 2 above, as entered in the Open File ...in Numbers action:
%Variable%TechRevsInProg_LocalPath%/Wav files sent on %Variable%TechReviewBatch_Date%/Tracks to check as of %Variable%TechReviewBatch_DateDay%-%Variable%TechReviewBatch_DateMonth%-%Variable%TechReviewBatch_DateYear% .xlsx
I checked the Engine Log file and I see this line a lot:
2023-08-10 07:11:39 Invalid Plug In Action with Name Set Finder Label
In the Editor log file, there are dozens of this pairing; I don't have 1Password:
2023-08-10 07:15:31 Invalid Plug In Action with Name Set Finder Label
Last message repeated 8 times
2023-08-10 07:16:08 Failed to find any 1Password metadata folder or bookmarks-default.json file
Last message repeated 2 times
And the error that I get seems to indicate that the Variable tokens aren't being resolved by the Open File action:
2023-08-10 07:11:38 Action 12954442 failed: Open File failed with non-existent path “%Variable%TechRevsInProg_LocalPath%/Wav files sent on %Variable%TechReviewBatch_Date%/Tracks to check as of %Variable%TechReviewBatch_DateDay%-%Variable%TechReviewBatch_DateMonth%-%Variable%TechReviewBatch_DateYear% .xlsx”
I also did check that the file would open in Numbers when manually double-clicked.
Here's the relevant chunk of my macro:
An Alternative That Works Sometimes But Not Consistently
In fact, it worked just now with the current work package. But I'm not sure why it doesn't always work, so I figured I would try the more precise version (i.e. using the exact filename, since I can derive it) that is the topic of this post.
I hope I've done a sufficient job laying out the issue. If there's anything more I can provide, just say the word.
Thank you for any guidance you can offer!
CK
Edited for clarity.