How do I execute and record an external Python script.

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
garycee
Newbie
Posts: 17
Joined: Mon Jul 20, 2015 7:17 pm

How do I execute and record an external Python script.

Post by garycee » Tue Apr 09, 2019 3:00 am

Hi

I know you have a PY in the code builder but how do I execute an external PY file and record the output into MS, please?

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: How do I execute and record an external Python script.

Post by Marcus Tettmar » Wed Apr 10, 2019 6:40 pm

You can run via the command line using the RunProgram command. To get the output you could pipe to a text file and then read the text file back?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: How do I execute and record an external Python script.

Post by Grovkillen » Wed Apr 10, 2019 8:23 pm

Pipe to clipboard is better in my opinion. | clip
Let>ME=%Script%

Running: 15.0.24
version history

garycee
Newbie
Posts: 17
Joined: Mon Jul 20, 2015 7:17 pm

Re: How do I execute and record an external Python script.

Post by garycee » Sun Apr 14, 2019 1:32 pm

Thanks. I didnt realise I can execute Python files like that but I have done a lot of batch files through MS before. Cool beans. :)

garycee
Newbie
Posts: 17
Joined: Mon Jul 20, 2015 7:17 pm

Re: How do I execute and record an external Python script.

Post by garycee » Mon Apr 15, 2019 10:17 am

Still having problems with it. Its generating the error related to file system permissions but even running MS in admin mode isnt working.

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: How do I execute and record an external Python script.

Post by Grovkillen » Mon Apr 15, 2019 11:53 am

Do you have the libraries you're script is using?
Let>ME=%Script%

Running: 15.0.24
version history

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts