mIRC Homepage
Posted By: ATMA icon n' buttons - 22/04/03 12:38 AM
ok once again more about dialogs, is there a way i could make an icon pic on a dialog a button? confused confused
Posted By: shadowdemon Re: icon n' buttons - 22/04/03 01:14 PM
Hi ATMA, yes it`s possible, as i have done this with a script i`m currently working on
I will give you an example code, but you should be able to follow it and create your own.

Code:
menu channel {
Buttons n Icons:dialog -m buttonicons buttonicons
}

dialog buttonicons {
  title "icon n' buttons"
  size -1 -1 122 52
  option dbu
  text "An example dialog with an icon used as a button", 1, 1 1 120 8, center
  icon 2, 5 20 16 16, mirc.ico, 0
  icon 3, 50 20 16 16, mirc.ico, 0
}

ON *:DIALOG:buttonicons:[color:red]SCLICK[/color]:[color:green]2[/color] {
  echo -a Icon 1 was clicked on
}

ON *:DIALOG:buttonicons:[color:red]SCLICK[/color]:[color:green]3[/color] {
  echo -a Icon 2 was clicked on
}

Paste that into your Remotes section of mIRC (ALT + R, to bring up the remote editor)
To see teh dilaog in mirc, use the right mouse button to bring the popup menu for the "Channel Menu"
You should see the words "Buttons n Icons"

This code uses the SCLICK event to let mIRC know you have clicked on an icon and uses id numbers 2 & 3, you can also use .BMP`s too.

Replace the echo -a Icon blahblahblah with whatever your script needs, be it a new dialog opening up, playing a wav file or whatever.

I hope you can understand that and my choice of colours. laugh
And i hope that is what it was you asked for

ShadowDemon
Posted By: ATMA Re: icon n' buttons - 22/04/03 07:38 PM
thx letting you know i all ready know alot about mirc scripting just dont know all of it -.- well thanks for that little script hope it does wonders
Posted By: shadowdemon Re: icon n' buttons - 22/04/03 08:26 PM
yw, np grin

lol, sorry i dont know much myself, but i kinda played around with that myself one day and actually made a script by myself
/me was pleased.

Yeah i wasnt sure how much knowledge in scripting you had, so exuse me for that.

Glad i could help somebody, i mean thats what these forums are for, we all help each other out
© mIRC Discussion Forums