Sign in to follow this  
Followers 0
Emolas

script to compile another script

6 posts in this topic

Is it possible to compile an au3 file with an AutoIT script?

Share this post


Link to post
Share on other sites



To compile you'll have to Fileinstall() the compiler ;), but as a work-around look up "AutoIt specific command Line Switches" in the help-file on how to start uncompiled scripts from within a compiled one...

Share this post


Link to post
Share on other sites

Wow, that was quick! I don't think I explained my problem correctly.

What I am doing is making a script that will write another script and then compile it. It sounds like a strange way of going about it but the reason behind it is that one admin has a service account with exceptional rights and he wants a script that uses it and will have the password encoded and compiled into itself. That in itself would be simple but I do not want to ever see the password (no chance of misuse accusations) so I can write a script and give it to him to run. It asks him for the password, encrypts it, and adds it to the second script. What I want to do is compile the second script after I add the password line to it.

here's a snippet:

#Include <String.au3>

$passIn = InputBox("Password", "enter password:", "", "*")
$passEnc = _StringEncrypt(1,$passIn,"encrypt",1)
$File = FileOpen("test2.au3",1)
FileWriteLine($File,"$Password = " &  "_StringEncrypt(0,""" & $passEnc & """,""encrypt"",1)")
FileClose($File)
;here I want to compile $File

Share this post


Link to post
Share on other sites

Excellent, thank you. I always compile from within SciTE so I was unaware there was a command-line compiler.

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  
Followers 0