Jump to content

Recommended Posts

Posted

I don't have any experience compiling AutoIt scripts or know of any best practices regarding said scripts so I was wondering, what are some of the options for passing data to complied scripts? Here's an example of what I mean by "option": Writing data to a text file, then running a script which reads the data from that text file.

Thanks!

I apologize if this topic is a little lackluster

Posted

Thanks for those suggestions, I'm sure they will come in handy.

Crazy use case here and I understand this is a poor question, but I plan to run scripts from PHP when my REST API is called, with that in mind, would using an INI file be best or is there a more suited method of passing data via PHP?

Posted
1 hour ago, Rhidlor said:

is there a more suited method of passing data via PHP? 

Execute the script directly via PHP and supply the data as command line parameters, that is how I always do it. Make sure you sanitize all user input before passing it into the command.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Posted

@Rhidlor My pleasure, you may also find it useful to know how to directly execute scripts via the AutoIt3.exe interperter without compiling them: https://www.autoitscript.com/autoit3/docs/intro/running.htm

Quote

The AutoIt3.exe interpreter, or the interpreter stub of any compiled Autoit script, can normally be used to run AutoIt scripts directly from the command line.  In all cases the /ErrorStdOut switch allows the redirection of a fatal error to StdOut which can then be captured by an application such as the SciTE editor. This switch can be used with both the interpreter and a compiled script.

Run a script using the interpreter

AutoIt3.exe [/ErrorStdOut] [/AutoIt3ExecuteScript] filename [params ...]                 Execute the AutoIt3 script 'filename' with optional parameters

At its simplest: AutoIt3.exe myScript.au3 will run a standard AutoIt script 'myScript.au3' with no parameters.

 

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

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
×
×
  • Create New...