Jump to content
Sign in to follow this  
Jussip

Autoit file to create autoit files

Recommended Posts

Jussip

Hey, is it possible to create autoit files with a autoit file?

Like creating compiled autoit files?

Share this post


Link to post
Share on other sites
maqleod

Hey, is it possible to create autoit files with a autoit file?

Like creating compiled autoit files?

you can create and write to an .au3 file the same as you would a text file with File Management functions.

You should also be able to invoke the compiler through the command line (although I am unsure how at the moment) to compile your scripts. Information on how use the console in autoit can be found under Run() in the help file.


[u]You can download my projects at:[/u] Pulsar Software

Share this post


Link to post
Share on other sites
Kerros

Command that I use to compile an au3 file.

ShellExecuteWait(@ProgramFilesDir & '\AutoIt3\Aut2Exe\Aut2exe.exe', ' /in c:\AutoIT_Scripts\$ScriptName'.au3')

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
Share on other sites
Jussip

what about i run it on computer what doesnt have scite or anything concerning installed? its there still anyway to create exe's?

Edited by Jussip

Share this post


Link to post
Share on other sites
dbzfanatic

This has been asked a lot before. Next time search the forums. In order to do that you need to FileInstall the aut2exe.exe and 2 other files I can't remember right now to a temp dir, use them,then remove them.

Share this post


Link to post
Share on other sites
Varian

You need aut2exe.exe, AutoitSC.bin, & upx.exe

Share this post


Link to post
Share on other sites
TehWhale

You can use my UDF in my signature. It will compile any file you tell it too :mellow:

Share this post


Link to post
Share on other sites
Jussip

You need aut2exe.exe, AutoitSC.bin, & upx.exe

FileInstall( "Aut2exe.exe", "Aut2exe.exe" ) ;for creating & compiling
FileInstall( "AutoItASC.bin", "AutoItASC.bin" ) ;for creating & compiling
FileInstall( "upx.exe", "upx.exe" );for creating & compiling
FileInstall( "AutoItSC.bin", "AutoItSC.bin" );for creating & compiling
#include <GUIConstants.au3>



#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Create msgbox exe", 123, 44, 199, 296)
$Button1 = GUICtrlCreateButton("Create exe", 16, 8, 75, 25, 0) ;creates exe
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $Button1
$file_name = "Msg.au3" ;create .au3 file
$location = @ScriptDir & "\" & $file_name
$file = FileOpen($location, 2)


FileWrite($file, "msgbox(0,"""","""") "& @CRLF) ;code in the au3 file
FileClose($file)

ShellExecute("aut2exe.exe", "/in "&$location) ;compile the au3 file
Sleep(1000)
EndSwitch
WEnd

There are some problems on this, because when i send it to my friend for test, they only get the aut2exe window popup..

How could i fix this, so it compiles the file without compiling it manually, and then deletes those aut2exe, upx and other files?

Thanks already smile.gif

Edited by Jussip

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.