mIRC Homepage
Posted By: PhyxiuS switchbar - 16/04/06 09:18 PM
Hi, i've been creating a switchbar in Dialog Studio, atlast, just the dialog... crazy
-
This is what i've got:
Code:
dialog switchy {
  title "Switchy"
  size -1 -1 69 311
  option dbu
  icon C:\b00m`v1.0\graphics\a.ico, 0
  edit "", 2, 1 57 57 10
  button "Join", 4, 2 68 25 12
  button "Part", 5, 32 68 26 12
  box "", 6, 0 49 60 33
  box "Chan:", 7, 0 43 60 10, disable
  box "Auth:", 10, 0 83 60 10, disable
  box "", 17, 0 89 60 39
  box "Server:", 18, 0 3 50 10
  edit "", 19, 1 14 47 10
  box "", 20, 0 9 50 33
  button "Connect", 21, 6 27 37 12
  box "", 22, 4 22 41 19
  edit "", 23, 1 94 50 10
  edit "", 24, 1 105 50 10
  button "Login", 25, 13 116 25 10
  box "Modes:", 26, 0 129 63 10, disable
  box "", 27, 0 135 60 77
  box "Others:", 28, 0 213 60 10, disable
  box "", 29, 0 219 60 50
  text "© Sh4d0w.", 30, 1 282 33 8, disable
}


Well, it got the buttons, etc... , but now i just need the stuff how to get the Buttons working, and how it shows up the switchbar on the left side of my mIRC... I have no idea how to do that, even not after reading tutorials... & i already have all needed "dll's" for it...
Posted By: SladeKraven Re: switchbar - 16/04/06 09:59 PM
I think we have a slight misunderstanding of switchbar. A switchbar is either at the top, bottom, left, right position of your mIRC. It displays the private messages, channels, DCC gets/sends, server connections.

With your code you need it to be docked with DLL's such as hOs.dll or UltraDock.dll found here

As for coding your buttons:

Code:
On *:Dialog:switchy:*:*: {
  if ($devent == sclick) {
    if ($did == 21) server $$did($dname,19)
  }
}


Try that for example.

-Andy
Posted By: PhyxiuS Re: switchbar - 16/04/06 10:07 PM
can u explain me more about the code u gaved me? + i want it just to be a switchbar... & make the buttons do they're work, etc... & i just don't get it ;s
Posted By: PhyxiuS Re: switchbar - 16/04/06 10:10 PM
& it's not just a dialog that shows up on the left side of my mIRC... it just loads & stays there 4 always, not something u can close... if u understand... crazy
-
just like a switchbar...
Posted By: PhyxiuS Re: switchbar - 16/04/06 10:36 PM
the dialog wont even go open, cuz when i type:

/switchy

it just wont get open, & i know i have 2 put something with "DIALOG blabla' before it, but i'm totally confused, so i don't know anymore... I really need some help with this ;s
Posted By: drc4 Re: switchbar - 16/04/06 10:41 PM
Quote:
the dialog wont even go open, cuz when i type:

/switchy

it just wont get open, & i know i have 2 put something with "DIALOG blabla' before it, but i'm totally confused, so i don't know anymore... I really need some help with this ;s


Use the following..
Code:
alias switchy { dialog -m switchy switchy }

Then use /switchy to load the dialog.
Posted By: PhyxiuS Re: switchbar - 16/04/06 10:43 PM
That's what i ment, lol smile thankx for that already smirk
Posted By: PhyxiuS Re: switchbar - 16/04/06 10:52 PM
Well, this is what i've got for so far:
Code:
alias switchy { dialog -m switchy switchy }
dialog switchy {
  title "Switchy"
  size -1 -1 69 311
  option dbu
  icon C:\b00m`v1.0\graphics\a.ico, 0
  edit "", 2, 1 57 57 10
  button "Join", 4, 2 68 25 12
  button "Part", 5, 32 68 26 12
  box "", 6, 0 49 60 33
  box "Chan:", 7, 0 43 60 10, disable
  box "Auth:", 10, 0 83 60 10, disable
  box "", 17, 0 89 60 39
  box "Server:", 18, 0 3 50 10
  edit "", 19, 1 14 47 10
  box "", 20, 0 9 50 33
  button "Connect", 21, 6 27 37 12
  box "", 22, 4 22 41 19
  edit "", 23, 1 94 50 10
  edit "", 24, 1 105 50 10
  button "Login", 25, 13 116 25 10
  box "Modes:", 26, 0 129 63 10, disable
  box "", 27, 0 135 60 77
  box "Others:", 28, 0 213 60 10, disable
  box "", 29, 0 219 60 50
  text "© Sh4d0w.", 30, 1 282 33 8, disable
}
On *:Dialog:switchy:*:*: { 
  if ($devent == sclick) {   
    if ($did == 21) server -m $$did($dname,19) 
  }
}


