Not sure if this is the right forum to ask this question. Let me you if it is not.
Right now when i start my python script file i get a popup window that says "This tool has no parameters". I then click ok and my script will then run. Is there a way to disable this popup window so that my program will run right away?
Solved! Go to Solution.
Given:
I do not have much experience in creating python scripts and then running them. in fact hardly any at all.
I think the answer to your question is, there is no simple way (I can't remember if there is even a difficult way) to disable the popup you are seeing. The popup you are seeing is a fundamental part of the architecture of script tools. Even when there are no parameters for a script tool, the popup is there to provide a user with a description of the tool and help information to help the user with the tool.
Did you attach the script to a tool in toolbox?
Where are you running the script? (separate python IDE?)
Dan, I did attach the script in a toolbox
Then the popup appears, if memory serves.
There is probably no point in attaching it to a toolbox, unless you want to make the parameters for the tool defined/exposed.
You can set defaults for the parameters to at least give users a view of what the parameters are before they run it.
If this is for a scheduled task, then the script doesn't need to be attached at all
Dan,
I do not have much experience in creating python scripts and then running them. in fact hardly any at all. I have 2 questions. How would the user start the script without it being attached to a toolbox. Second if i did do the script how do you modify the popup screen to shows the parameters.
Rick
Adding a script tool—Geoprocessing and Python | ArcGIS Desktop
Start there and work your way down from there in the help topic.
Stick with "Script tools in a Custom Toolbox", it gives you a visual approach to assigning parameters etc. Python toolboxes and Custom toolboxes
They are compared here
Comparing custom and Python toolboxes—Geoprocessing and Python | ArcGIS Desktop
but take some of comments on 'custom' toolboxes with a grain of salt , especially (3) The source code maintained in a separate file for each tool, usually as a Python script (.py).... I have 11 tools running from 1 script and I don't need to uses classes to get them to run.
The wizard-ish thing is pretty straightforward. I wrote something simple along those lines some time ago
/blogs/dan_patterson/2016/05/19/toolbox-creation-in-arcgis-pro
Dan, All of the instructions look like they are for ArcGIS Pro. I am using ArcGIS Desktop so the screens and input values do not match. Not sure what to do since this is my first attempt at writing a python script.
Reading the instructions it looks like i can add all of my inputs to the popup screen. If that is correct where would i put the python script?
The dialogs are very similar if you can get on the right page in your help
Dan,
I read through the documentation and have my popup screen showing my values. I need to work on another project and i do not want the popup window to appear. I looked in the documentation but did not find anything. Do you know how to do this?
Thanks
Given:
I do not have much experience in creating python scripts and then running them. in fact hardly any at all.
I think the answer to your question is, there is no simple way (I can't remember if there is even a difficult way) to disable the popup you are seeing. The popup you are seeing is a fundamental part of the architecture of script tools. Even when there are no parameters for a script tool, the popup is there to provide a user with a description of the tool and help information to help the user with the tool.