mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2012
Posts: 317
Epic Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 317
I would like to set a custom RGB color for the background of only one window without affecting the other windows.

Of course, we have the option to change the mIRC color scheme with the "/color" command, but this will affect all windows at the same time.
But how can I set a certain color tint only for the window in which I want to have a custom color (not for all windows) ???

Let's say I want all channel windows to have a black background, given the overall color scheme, but for one #test channel or custom @test window, I want to set different shades of color for the background by selecting it from the RGB range.

At the moment, this can only be done by adding an image through the command: /background -t #test image\background.jpg

But I don't want to create 100500 small pictures with different shades of color for this, in order to be able to choose from a wide range of the color I need.

[Linked Image from i.ibb.co] [Linked Image from i.ibb.co]
[Linked Image from i.ibb.co] [Linked Image from i.ibb.co]


[Linked Image from i.ibb.co] So I suggest expanding the command syntax: /background -abemsgdluhcfnrtpx [window] [filename|RGB]

An example of a command for different types of windows:

  • Custom: /background @test $rgb(59,62,69)
  • Channel: /background #test $rgb(34,34,36)
  • Query: /background Epic $rgb(27,29,30)
  • Status: /background -s $rgb(141,163,153)
  • Toolbar: /background -l $rgb(32,32,36)
  • Switchbar: /background -h $rgb(32,32,36)
  • Treebar: /background -b $rgb(11,11,17)



This will allow both an image and an RGB color to be set, and this should only affect the specified window and should not affect all other windows.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Jan 2012
Posts: 317
Epic Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 317
In addition to the above request, it would not be superfluous to add something else related to this topic, for a complete set of mIRC design customization via scripts.

Suggestion: To add/change/delete a background for the "Listbox" and "Editbox" through the "/background" command.
At the moment, this can only be configured via the "mIRC Colors" dialog box, which limits our possibilities.

Therefore, I propose to add two new switches "-i" and "-z[N]", where N = 1 (color active field), N = 2 (color inactive field). If N is not specified, then the color will be for both.

An example of using commands:

  • Listbox # (RGB): /background -i #test $rgb(25,25,29)
  • Listbox @ (RGB): /background -i @test $rgb(28,28,32)
  • Listbox # (Image): /background -ti #test image\background1.jpg
  • Listbox @ (Image): /background -ti @test image\background2.jpg


  • Editbox # (RGB): /background -z #test $rgb(10,11,12)
  • Editbox @ (RGB): /background -z @test $rgb(15,16,17)
  • Editbox ? (RGB): /background -z1 Epic $rgb(20,21,22)
  • Editbox ? (RGB): /background -z2 Epic $rgb(30,31,32)



Note: If an image is used as the background, then also the corresponding "-cfnrtp" switches should be available for this. Thank.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Dec 2002
Posts: 252
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Dec 2002
Posts: 252
While this doesn't solve all your proposals, you can somewhat do what you're wanting with a small alias using picture windows and not need "thousands" of image files.

This is just a rather crude and quick example just to show the concept... it'd need some work to mimic /background switches entirely... Probably will fail with things like "-t #mychan" for example. I only did this as a quick test with the common switches: -amsdluhb

Also: you'd need to save them somewhere with a unique name or always generate these on startup/window opening/etc... for it to be permanent since the temp file will no longer exist that is saved in mIRC's INI file under the [background] group.

Code
;/rgbbackground <target> <rgbcolor>
alias rgbbackground {
  ;Create a borderless 1x1 @picwin
  window -hpf +d @Pixel -1 -1 1 1

  ;Draw a color and save the @picwin as a PNG
  drawdot -r @Pixel $2 1 0 0
  drawsave @Pixel PixelTmp.png

  ;Use /Background to place temp PNG as background
  background $1 PixelTmp.png

  ;Delete temporary PNG
  remove PixelTmp.png

  ;Close our drawing surface.
  window -c @Pixel
} 

Example of your first RGB color tiled on the status window:
//rgbbackground -st $rgb(59,62,69)

Joined: Jan 2012
Posts: 317
Epic Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 317
This is of genius!!! Thanks for the good advice. If i change and edit your code a little, then it can be used as a temporary solution.

However, this is just a workaround and we will still use the image instead of simply filling the background with the desired color.
Additionally, this does not solve the problem of not being able to change the background for "Listbox", "Editbox" and etc, using the command "/background".

Therefore, I still want to get official support for this functionality, since it would be logical if we could customize a separate background RGB color in any part of mIRC and for each window through a command in our scripts, just like we can do this through the dialog box "mIRC Colors".


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Jul 2006
Posts: 4,172
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,172
I did the same thing for someone and with a 1x1 bitmap, there is at least one switch that takes 12s to complete, I'd say making the bitmap a bit bigger is better/safer.

I wrote a report about it and it didn't go through, I was reporting just in case but the timing are consistent as you make the bitmap bigger so in the end that might just be normal and it's just a bad idea to use that small of a bitmap.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard