Jump to content

Recommended Posts

Posted

Hi, I'm using AutoIt programming since a year or two and that's the first I'm opening a thread.

I wanna know in which way my exe can compile an autoit script by itself.

Kind of a weird question, so I'll explain.

1) I am writing an autoit script.

2) This script, when compiled, should be able to compile another script into an exe.

3) Ok?

Well, the "child" script cannot be FileInstall()ed because it shall be modified each time.

Thanks for your time :unsure:

Posted

Exactly! I'll try it out.

Questions. If the /icon argument is some exe file, au2exe would extract the icon from the target exe and compile it into the new exe? Am I pretending too much?

Posted

Exactly! I'll try it out.

Questions. If the /icon argument is some exe file, au2exe would extract the icon from the target exe and compile it into the new exe? Am I pretending too much?

If you try with an exe you will get an error message : Error changing icon: Unable to read icon or icon was of the wrong format.

you can try like this, with no need to indicate icon

_Compile ( @ScriptFullPath )

Func _Compile ( $_ScriptPath, $_IconPath="" )
    If Not FileExists ( $_IconPath ) Then $_IconPath = @ProgramFilesDir & "\AutoIt3\Icons\filetype-blank.ico"
    RunWait ( @ProgramFilesDir & '\AutoIt3\Aut2Exe\Aut2exe.exe /in "' & $_ScriptPath & '" /icon "' & $_IconPath & '" /comp 4' )
EndFunc ;==> _Compile ( )

AutoIt 3.3.18.0 X86 - SciTE 4.4.6.0WIN 11 24H2 X64 - Other Examples Scripts

Posted

Sorry, I can see now I wrote a none-sense in my previous post. I used reshacker to automatize the extraction of the icon.

Thank you!

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...