How to pass parameter into a python script in a batch macro?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello
I am trying to create a batch macro that contains a python script. In the python script there are 2 variables that I want to be dynamic so I don't need to hardcode my APIKEY and APITOKEN on it.
I went through the Action tools and tried to Replace a specific string but that didn't work.
The workflow is attached. If someone could give me hand, it would be amazing.
Thanks
Rodrigo
Solved! Go to Solution.
- Labels:
- Macros
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @calloni ,
Since you are already are passing data into the tool, why not write them into two different fields also?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @calloni.
Here's a way I found to update the Python Tool directly.
1. Change the notebook from interactive mode to production mode (this will also make your macro run faster, ~ half the time)
2. Change your action tools to update productionModeScript -value
3. Specify the string you want to replace.
I have attached a working, simplified version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Amazing solution! Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks very much for the idea too!
Rodrigo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
