Hello,
So I have been trying to get the execute command to work for a little bit now and I can't seem to get it right. What I want to do is have my input files (PDF) gets put into the execute command that would trigger my script to run. My script will take the PDF files and string out parts of the text using OCR then lay it out on a json file. I was told to use arguments for my input and output folders ("%1" and "%3"). I also turned on my log and I can see that switch is executing the file path to my script (/Applications/MAMP/htdocs/Arg.py) along with the arguments but I still get output folders that don't have anything inside of them. I see that it's trying to execute something which is why I don't understand why I'm getting blank folders as the output. if anyone has any tips or tricks I can try to get this up and running that would be great!
Thank you
Execute Command
-
- Newbie
- Posts: 3
- Joined: Tue May 30, 2023 2:43 pm
Execute Command
- Attachments
-
- Screen Shot 2023-11-09 at 10.31.30 AM.png (88.38 KiB) Viewed 1273 times
-
- Execute Command ScreenShots.zip
- Here is my script
- (213.45 KiB) Downloaded 32 times
- magnussandstrom
- Advanced member
- Posts: 289
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: Execute Command
I would use the app 'Execute Command Friend' for this task.
-
- Newbie
- Posts: 3
- Joined: Tue May 30, 2023 2:43 pm
Re: Execute Command
Is there any way to do this task with the execute command?
Re: Execute Command
There is a flaw in the setup of "Execute command". You have to consider that "Execute command" is like running a command on the command line (Terminal or Command prompt). If you were to type the path of the Python script the operating system would also complain. You have to run Python and the script is one of the parameters. Likewise in "Execute command" "Command or path" has to point to Python and the script path goes into the "Arguments".
- magnussandstrom
- Advanced member
- Posts: 289
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: Execute Command
I found an old flow where I executed a Python script with Execute command, here are my settings:
Arguments on this case are:
Arguments on this case are:
Code: Select all
C:\Users\color\Documents\image-background-remove-tool\main.py -i "%1" -o "%3\[Job.NameProper].png" -m u2net
-
- Newbie
- Posts: 3
- Joined: Tue May 30, 2023 2:43 pm
Re: Execute Command
Hello,
So I changed a few things but I don't think that my script is being run. I set up a test that should change the text in the output file when the script is running but I don't see any changes which is why I'm assuming that my script is not being run. Looking at the logs I noticed that there are quotation marks that are being added to the path that leads to my script. I don't know if this is a switch thing or what is happening. Is there something that I'm missing?
So I changed a few things but I don't think that my script is being run. I set up a test that should change the text in the output file when the script is running but I don't see any changes which is why I'm assuming that my script is not being run. Looking at the logs I noticed that there are quotation marks that are being added to the path that leads to my script. I don't know if this is a switch thing or what is happening. Is there something that I'm missing?
- Attachments
-
- Screen Shot 2023-11-28 at 12.41.01 PM.png (46.93 KiB) Viewed 1039 times
-
- Screen Shot 2023-11-28 at 12.41.40 PM.png (6.76 KiB) Viewed 1039 times