Autoit m2
Autoit m2
2 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_LegalCopyright=MrCrackR #AutoIt3Wrapper_Res_SaveSource=y #AutoIt3Wrapper_Res_Language=1033 #AutoIt3Wrapper_Add_Constants=y #AutoIt3Wrapper_Run_Tidy=y #Tidy_Parameters=/rel /sf #AutoIt3Wrapper_Tidy_Stop_OnError=n #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/cs /cn /cf /cv /sf /sv #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Process.au3> #include <file.au3> #include <array.au3> Opt("GUIOnEventMode", 1) GUICreate("Extraction Helper by MrCrackR", 355, 60, @DesktopWidth/2-192/2, @Desk topHeight/2-124/2, -1, 0x00000018) GUISetOnEvent($GUI_EVENT_CLOSE, "closeprog") GUICtrlCreateLabel("Path to file:", 8, 8, 97, 17) $input = GUICtrlCreateInput("", 104, 8, 217, 18) GUICtrlSetState($input, $GUI_DROPACCEPTED) GUICtrlSetOnEvent(-1, "removeending") GUICtrlSetTip(-1, "Input path to file") $Button1 = GUICtrlCreateButton("...", 328, 8, 17, 17, 0) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetOnEvent(-1, "searchfile") GUICtrlSetTip(-1, "Search file (not inplemented yet)") $Checkbox1 = GUICtrlCreateCheckbox("create xml", 8, 32, 105, 17) $Button2 = GUICtrlCreateButton("Start", 112, 30, 40, 23, 0) GUICtrlSetOnEvent(-1, "startextracting") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func closeprog() Exit 0 EndFunc Func removeending() Dim $szDrive, $szDir, $szFName, $szExt Global $TestPath = _PathSplit(GUICtrlRead($input), $szDrive, $szDir, $sz FName, $szExt) Global $szDrive = $TestPath[1] Global $szDir = $TestPath[2] Global $szFName = $TestPath[3] Global $szExt = $TestPath[4] ;MsgBox(0, "Test", $TestPath[1]& $TestPath[2]& $TestPath[3]& $TestPath[4
]) EndFunc Func searchfile() ;still has bugs, that's why i disabled this funktion $var = FileOpenDialog("Choose your file:", @ProgramFilesDir & "", "encry pted Source Data (*.eix;*.epk)", 1) If @error Then MsgBox(4096,"","No files chosen!") Else GUICtrlSetData($input, $var) Sleep(500) removeending() startextracting() EndIf EndFunc Func startextracting() $file = FileOpen(@ScriptDir & "\temp.xml", 2) If $file = -1 Then MsgBox(0, "Error", "Program wasn't able to open temp.xml." &@CRL F &"File is maybe used by another process.") Exit EndIf FileWrite($file, "<Buildfile version=""1.1"">" & @CRLF) If GUICtrlRead($Checkbox1) = 1 Then FileWrite($file, "<Action type=""extract"" archivePath="&'"'&$sz Drive & $szDir & $szFName&""" outputPath=""Source"" extractAll=""YES"" createXML =""YES"" xmlPath="&'"'&$szFName & "Pack.xml"" />" & @CRLF) Else FileWrite($file, "<Action type=""extract"" archivePath="&'"'&$sz Drive & $szDir & "" & $szFName&""" outputPath=""Source"" extractAll=""YES"" xmlP ath="&'"'&$szFName & "Pack.xml"" />" & @CRLF) EndIf FileWrite($file, "</Buildfile>") FileClose($file) Sleep(500) ShellExecuteWait(@ScriptDir & "\m2.exe", "temp.xml", "", "", @SW_HIDE) MsgBox(0, "Finished", "Extraction complete!") FileDelete("temp.xml") EndFunc