Jump to content

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

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?

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.

EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

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.


EasyCodeIt - A cross-platform AutoIt implementation

DcodingTheWeb Forum - Follow for updates and Join for discussion

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

    No registered users viewing this page.

  • Similar Content

    • By AutoJohn
      Part of my standard template for a new project is including the lines:
          #AutoIt3Wrapper_Run_Au3Stripper=y ;Run Au3Stripper before compilation (Default=n)
          #Au3Stripper_Parameters=/mo ;     Use the parameters as listed above
      I extensively use bookmarks to jump back and forth between sections of code while debugging and I am experiencing an annoyance that I'm hoping someone could steer me towards a "better" solution.
      The problem is when I go to compile code, all of my bookmarks get deleted.
      I have determined that if I comment out the line    #AutoIt3Wrapper_Run_Au3Stripper then the issue no longer happens and my bookmarks remain.
      Are there some other properties I could be setting somewhere to keep the line in place yet not destroy my bookmarks on every compile?
      SciTE Version 3.7.3     Feb 16 2017 21:41:17
    • 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
  • Create New...