Sign in to follow this  
Followers 0
leegold

Run Python from Autoit Help

3 posts in this topic

Hi,

I run the file:

#include <Constants.au3>

RunWait('python f:\walk2.py > c:\zz.txt')

But nothing happens, no content inside zz.txt. It works OK from the XP command line.  Wondered what I'm doing wrong(?) I eventually want to send a .py script values/parameters and get output/"return".

Thank You.

Share this post


Link to post
Share on other sites



Worked perfectly, thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • n3wbie
      By n3wbie
      Hello m trying to learn python 
      m interested in knowing if there is koda like gui designer for python
      please also help me what all additional modules i require
      like ones which are famous
      i have already done with
      1.Scrapy
      2.Openpyxl
      3.twister
      4.selenium
      5.Requests
      6.pdfrw
       
    • breakbadsp
      By breakbadsp
      I want to run a python script from autoit. 
      I know we can do this with shellexecute or run , but this python script takes 3 cmd line arguments.
      How to pass them from autoit script?
      I tried many ways.
      Following solution also not working 
      e.g. 
      RunWait( 'fullpath\Python.exe Scriptpath\ReadLog.py  -f "file.log" -k "key" -e "errMsg" ') Found solution:
      RunWait( 'fullpath\Python.exe ReadLog.py -f "file.log" -k "key" -e "errMsg" ', 'Working_directory_path')  
      PFB description:
      https://stackoverflow.com/questions/45757834/how-to-pass-command-line-arguments-to-a-python-script-anyscript-while-executin
       
    • KemyKo
      By KemyKo
      I recently discovered these: 
      https://pypi.python.org/pypi/PyAutoIt
      https://github.com/jacexh/pyautoit
      I guess any python developer knows what these are.
       
      The problem is that I`m on a 64bit version of Windows and i can`t use neither 
      pip install -U pyautoit nor 
      python setup.py install to install the package 
       
      Is there anyone who has the same problem like me?
      Suggest your suggestions 
      *(nice joke right there )*

      Problem solved -> Apparently when i run the setup.py file from github it worked.
       
    • vikashbitm2010
      By vikashbitm2010
      Hi all,
      I want to return string from autoit script to the python code.
      Autoit:
      Exit("22 FE 45") -> not working
      Exit(1) -> Working
      Exit(0) -> Working
      python:
      import os
      res=os.system(autoitmine.exe)
      print "res",res
      I got some hint of @ExitCode macro, but dont know how to use it to get the string in python variable 'res'.
      Please resolve this issue for me if anyone knows about this.
       
    • InunoTaishou
      By InunoTaishou
      Got this idea a long time ago to create a really neat project using a raspberry pi, camera, some custom python code, and a monitor I pulled from an old laptop. The idea is to create an interactive and informational display using the monitor and it will hang on my wall. Custom code will display the time, date, weather forecast, and current events. Has a temperature/humidity for the room (also shown on the display) and a motion censor. Censor will be enabled when I enter the pin for when I leave my room, and turned off when I come back and re-enter the pin. Once the censor is enabled (my security feature is enabled) it will activate the camera, taking a snapshot as soon as it's triggered, email me the screenshot, and then continue to snap pictures every second. Once the person has left my room, zips everything up and then emails me the zip file. Figured it was a good way to play with python, play with the raspberry pi, and make sure anyone coming to my room isn't doing anything sneaky (since I live in the dorms)
      Started the code today and had to figure out how to draw a string like _GDIPlus_GraphicsDrawStringEx. Because I wanted to define movable areas to render all of my text (so the position of the text is dynamic, and can be moved around and the position changed whenever I want to). Since pygame doesn't have anything like that, and it doesn't support multi-line text, let alone aligned text, I had to come up with how to allow multi line, then moved onto alignment, and make sure everything fit inside the defined area, not drawing any extra text that would "bleed" outside the rect
      Here's the progress of the text. The greetings text has the left alignment, top line alignment. Time and date have center and center, and fps actually has the whole screen as the rect but uses right alignment + bottom line alignment, making it show in the bottom right corner


      Source can be found on github for anyone interested
      This is way incomplete, probably gonna take months to get to the final product, but I predict I'll need to draw text in a defined area a lot.