Jump to content

Dcx Help


nnvi

Recommended Posts

Hello guys, I'm trying to create a Status bar in DCX, I've been reading the manual online, and i've tried a few thing with no look! Could you guys help me out?

 

Here's what i've been reading : http://dcx.scriptsdb.org/xstatusbar.htm

 

And all i have for DCX alias

alias dcx {
  if ($isid) returnex $dll($scriptdirdcx.dll,$1,$2-)
  else dll " $+ $scriptdirdcx.dll" $1 $2-
}
alias xdock {
  if ($isid) returnex $dcx( _xdock, $1 $prop $2- )
  dcx xdock $1-
}

dont i need to use a alias for xStatusbar ?

 

Please help lol

 

:D

Link to comment
Share on other sites

You do need a xstatusbar alias to make the statusbar function. Also, you have to enable it with the -A command. Below is an example or a basic test dcx status bar. I have modified the code to match your posted code which assumes dcx.dll is in $scriptdir.

 


alias dcx { if ($isid) returnex $dll($scriptdir $+ dcx.dll,$1,$2-) | else dll " $+ $scriptdir $+ dcx.dll" $1 $2- }
alias xstatusbar {
  !if ($isid) returnex $dcx( _xstatusbar, mIRC $prop $1- )
  dcx xstatusbar $1-
}


alias status {
  xstatusbar -A 1 notheme
  xstatusbar -l 100 200 200 -1
  
  xstatusbar -t 1 + 0 Width100 $chr(9) Width100 Tooltip normal style
  xstatusbar -t 2 + 0 Width200 $chr(9) Width200 Tooltip normal style
  xstatusbar -t 3 +n 0 Width200 $chr(9) Width200 Tooltip noborder style
  xstatusbar -t 4 +p 0 Width Remainder $chr(9) Width Remainder Tooltip popup style
}

First verify that dcx.dll is located in the $scriptdir. Next run the /status alias and you should have a statusbar.

Link to comment
Share on other sites

I copied and pasted the code and it worked fine. I am using mIRC 7.19 and a fairly recent version of DCX. I could only assume you had a copy and paste error or an old version of mIRC or DCX.

 

Ensure you have the most recent version of mIRC (easy to find). The most recent version of DCX can be found via the forum thread from Ook @ http://dcx.scriptsdb.org/forum/forumdisplay.php?fid=22

 

If you still have problems.. comment out each (one at a time) line of xstatusbar making it ;xstatusbar until the error goes away. Then let me know which line exactly is giving you an error.

Link to comment
Share on other sites

Nice one Pablo! It now works. I've been trying to add an icon....

 

alias status {
  xstatusbar -A 1 notheme
  xstatusbar -l 100 200 200 -1

  xstatusbar -t 1 + 0 $ip $chr(9) Width100 Tooltip normal style
  xstatusbar -w 1 + 0 $ico4
  xstatusbar -t 2 + 0 Width200 $chr(9) Width200 Tooltip normal style
  xstatusbar -t 3 + 0 Width200 $chr(9) Width200 Tooltip noborder style
  xstatusbar -t 4 + 0 Width Remainder $chr(9) Width Remainder Tooltip popup style
}

With error: D_ERROR dcxLoadIcon (Invalid Flags)

D_ERROR /xstatusbar -w (Unable To Load Icon)

Edited by nnvi
Link to comment
Share on other sites

I also have a toolbar that when i open treeview i get this:

Posted Image

then when i minimize and then maximize i get this:

Posted Image

 

I have the dialog docked using DCX... here some code..

 

on *:dialog:k_bar:init:0: {
  mdx MarkDialog $dname
  mdx SetFont $dname 4 -10 900 Tahoma bold
  mdx SetControlMDX $dname 4 Toolbar arrows flat nodivider list wrap > $bars
  mdx SetBorderStyle 4
  mdx SetDialog $dname style
  mdx SetDialog $dname bgcolor $rgb(222,220,213)
  mdx SetColor $dname 4 textbg $rgb(222,220,213)
  mdx SetColor $dname 4 background $rgb(222,220,213)
  did -i $dname 4 1 bmpsize 32 32
  did -i k_bar 4 1 setimage icon big $shortfn($scriptdirIco\cone.ico)
  did -i k_bar 4 1 setimage icon big $shortfn($scriptdirIco\discon.ico)
  did -a k_bar 4 2 Connect $chr(9) $+ Connect

  did -a k_bar 4 -

  update_k
  .timertb_dock 1 0 xdock -m $dialog($dname).hwnd +t
}

 

Its really bugging me! can you help

Link to comment
Share on other sites

Well, when using xdock -m it docks to the main mIRC window which is the channel/chat window. So when you open the treebar, it is not docked to it, and only the main mIRC window. That behavior is normal and is not a bug. Yo could try docking to the toolbar using xdock -t, but then you would have to make the toolbar visible.

 

From experience, you can mod the existing mIRC toolbar without using mdx or dcx. Never attempted to make one otherwise. I'l track down some info on how to mod the existing toolbar.

 

Still need help with icons in the status?

Link to comment
Share on other sites

Make sure you download the latest version of DCX in the thread I posted above (the forum). Use that one only. According to Maki that alone will make your toolbar work correctly still using the xdock -m flag.

 

For icons in the xstatusbar, here is an updated status alias that adds icons. It is commented. Ask if you have questions.

 

alias status {
  ;icons are indexed by a number in the order you add them.  You add five icons, they will be 1 through 5
  
  ;add icons (a1-a3.ico is located in the folder with mirc.exe atm .. use icons\a1.ico to have an icons folder)

  ;adds icon #1 as a1.ico in main mirc.exe folder
  xstatusbar -w + 0 a1.ico

  ;adds icon #2 as a2.ico
  xstatusbar -w + 0 a2.ico

  ;adds icon #3 as a3.ico
  xstatusbar -w + 0 a3.ico


  ;enable statusbar
  xstatusbar -A 1 notheme
  

  ;add 4 sections to statusbar
  xstatusbar -l 100 200 200 -1


  ;input data for the 4 sections

  ;uses icon #1 - a1.ico as defined above
  xstatusbar -t 1 + 1 Width100 $chr(9) Width100 Tooltip normal style

  ;uses icon #2 - a2.ico
  xstatusbar -t 2 + 2 Width200 $chr(9) Width200 Tooltip normal style

  ;uses icon #3 - a3.ico
  xstatusbar -t 3 +n 3 Width200 $chr(9) Width200 Tooltip noborder style

  ;uses icon #0 - which means no icon
  xstatusbar -t 4 +p 0 Width Remainder $chr(9) Width Remainder Tooltip popup style
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...