#include <FileConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Local $hGUI = GUICreate("Генератор прагмы", 500, 600)
GUICtrlCreateLabel("Out", 0, 0,150)
Local $idinput1 = GUICtrlCreateInput("myProg.exe", 0, 25, 500, 25)
GUICtrlCreateLabel("ExecLevel", 0, 50,150)
Local $idinput2 = GUICtrlCreateInput("", 0, 75, 500, 25)
GUICtrlCreateLabel("Compatibility", 0, 100,150)
Local $idinput3 = GUICtrlCreateInput("", 0, 125, 500, 25)
GUICtrlCreateLabel("UPX", 0, 150,150)
Local $idinput4 = GUICtrlCreateInput("", 0, 175, 500, 25)
GUICtrlCreateLabel("FileDescription", 0, 200,150)
Local $idinput5 = GUICtrlCreateInput("", 0, 225, 500, 25)
GUICtrlCreateLabel("ProductName", 0, 250,150)
Local $idinput6 = GUICtrlCreateInput("", 0, 275, 500, 25)
GUICtrlCreateLabel("ProductVersion", 0, 300,150)
Local $idinput7 = GUICtrlCreateInput("", 0, 325, 500, 25)
GUICtrlCreateLabel("FileVersion", 0, 350,150)
Local $idinput8 = GUICtrlCreateInput("", 0, 375, 500, 25)
GUICtrlCreateLabel("LegalCopyright", 0, 400,150)
Local $idinput9 = GUICtrlCreateInput("", 0, 425, 500, 25)
GUICtrlCreateLabel("LegalTrademarks", 0, 450,150)
Local $idinput10 = GUICtrlCreateInput("", 0, 475, 500, 25)
GUICtrlCreateLabel("CompanyName", 0, 500,150)
Local $idinput11 = GUICtrlCreateInput("", 0, 525, 500, 25)
Local $idbutton1 = GUICtrlCreateButton("Сгенерировать прагму", 0, 550, 185, 25)
GUISetState(@SW_SHOW, $hGUI)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idbutton1
Local $genpragma = ""
$genpragma &= "#pragma compile(" & "Out," & GUICtrlRead($idinput1) & ")"& @LF & _
"#pragma compile(" & "ExecLevel," & GUICtrlRead($idinput2) & ")"& @LF & _
"#pragma compile(" & "Compatibility," & GUICtrlRead($idinput3) & ")"& @LF & _
"#pragma compile(" & "UPX," & GUICtrlRead($idinput4) & ")"& @LF & _
"#pragma compile(" & "FileDescription," & GUICtrlRead($idinput5) & ")"& @LF & _
"#pragma compile(" & "ProductName," & GUICtrlRead($idinput6) & ")"& @LF & _
"#pragma compile(" & "ProductVersion," & GUICtrlRead($idinput7) & ")"& @LF & _
"#pragma compile(" & "FileVersion," & GUICtrlRead($idinput8) & ")"& @LF & _
"#pragma compile(" & "LegalCopyright," & GUICtrlRead($idinput9) & ")"& @LF & _
"#pragma compile(" & "LegalTrademarks," & GUICtrlRead($idinput10) & ")"& @LF & _
"#pragma compile( "& "CompanyName," & GUICtrlRead($idinput11) & ")"& @LF
msgbox(0,"Сообщение",$genpragma)
Local $hFileOpen = FileOpen("pragma.txt", $FO_APPEND)
FileWrite($hFileOpen, $genpragma)
FileClose($hFileOpen)
EndSwitch
WEnd
|