Jump to content

Recommended Posts

Posted

Hi everyone!

I'm developing a python program which, as part of it's functionality, executes autoit script (*.exe mode), for instance, i want python script to generate 100 lines of text and launch autoit script which would open notepad and enter that text there. I wonder what is the best practice for program to pass the mulit-line strings to the script as parameters? The obvious choice for me seems to be that program creates a text file and then autoit script reads it. But that's quite a routinary task - setting the same structure of a file in a python script, then describing relevant variables in autoit script, reading files, assigning the data of the file to autoitscript... maybe there is a more straightforward way? In case there is no simpler way, i wonder how to easily 'paste' the text with autoit script - let's say, of my input is more than 500 lines, sending them with the "Send()" function doesn't appear to be the most elegant solution on earth. I am thinking of Clipput()and ClipGet() methods - is that what people use most ofte to solve the given problem?

Thanks in advance for sharing your knowledge!

to

Posted (edited)

If Python allows to read & write the stdio of the started process, you could use that to send the text.

AN alternative would be WM_COPYDATA if you manage to send this message from Python. AutoIt can receive and send it.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

  • 2 weeks later...
Posted

Hi Progandy, thanks a lot for a prompt response! I wonder if you have meant ConsoleRead() to be used for getting the data from stdin, as the StdReadIn() doesn't seem to be implemented yet. Thanks!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...