Jump to content

Can I compile a sript from another script


rizwan
 Share

Recommended Posts

what i want to do is, if I have a file name x.au3

from y.au3 i want to compile x.au3 nad then run it. i wont mind running the file as it is however autoit does not allow to run an au3 file from another script.

Please advise

few things you can do.

1) fileinstall the compiler and the script, and then use the compiler(command line in hidden window) on the script at runtime.

2) fileinstall autoit.exe and the script, and have autoit.exe open the script

3) fileinstall autoit.exe and the script, then register the .au3 extension on the computer, and run the au3 as an executable.

Link to comment
Share on other sites

few things you can do.

1) fileinstall the compiler and the script, and then use the compiler(command line in hidden window) on the script at runtime.

2) fileinstall autoit.exe and the script, and have autoit.exe open the script

3) fileinstall autoit.exe and the script, then register the .au3 extension on the computer, and run the au3 as an executable.

what is wrong with /executeautoitscript (or something like that)

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

what is wrong with /executeautoitscript (or something like that)

? sorry, not sure what you're talking about... is that a command line switch? for which program? or a UDF?

sounds like a viable 4th option if that works too though. (not that i doubt you, just don't know what you're talking about)

Link to comment
Share on other sites

im thinking this topic is weird.

if you have an y.au3 you also have an @autoitexe so you could just run that

if you have a y.exe and want to run an x.au3 you could just

AutoIt specific command Line Switches

Form1: AutoIt3.exe [/ErrorStdOut][/AutoIt3ExecuteScript] file [params ...]

Execute an AutoIt3 Script File

/ErrorStdOut Allows to redirect fatal error to StdOut which can be captured by an application as Scite editor. This switch can be used with a compiled script.

To execute a standard AutoIt Script File 'myscript.au3', use the command:

'AutoIt3.exe myscript.au3'

Form2: Compiled.exe [/ErrorStdOut] [params ...]

Execute an compiled AutoIt3 Script File produced with Aut2Exe.

Form3: Compiled.exe [/ErrorStdOut] [/AutoIt3ExecuteScript file] [params ...]

Execute from an compiled AutoIt3 Script File another script file. Like that you don't need to fileinstall another copy of the AutoIT3.exe in you compiled file.

Form4: AutoIt3.exe /AutoIt3ExecuteLine "command line"

Execute one line of code.

To execute a single line of code, use the command:

'AutoIt3.exe /AutoIt3ExecuteLine "MsgBox(0, 'Hello World!', 'Hi!')"'

NOTE: Correct usage of single- and double- quotation marks is important.

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

thnaks for your help

what worked for me is the following

run('C:\Program Files\AutoIt3\AutoIt3.exe "C:\tools\longterm_test.au3"')

that will work well for computers with autoit installed, but for other computers, you should go with one of the other suggestions. (probably w0uter's since it's the most efficient or 'right' :P way
Link to comment
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
 Share

  • Recently Browsing   0 members

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