Jump to content

[Help] My Autoit Don't Compile/Build


 Share

Recommended Posts

Can u Fix any Error? Ichigo i'm using your script ( that u correct for me ^^ )

;Author: MatheusGM
; Função do Script:
; One-click Installer MHU + GEN B

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#RequireAdmin
#NoTrayIcon

#Region ### START Koda GUI section ###
$Form1_1 = GUICreate("One-click Installer MHU + GEN-B", 516, 348, 192, 124)
GUISetIcon("C:\ico1.ico")
$Fundo = GUICtrlCreatePic("C:\Users\MatheusGM\Desktop\PSP.jpg", 0, 0, 513, 345, 0)
$Browse = GUICtrlCreateButton("Browse", 360, 152, 105, 25, 0)
$Go = GUICtrlCreateButton("Go", 128, 248, 137, 33)
$Help = GUICtrlCreateButton("Help", 272, 248, 137, 33)
$var1 = "MS Letter"
$Input = GUICtrlCreateInput($var1, 272, 152, 81, 21)
$Exit = GUICtrlCreateButton("Exit", 208, 280, 121, 33)
$Browse1 = 0
GUICtrlCreateLabel("Progress:", 8, 320, 54, 17)
$Progress1 = GUICtrlCreateProgress(72, 315, 161, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $msg = GUIGetMsg()

    Select
        Case $msg = $Browse
            $file = FileSelectFolder("Choose file...", "") ; FileSelectFolder instead of FileOpenDIalog
            If @error <> 1 Then
                GUICtrlSetData($Input, $file)
                GUICtrlSetData($Progress1,30)
                $Browse1 = 1
            Else
                MsgBox(0, "Error!", "You didn't Select Your PSP MS!")
            EndIf

        Case $msg = $Go
            If GUICtrlRead($Input) <> "MS Letter" Then ; changed $var to $var1, = to <>
;~              $msg = $Browse ; no need this
                If $Browse1 = 1 Then
                    $resposta = MsgBox(4, "One-click Installer MHU + GEN-B", "Do you wanna Install?")

                    If $resposta = 6 Then
                        Run("C:\Arquivos de Programas\Easy Installer GEN-B\Installer-B.exe")
                        sleep(500)
                        GUICtrlSetData(-1, 70)
                        Send($file)
                        GUICtrlSetData(-1, 80)
                        Send("{ENTER}")
                        sleep(500)
                        GUICtrlSetData(-1, 99)
                        Sleep(3000)
                         GUICtrlSetData(-1, 100)
                        MsgBox(0, "One-click Installer MHU + GEN-B", "All Done! See Ya!")
                    EndIf

                    If $resposta = 7 Then
                        MsgBox(0, "One-click Installer MHU + GEN-B", "Ok! See Ya!")
                    EndIf
                EndIf
            Else ; changed
                MsgBox(0, "One-click Installer MHU + GEN-B", "You didn't Select Your MS!")
            EndIf

        Case $msg = $Help
            #Region ### START Koda GUI section ### Form=d:\listas\programas\autoit3\koda_1.7.2.0\templates\about box.kxf
            $dlgAbout = GUICreate("Help", 325, 238, 302, 218)
            GUISetIcon("C:\ico1.ico")
            $GroupBox1 = GUICtrlCreateGroup("", 8, 8, 305, 185)
            $Label4 = GUICtrlCreateLabel("Help:", 16, 24, 49, 28, $WS_GROUP)
            GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
            $Label1 = GUICtrlCreateLabel("Just Click on Browse, Select your MS,", 16, 72, 269, 24, $WS_GROUP)
            GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
            $Label2 = GUICtrlCreateLabel("Then click on Go!", 16, 96, 126, 24, $WS_GROUP)
            GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
            GUICtrlCreateGroup("", -99, -99, 1, 1)
            $Exit1 = GUICtrlCreateButton("Exit", 120, 208, 75, 25)
            GUISetState(@SW_SHOW)
            #EndRegion ### END Koda GUI section ###
            Sleep(3000)
            GUIDelete()

        Case $msg = $Exit
            ExitLoop

        Case $msg = -3
            ExitLoop

    EndSelect
WEnd

GUIDelete()

Exit
Link to comment
Share on other sites

So the crash log from windows?

Better yet: insert code that logs what is happening in places that you suspect may be causing the crashes. When you run your compiled executable, you can pinpoint at least in what section of the code things are going wrong. If you do it carefully, you can find the issue in minutes (solving it may or may not be harder).
Link to comment
Share on other sites

So the crash log from windows?

No.

Install SciTE4AutoIt3 if you haven't.

Then open your script and Compile from there.

Then show us the output from the console.

Link to comment
Share on other sites

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper_Gui.exe" /in "D:\Listas\Programas\AutoIt3\PSP_HELPED.au3"

+>00:41:02 Starting AutoIt3Wrapper GUI v.2.0.0.0

-> 4 Change(s) made.

+>00:41:33 Starting AutoIt3Wrapper v.2.0.0.3 Environment(Language:0416 Keyboard:00010416 OS:WIN_VISTA/ CPU:X64 OS:X86)

>Running AU3Check (1.54.14.0) from:C:\Program Files\AutoIt3

+>00:41:33 AU3Check ended.rc:0

>Running:(3.3.0.0):C:\Program Files\AutoIt3\aut2exe\aut2exe.exe /in "D:\Listas\Programas\AutoIt3\PSP_HELPED.au3" /out "D:\Listas\Programas\AutoIt3\Matheus.exe" /icon "C:\ico1.ico" /comp 2 /nopack /Bin C:\Users\MATHEU~1\AppData\Local\Temp\AutoItSC.bin

+>00:41:33 Aut2exe.exe ended.rc:0

+>00:41:33 Created program:D:\Listas\Programas\AutoIt3\Matheus.exe

->Warning: This is an Unicode compiled script and will not run on Win9x/ME.

+>00:41:34 AutoIt3Wrapper Finished

>Exit code: 0 Time: 31.863

Link to comment
Share on other sites

Your problem is not in syntax, it's in program logic.

Could you please try doing as I mentioned, adding logs in some places in your code, so we can actually know what's going on when your script runs.

PS: Should I worry that I know by heart that 0416 is the language code for Portuguese? I think it's from seeing all those Au3Wrapper lines every day.

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

  • Recently Browsing   0 members

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