Jump to content

DeCompile not working


au3scr
 Share

Recommended Posts

If i compile this and then try decompile it then it says:

Error: The executable file is not recognised as a compiled AutoIt script.

here is source that I tried to decompile after i compiled it.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <GDIPlus.au3>
Opt("GUIOnEventMode", 1)
Opt("GUICloseOnESC", 1)

#Region ### START Koda GUI section ### Form=
Global $FilesToArray = _FileListToArray(@ScriptDir & "\start", "*.lnk", 1)
Global $Shortcuts[$FilesToArray[0] + 1]
$x = 0
$y = 60
$gui1height = 0
$gui2height = 467
$gui1widh = 0
$gui2widh = 457
;~ GUICreate("title",width,height,left,top)
$Form2 = GUICreate("Form2transF32", 260, 447, 0, @DesktopHeight - 487, $WS_POPUP)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close") ;you forgot to add this line which is vital OnEvent
WinSetTrans("Form2transF32", "", 160)
GUISetState(@SW_SHOW)
$Form1 = GUICreate("Form1Sartmenuform32", 250, 457, 0, @DesktopHeight - 457 - 20, $WS_POPUP)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close") ;you forgot to add this line which is vital OnEvent

For $i = 1 To $FilesToArray[0]
    $file = FileGetShortcut(@ScriptDir & "\start" & "\" & $FilesToArray[$i])
    $Shortcuts[$i] = GUICtrlCreateButton($FilesToArray[$i], 20, $y, 36, 36, BitOR($BS_PUSHBOX, $BS_FLAT, $BS_ICON))
    GUICtrlSetOnEvent(-1, "clicked")
    $imgpath = $file[0]
    If StringRight($imgpath, 4) = ".exe" Then GUICtrlSetImage(-1, $imgpath, 0)
    $label = GUICtrlCreateLabel($FilesToArray[$i], 60, $y, 200, 36)
    GUICtrlSetOnEvent(-1, "clicked")
    GUICtrlSetFont(-1, 10, "Palatino Linotype")
    $y = $y + 36
Next
$Pic1 = GUICtrlCreatePic(@ScriptDir & "\pictures" & "\New Bitmap Image24.bmp", 0, 0, 20, 447, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Pic2 = GUICtrlCreatePic(@ScriptDir & "\pictures" & "\logo2.bmp", 180, 5, 50, 50, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUICtrlCreateLabel("Logged in as: " & @UserName, 25, 2)
GUICtrlCreateLabel("Current Date: " & @WDAY & ":" & @MON & ":" & @YEAR, 25, 5 + 9)
GUICtrlCreateLabel("Current Time: " & @HOUR & ":" & @MIN, 25, 5 + 15 + 5)
GUICtrlCreateLabel("Current IP: " & @IPAddress1, 25, 5 + 15 + 17)
$halt = GUICtrlCreateButton("", 25, $gui2height - 51, 36, 36, BitOR($BS_PUSHBOX, $BS_FLAT, $BS_ICON))
GUICtrlSetImage(-1, @ScriptDir & "\icons\halt.ico", 0)
GUICtrlCreateLabel("Halt", 25 + 36 + 5, $gui2height - 41)


WinSetOnTop("Form1Sartmenuform32", "", 1)

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
    Sleep(200)
WEnd

Func clicked()
    $lnk = FileGetShortcut(@ScriptDir & "\start" & "\" & GUICtrlRead(@GUI_CtrlId))
    ShellExecute($lnk[0], $lnk[2], $lnk[1])
EndFunc   ;==>clicked

Func Close() ;added this function which handles the Close event
    Exit
EndFunc   ;==>Close
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...