Jump to content

Autoit file to create autoit files


Jussip
 Share

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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