NYCmitch25 Posted September 4, 2022 Share Posted September 4, 2022 Currently I have a powershell kick off from a menu selection and it pops up with the blue PS screen and performs the work, takes about 1 minute. I'm wondering if there is a way to make this look better? Right now I have a pop up progress bar that sits in front of it Progresson(). What I would like to do is not use the powershell screen and display the output of the powershell script as it goes along, OR use the blue screen if I have to but actually display what is going on. Thoughts? Func PerformScan() ; **** PowerShell requirement *** ;RunWait("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command Set-executionpolicy -scope LocalMachine -executionpolicy Unrestricted -Force", @SystemDir, @SW_HIDE, 2) Local $PSScript = "Scan.ps1" Local $PSSOptions = " -Site '"&$Site&"' " Local $sCMD = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command . '" & @ScriptDir & "\" & $PSScript & "' " & $PSSOptions ProgressOn("System Scan", "System Scan Running ..") $PID = Run($sCMD, @SystemDir, @SW_HIDE, 2) ; $STDOUT_CHILD $x = 0 $Forward = 1 While ProcessExists($PID) Sleep(200) If $Forward Then If $x < 100 Then $x = $x + 10 Else $Forward = 0 EndIf Else If $x > 0 Then $x = $x - 10 Else $Forward = 1 EndIf EndIf ProgressSet($x) WEnd ProgressOff() EndFunc Link to comment Share on other sites More sharing options...
Zedna Posted September 16, 2022 Share Posted September 16, 2022 Look here at my CUI progressbar Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
NYCmitch25 Posted September 16, 2022 Author Share Posted September 16, 2022 2 hours ago, Zedna said: Look here at my CUI progressbar This is interesting ! But this is for TUI and not GUI right ? 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