Jump to content
Sign in to follow this  

Options for passing data to compiled script

Recommended Posts

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.


I apologize if this topic is a little lackluster

Share this post

Link to post
Share on other sites

You could use:

Command line parameters 

The clipboard

The edit box in the hidden Autoit window

An INI file.

These should get you started.





Share this post

Link to post
Share on other sites

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?

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites

@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


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.


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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By SgtHugoStiglitz
      HI people,
                        I got a questions, I maintain code in autoIT and every time I compile a new version or modification, Scite generate 2 folders. One folder is finish by released and the other is tentative. I try to make some google search, but never find answer would satisfied myself. The dev who was maintain it before were using AutoIt3Wrapper_GUI, and I don't know if it's related. I look both folder, but they seem pretty identical, but I would like to know what it's the difference between those to folder. Anyone have a clue?
    • By Skeletor
      Hey All,
      Yes, this is an odd request. 
      But is there a way to bulk up the size of the compiled program? 
      I know many want to reduce it's size, but I want to increase it.
      What methods do you suggest?
    • By dimm
      Is it possible to compile script without any icon resources included?
      When I make exe it uses default system icon of current OS even if I compile as console application.
      On other versions of Windows it looks a little strange

      It seems that the only way is remove icons from exe after compilation using resource editors like ResHacker.

      another bad solution:
      Using corrupted 35 bytes icon file. Windows can't load it and shows default system icon.
      #pragma compile(Icon, broken.ico) broken.ico
    • By smud
      Currently, I'm working on a program that will display Dialog boxes with either Yes or No.
      For each dialog, I reward the user with X amount of Credits.
      I'm hoping to output the amount of credits to a cell in a column (there will be 20 different columns).
      It will only post to a row that is equal to today's date (first column). If no row exists yet with the current date, it will start a new row.
      Any suggestions?
      Thank you
    • By Dreamfire
      Since today, exe's are being flagged as having a trojan by Windows Defender (Fuery.B!cl)
      Version: - SciTE Version 3.7.3


  • Create New...