parametrized setbgcol
This commit is contained in:
parent
19ce5b2179
commit
151eb48a75
@ -1,15 +1,44 @@
|
||||
;
|
||||
; change Windows Background Colour
|
||||
; setbgcol.pb
|
||||
; ------------------------------------------------------------
|
||||
; changes windows background colour
|
||||
; LICENSE : GPL
|
||||
; AUTHOR : Michael H.G. Schmidt
|
||||
; EMAIL : michael@schmidt2.de
|
||||
; DATE : 20190524
|
||||
; ------------------------------------------------------------
|
||||
;
|
||||
|
||||
OpenConsole()
|
||||
EnableGraphicalConsole(0)
|
||||
|
||||
; check commandline...
|
||||
If ( CountProgramParameters() = 0 Or CountProgramParameters() >4 )
|
||||
PrintN("")
|
||||
PrintN("usage: setbgcol <R> <G> <B>")
|
||||
PrintN(" sets windows background colour")
|
||||
End 99
|
||||
EndIf
|
||||
|
||||
;
|
||||
; MAIN
|
||||
;
|
||||
|
||||
Dim lpaElements(0)
|
||||
Dim lpaRgbValues(0)
|
||||
|
||||
R$ = ProgramParameter(0)
|
||||
G$ = ProgramParameter(1)
|
||||
B$ = ProgramParameter(2)
|
||||
|
||||
PrintN("R=" + R$ + ", G=" + G$ + ", B=" + B$)
|
||||
|
||||
lpaElements(0) = #COLOR_BACKGROUND
|
||||
lpaRgbValues(0) = RGB(3,131,135)
|
||||
lpaRgbValues(0) = RGB(Val(R$),Val(G$),Val(B$))
|
||||
|
||||
SetSysColors_(1,@lpaElements(),@lpaRgbValues(0))
|
||||
|
||||
; IDE Options = PureBasic 5.70 LTS (Windows - x64)
|
||||
; CursorPosition = 11
|
||||
CloseConsole()
|
||||
|
||||
; IDE Options = PureBasic 5.73 LTS (Windows - x64)
|
||||
; CursorPosition = 35
|
||||
; EnableXP
|
@ -10,8 +10,8 @@ echo removing wallpaper ...
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WallPaper /t REG_SZ /d " " /f 1>nul
|
||||
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
|
||||
|
||||
echo set desktop colour ...
|
||||
%TOOLS%\setbgcol
|
||||
echo set desktop colour (RGB) ...
|
||||
%TOOLS%\setbgcol 3 131 135
|
||||
|
||||
echo starting BGInfo ...
|
||||
%TOOLS%\bginfo\bginfo64.exe %TOOLS%\bginfo\config.bgi /NOLICPROMPT /silent /timer:0
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user