Search found 65 matches

by ALIENQuake
Fri Sep 14, 2018 1:46 pm
Forum: PowerShell GUIs
Topic: DoubleClick Treeview Node problem
Replies: 5
Views: 1577

Re: DoubleClick Treeview Node problem

TreeView2 doesn't handle click/doubleclicks correctly
TreeView3 has the same fault: https://s1.webmshare.com/EKAeY.webm

Google says that I need to override TreeView Class and use custom ones for all forms. I assume that's not possible, right?
by ALIENQuake
Thu Sep 13, 2018 12:55 pm
Forum: PowerShell GUIs
Topic: DoubleClick Treeview Node problem
Replies: 5
Views: 1577

DoubleClick Treeview Node problem

Hi, The code below works as deigned. No matter how fast I execute doubleclick, I will always have child nodes checked or unchecked and the checkbox of the parent not will reflect the state of child nodes: [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") [void] [System.Refle...
by ALIENQuake
Wed Sep 05, 2018 12:55 pm
Forum: PowerShell GUIs
Topic: Display output of the CMD in real time inside TextBox
Replies: 33
Views: 10126

Re: Display output of the CMD in real time inside TextBox

Synchronizing object must be the form: $p.SynchronizingObject = $form1 It is: it's passed via -sync $form1 parameter "SetParent" is only used if you want to display the process window within a form object. If so then position and an location tracking (OnMove) must be implemented for this to display...
by ALIENQuake
Wed Sep 05, 2018 9:16 am
Forum: PowerShell GUIs
Topic: Display output of the CMD in real time inside TextBox
Replies: 33
Views: 10126

Re: Display output of the CMD in real time inside TextBox

Well, here is another attempt: - $count is an index of element from array of processes - when the current process has exited i simply do: $script:count++ - SynchronizingObject has to be passed via parameter to the function - it's possible to send input to the current app - readinput process is readi...
by ALIENQuake
Wed Sep 05, 2018 2:02 am
Forum: PowerShell GUIs
Topic: Display output of the CMD in real time inside TextBox
Replies: 33
Views: 10126

Re: Display output of the CMD in real time inside TextBox

@jvierra Ofc I try you example. I'm on Windows 10 1803, I even try inside Windows 7 VM. But it just executes two process at the same time. There is no waiting for previous process to complete. $code = @' [DllImport("user32.dll", SetLastError = true)] public static extern IntPtr SetParent(IntPtr hWnd...
by ALIENQuake
Tue Sep 04, 2018 3:51 pm
Forum: PowerShell GUIs
Topic: Display output of the CMD in real time inside TextBox
Replies: 33
Views: 10126

Re: Display output of the CMD in real time inside TextBox

@jvierra I'm grateful for you commitment but I can't see how waiting for 'MainWindowHandle' can help. The 'do ... until' is cause application to freeze as soon as I want to execute two process, one by one. This is my attempt to solve this by Runspaces: - ability to see process output - ability to se...
by ALIENQuake
Sun Sep 02, 2018 2:53 am
Forum: PowerShell GUIs
Topic: Display output of the CMD in real time inside TextBox
Replies: 33
Views: 10126

Re: Display output of the CMD in real time inside TextBox

Look at this code: $script:process = New-Object System.Diagnostics.Process $process.add_OutputDataReceived($process_OutputReceived) $process.add_Exited($process_Exited) $process.SynchronizingObject = $formAsyncPingerTest Does runspace will have access to those extra functions: $process_OutputReceive...
by ALIENQuake
Sun Sep 02, 2018 2:42 am
Forum: PowerShell GUIs
Topic: Display output of the CMD in real time inside TextBox
Replies: 33
Views: 10126

Re: Display output of the CMD in real time inside TextBox

Ok but since all child runspace proces are executed inside runspace, does using runspace won't prevent access to "$process.SynchronizingObject", "OutputDataReceived" and "Exited" properly?
by ALIENQuake
Sat Sep 01, 2018 4:17 am
Forum: PowerShell GUIs
Topic: Display output of the CMD in real time inside TextBox
Replies: 33
Views: 10126

Re: Display output of the CMD in real time inside TextBox

You can use WMI to get an async notification of a process exit. This is what I've manage to create: $formAsyncPingerTest_Load = { $pstart = 'SELECT * FROM Win32_ProcessStartTrace' $pstop = 'SELECT * FROM Win32_ProcessStopTrace' $action = { $nevent = $Event.SourceEventArgs.NewEvent if ($nevent.Proce...
by ALIENQuake
Fri Aug 31, 2018 3:23 pm
Forum: PowerShell GUIs
Topic: Display output of the CMD in real time inside TextBox
Replies: 33
Views: 10126

Re: Display output of the CMD in real time inside TextBox

davidc Thanks! Do you think that it can solve yet another challenge? It's possible to wait for process exit? Because I have two or more process, I want to execute them one by one (and at the same time, display output of the CMD in real time inside TextBox) and the next process has to wait for anothe...