SuperflyJon / FileStarter

Start processes on multiple desktops
54 stars 9 forks source link

Errors with example file #3

Closed swa72 closed 3 years ago

swa72 commented 3 years ago

Hi,

I get a bunch of error starting FileStarter with the example file. Any idea?

Exception calling "PinWindow" with "1" argument(s): "Value cannot be null."
At C:\Users\swa\Documents\filestarter\VirtualDesktop.ps1:1993 char:3
+         [VirtualDesktop.Desktop]::PinWindow($Hwnd)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException

File read: C:\Users\swa\Documents\filestarter\files.json
1: notepad Started
<< 4460160 Showing >>
1: notepad Moving window (4460160)
<< 8064464 2296796 >>
2: explorer Waiting for new window class window
<< 8195068 8064464 2296796 >>
<< Found window 8195068 >>
<< 8195068 Showing >>
2: explorer Moving window (8195068)
<< Moving 8195068 to desktop 2 - Games >>
3: outlook Failed to start process outlook! [This command cannot be run due to the error: The system cannot find the file specified.]
<< 396030 395900 69800 135002 10551866 1576320 >>
4: chrome Waiting for new window class window
<< 396030 5639428 395900 69800 135002 10551866 1576320 >>
<< Found window 5639428 >>
<< 5639428 Showing >>
4: chrome Moving window (5639428)
<< Moving 5639428 to desktop 3 - Desktop 3 >>
Exception calling "UnpinWindow" with "1" argument(s): "Value cannot be null."
At C:\Users\swa\Documents\filestarter\VirtualDesktop.ps1:2044 char:3
+         [VirtualDesktop.Desktop]::UnpinWindow($Hwnd)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException

Exception calling "MoveWindow" with "1" argument(s): "Value cannot be null."
At C:\Users\swa\Documents\filestarter\VirtualDesktop.ps1:1735 char:3
+         $Desktop.MoveWindow($Hwnd)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException

fin
PS C:\Users\swa\Documents\filestarter>
SuperflyJon commented 3 years ago

Thanks for the report, I'm guessing you are running powershell without a console window somehow. Anyway checked in a small fix for that.