::   *******************************************************
::   ***                                                 ***
::   ***     Test_Full-Screen_GMIC-CLI_PowerShell.bat    ***
::   ***                  samj 20211128                  ***
::   ***                                                 ***
::   *******************************************************
Set DirOrigine=%CD%

::   *******************************************************
rem  ***                 Mode display                    *** 
::   *******************************************************
mode con cols=128 lines=40
color 0D

::   *******************************************************
rem  *** Create PowerShell Test_Full-Screen_GMIC-CLI_PowerShell.ps1 *** 
::   *******************************************************
echo Add-Type -AssemblyName System.Windows.Forms > %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo $Screens = [System.Windows.Forms.Screen]::AllScreens >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo $X_Position = 0 >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo $Y_Position = 0 >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo foreach ($Screen in $Screens) >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo { >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo  	$Screen_W = $Screen.bounds.Width >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo  	$Screen_H = $Screen.bounds.Height >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo  	[Windows.Forms.Cursor]::Position = "$Screen_W,$Screen_H" >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo  	./gmic cursor 0 repeat 5 fx_image_sample 0,0,0 +samj_full_screen_display 1,800,600,1500 +samj_full_screen_display 0,($Screen_W/2),($Screen_H/2),1500 samj_full_screen_display 0,600,800,1500 cursor 0 done >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo  	Start-Sleep -Seconds 5 >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo  	$X_Position = $X_Position + $Screen_W >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo } >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1
echo [Windows.Forms.Cursor]::Position = "300,300" >> %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1

::   *******************************************************
rem  ***             Start Script PowerShell             *** 
::   *******************************************************
Powershell.exe -executionpolicy remotesigned -File  %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1

::   *******************************************************
rem  ***                   Delete                        ***
rem  ***     Test_Full-Screen_GMIC-CLI_PowerShell.ps1    ***
::   *******************************************************
erase %DirOrigine%\Test_Full-Screen_GMIC-CLI_PowerShell.ps1

::   *******************************************************
rem  ***                        FIN                      *** 
::   *******************************************************
exit
