I have a ton of scripts with lines like this
- Code: Select all
original = Image.open("/Library/Application Support/Perceptive Automation/Indigo 2022.1/Web Assets/public/alert.jpg")
or control page images located at (for example)
- Code: Select all
file:///Library/Application Support/Perceptive Automation/Indigo 2022.1/Web Assets/public/frontporch.jpg
and every time there's an indigo update, I have to manually change these file locations. I know there's a function (wrong term?) that gives the correct, current Indigo folder path, but I wonder if it's possible to include it as part of these file paths.
I think in the first case it might just be turning the target of Image.open into a declared variable, but I also don't know the syntax to do something like
- Code: Select all
targetImage="/Library/Application Support/Perceptive Automation/Indigo 2022.1/Web Assets/public/alert.jpg"
original = Image.open(targetImage)
or if I'm even on the right track there. I'm not even clear what terms I would search for to look up how to do this in a python how-to. And that approach for sure won't work when I try to specify a control page file location, as far as I know.
Thanks much for any help!