AutoIt3Wrapper is a AutoIt3/AUT2EXE wrapper program that can compile your script with all settings as save in an INI file or defined in your Script source with Compiler Directives, update the Resource information like Comment, Description, Legal Copyright and Program version of the target executable. Its is now also used to enable you to: AU3Check and/or Run a Autoit3 script with the latest Production or Beta version.
AutoIt3Wrapper will perform the following tasks for you when wrapping Aut2Exe (Compile):
AutoIt3Wrapper will perform the following tasks for you when wrapping AutoIt3 (Run):
To set the defaults for the different functions you can copy AutoIt3Wrapper.ini.example to AutoIt3Wrapper.ini and make the changes you like for defaults for all options.
You can define the Compiler Directives in your script and have AutoIt3Wrapper.exe compile it with these settings:
#Region AutoIt3Wrapper directives section
|
To test, compile the below script and run the exe:
|
; Example 1 #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype1.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype2.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype3.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype-blank.ico #include <ButtonConstants.au3> GUICreate("Demo resource ICO's") $h_Button1 = GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON) GUISetState() For $x = 0 To 9 $rc = TraySetIcon(@ScriptFullPath, -$x) $rc2 = GUICtrlSetImage($h_Button1, @ScriptFullPath, -$x) If $x < 5 Then TrayTip("Default ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) Else TrayTip("New ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) EndIf Sleep(2000) Next GUIDelete() ; Example 2 #AutoIt3Wrapper_Res_File_Add=C:\WINDOWS\Media\tada.wav, SOUND, MYWAVGlobal Const $SND_RESOURCE = 0x00040004 Global Const $SND_ASYNC = 1 DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", $SND_RESOURCE) DllCall("winmm.dll", "int", "PlaySound", "str", "MYWAV", "hwnd", 0, "int", BitOR($SND_RESOURCE, $SND_ASYNC)) For $n = 1 To 100 Sleep(15) ToolTip("Asynch! " & $n) Next |