By the way, where is this standing for:
if ($did == 21) server -m $$did($dname,19)
...
$did == 21) ... why the 21? & $$did($dname,19) <- why 19?
Posted By: SladeKraven Re: switchbar - 16/04/06 10:52 PM
You really should read about dialogs in the help file before creating them. smile

-Andy
Posted By: PhyxiuS Re: switchbar - 16/04/06 10:54 PM
Yes... but the point is, i don't want to create a dialog, but a switchbar... + i've already readed like 4 tutorials... But i still don't get it, that's why i'm asking for help here... Those guys can fix every problem, or create everything... Never had a topic where those mirc guys didn't knew anything of. wink
Posted By: PhyxiuS Re: switchbar - 16/04/06 11:05 PM
i need sleep now, so i wont answer anymore, until tomorrow morning :tongue:

nn all. wink
Posted By: drc4 Re: switchbar - 16/04/06 11:09 PM
Using the following, would get the rest of your dialog/switchbar to work.
Code:
On *:Dialog:switchy:*:*: {  
  if ($devent == sclick) { 
    if ($did == 21) { server -m $$did($dname,19)   }
    if ($did == 4) { join $did($dname,2) }
    if ($did == 5) { part $did($dname,2) }
    if ($did == 25) { msg nickserv identify $did($dname,23) $did($dname,24) }
  }
}

What you're attempting to do is create a dialog and use it as a custom switchbar. So in all reality, you're just creating a dialog.
Posted By: PhyxiuS Re: switchbar - 17/04/06 08:22 AM
Ok, that part i understand now... But the way to make it a switchbar, how do i do that? ... Just to load it on the left side of my mIRC uncloseable... like other switchbars...
Posted By: Mpdreamz Re: switchbar - 17/04/06 08:41 AM
Use docking dll's

I personally like UltraDock.dll the best.
Posted By: PhyxiuS Re: switchbar - 17/04/06 08:47 AM
I know, & i already received that sort information, but i don't know how to combinate the dll with the code... or how to load it & make it work...
Posted By: PhyxiuS Re: switchbar - 17/04/06 04:17 PM
I already have the full dialog now, i just want the code to make it a switchbar now... Can someone help me with this please? confused
Posted By: drc4 Re: switchbar - 17/04/06 06:40 PM
You've already been helped. Download a docking dll, such as UltraDock by ClickHeRe, and read the help file. I've never used the dll before, but the helpfile was so easy to understand, and an example is provided. For example, to dock the dialog to the left side of mIRC, you would simply use the following code.
Code:
alias udo { 
  if ($isid) return $dll($mircdirultradock.dll,$1,$2-)
  else $dll($mircdirultradock.dll,$1,$2-)
}
ON *:SIGNAL:UltraDock: {
  echo -s SIGNAL ULTRADOCK: $1-
}
alias switchy { 
  dialog -m switchy switchy
  echo -a $udo(Dock,-1 $dialog(switchy).hwnd left switchy) 
}

Just ensure you have the dll in your $mircdir, and the rest of your dialog script in the same remote file, and you're set. by editing the word left after the $dialog(switchy).hwnd in the alias, you can change it to top, bottom, or right to put the switchbar wherever you want it. But try reading the help file yourself, before requesting help. It really isn't as hard as you think it is. The UltraDock dll can be found here.
© mIRC Discussion Forums