aa2zz6 Posted September 25, 2015 Share Posted September 25, 2015 (edited) Greetings, I was wondering if it was possible to code a text box which could display each output done or process completed by the program. Kinda like a log sheet per say but built in the GUI. I googled this idea a few different ways and it didn't return any results. If anyone has any idea please feel free to share. Picture below shows a tab with Log and that's where everything will be recorded. Edited September 26, 2015 by aa2zz6 pic Link to comment Share on other sites More sharing options...
computergroove Posted September 26, 2015 Share Posted September 26, 2015 (edited) #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Log = GUICreate("", 615, 437, 254, 124) GUICtrlCreateEdit("", 8, 8, 593, 425) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $LogMessage ;place the processes you want installed in here FirstInstallation() $LogMessage = "First Installation is done." GUICtrlSetData($Log,$LogMessage) SecondInstallation() $LogMessage = $LogMessage & @CRLF & "Second Installation is done." GUICtrlSetData($Log,$LogMessage) ;end placing the processes you want installed in here While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func FirstInstallation() ;Do Something EndFunc Func SecondInstallation() ;Do something EndFuncI haven't tested this but it should work if you change the processes in the 2 functions. Edited September 26, 2015 by computergroove Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
aa2zz6 Posted September 26, 2015 Author Share Posted September 26, 2015 (edited) Thanks for the reply! I had to switch the variable around in order for it to write out. I'll post the code below.I also included a _NowTime() to show when the process was completed.expandcollapse popup#include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Date.au3> #Region ### START Koda GUI section ### Form= GUICreate("Form3", 413, 298, 303, 219) $log = GUICtrlCreateEdit("", 56, 40, 185, 89, BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $LogMessage ;place the processes you want installed in here FirstInstallation() $LogMessage = "First Installation is done." GUICtrlSetData($log,$LogMessage) SecondInstallation() $LogMessage = _NowTime() & $LogMessage & @CRLF & "Second Installation is done." GUICtrlSetData($Log, $LogMessage) ;end placing the processes you want installed in here While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func FirstInstallation() ShellExecute("C:\Program Files (x86)\Malwarebytes Anti-Malware\mbam.exe") EndFunc ;==>FirstInstallation Func SecondInstallation() ;Process goes here EndFunc ;==>SecondInstallation Edited September 26, 2015 by aa2zz6 updated Link to comment Share on other sites More sharing options...
aa2zz6 Posted September 26, 2015 Author Share Posted September 26, 2015 My problem with adding a _NowTime() is that the time is together on one line rather than with in the system message. I figured adding it in the front of the $LogMessage would work but it won't.expandcollapse popup#include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Date.au3> #Region ### START Koda GUI section ### Form= GUICreate("Form3", 413, 298, 303, 219) $Log = GUICtrlCreateEdit("", 56, 40, 250, 89, BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $LogMessage ;place the processes you want installed in here FirstInstallation() $LogMessage = _NowTime() & $LogMessage & @CRLF & " First Installation is done." GUICtrlSetData($Log,$LogMessage) SecondInstallation() $LogMessage = _NowTime() & $LogMessage & @CRLF & " Second Installation is done." GUICtrlSetData($Log, $LogMessage) ;end placing the processes you want installed in here While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func FirstInstallation() ShellExecute("C:\Program Files (x86)\Malwarebytes Anti-Malware\mbam.exe") EndFunc ;==>FirstInstallation Func SecondInstallation() ShellExecute("C:\Program Files (x86)\Malwarebytes Anti-Malware\mbam.exe") EndFunc ;==>SecondInstallation Link to comment Share on other sites More sharing options...
computergroove Posted September 27, 2015 Share Posted September 27, 2015 $LogMessage will start as a single line item and after every new installation it will add a new line. Try this:Global $LogMessage ;place the processes you want installed in here FirstInstallation() $LogMessage = $LogMessage & @CRLF & _NowTime() & " First Installation is done." GUICtrlSetData($Log,$LogMessage) SecondInstallation() $LogMessage = $LogMessage & @CRLF & _NowTime() & " Second Installation is done." GUICtrlSetData($Log, $LogMessage) ;end placing the processes you want installed in here Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
aa2zz6 Posted September 27, 2015 Author Share Posted September 27, 2015 Thanks Computergroove. I appreciate the help. 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