AlMax3000 Posted March 9, 2020 Share Posted March 9, 2020 (edited) Hi guys I can't see the arc.exe cmd in edit1 expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <SendMessage.au3> #include <Constants.au3> $FormName = "test arc" $Form1 = GUICreate($FormName, 566, 401, -1, -1) $Inp = GUICtrlCreateInput("", 8, 32, 465, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY)) $Out = GUICtrlCreateInput("", 8, 64, 465, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY)) $BtnSelectFolder = GUICtrlCreateButton("Browse", 480, 30, 75, 25) $BtnFileSaveDialog = GUICtrlCreateButton("Save", 480, 62, 75, 25) $BtnCompress = GUICtrlCreateButton("Compress", 480, 128, 75, 25) $Edit1 = GUICtrlCreateEdit("", 8, 176, 545, 200) GUISetState(@SW_SHOW) Local $ArcDir = '"' & @ScriptDir & '\Bin\arc.exe"' While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $BtnSelectFolder Local $sFileSelectFolder = FileSelectFolder("", "") GUICtrlSetData($Inp, $sFileSelectFolder) Case $BtnFileSaveDialog $sFileSaveDialog = FileSaveDialog("Save file", @WorkingDir, "Extension (*.arc)|Extension (*.Arc)", 2, "Setup-1") GUICtrlSetData($Out, $sFileSaveDialog) Case $BtnCompress If GUICtrlRead($Inp) = "" Then MsgBox(48, $FormName, "The boxes must not be empty!") ContinueLoop EndIf If GUICtrlRead($Out) = "" Then MsgBox(48, $FormName, "The boxes must not be empty!") ContinueLoop EndIf _Seven_Zip() EndSwitch WEnd Func _Seven_Zip() $pid = Run($ArcDir & ' a -ep1 -ed -r -w.\tmp -mx "' & GUICtrlRead($Out) & '" "' & GUICtrlRead($Inp) & '"',"",@SW_HIDE) GUICtrlSetData($edit1, $Out) $Out = StdoutRead($pid) $Out = StderrRead($pid) StringInStr($Out,$edit1) EndFunc Edited March 9, 2020 by AlMax3000 Link to comment Share on other sites More sharing options...
Nine Posted March 9, 2020 Share Posted March 9, 2020 You need to wait for Run to end before reading the stream. Look help file, it has examples about this. Second you could do the ZIP thing within the Shell.Application object which would give you somewhat more control and you could implement on any Windows machine without outside application. But I doubt you will like this suggestion AlMax3000 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now