mIRC Homepage

Docking a dialog

Posted By: shadowdemon

Docking a dialog - 18/11/07 11:33 AM

Hello, long time since i actually scripted anything from mIRC, so a lot rusty at my scripting skills

Recently i got my PC back after many many months of not having one, (had to borrow a pc)
anyways i have just updated my mIRC to the latest Version 6.31 from an erlier version.

Anyways if somebody could help me or whatever, i basicly had this in my old script

Code:
 
ON *:START {
  dialog -m chanset chanset | dll ktools.dll DockWindow $dialog(chanset).hwnd > right
}


dialog chanset {
  title ""
  size -1 -1 70 300
  option dbu
 
   ***DIALOG STUFF HERE***


}

 


This used to use ktools.dll to dock a dialog called chanset to the right hand side of my mIRC
However seen as this dll is now no longer supported i cant do this anymore, then i rememberd dcx.dll
A quick read up says i can dock a dialog to the right hand side.

This is my new code

Code:
ON *:START {
  dialog -m chanset chanset | dll dcx.dll /xdock -t $chanset(dcx).hwnd +v
}


dialog chanset {
  title ""
  size -1 -1 70 300
  option dbu
 
   ***DIALOG STUFF HERE***


}




but all i get is * /dll: no such routine '/xdock' (line 2, startup.mrc)


I have copied the dcx.dll to all the right folders including the folder this script is run from

Can anybody help or atleast tell me in a pleasent way what im doing wrong please
or
suggest a way to "dock" the dialog to the right hand side, i have a rebar.dll and mdx.dll aswell as a few other dlls
in my old mIRC backups before i lost my PC (Harddrive was kept intact) and im sure that most of these dlls will now be outdated from the NEWer mIRC




Thanks
ShadowDemon
mIRC V6.31

(PS, im not a novice or pro scripter, maybe somewhere in the middle, please be gentle with me)
Posted By: Bekar

Re: Docking a dialog - 18/11/07 11:48 AM

The '/xdock' command is one of the tools listed in the MRC scripts that DCX uses, it's not the DLL call.

Make sure the 'dcx_tools.mrc' is loaded, and just /xdock .., not dll dcx.dll /xdock ....

Edit: All that being said, having just read through the dcx_tools.mrc, it just 'dll dcx.dll xdock <flags>' anyway.. wink So if you aren't using dcx_tools.mrc, just remove the /.
Posted By: shadowdemon

Re: Docking a dialog - 18/11/07 08:57 PM

hmmm not working sorry

i altered my code a bit too tho not much

Code:
ON *:START {
  dialog -m chanset chanset
  dll dcx.dll xdock -t $chanset(dcx).hwnd +v
}


i took out that "pipe" | symbol
and now i get

D_ERROR /xdock (Invalid Window to dock)


hmmm i might just have to try and go back through all my old scripts....


Thanks anyways for your help, oh n do i really need to install and load up dcx_tools.mrc' ???

ShadowDemon
Posted By: Bekar

Re: Docking a dialog - 18/11/07 09:13 PM

Not sure, have never used DCX myself.. But it'd be a good idea to have a copy of them as a reference.. wink
Posted By: shadowdemon

Re: Docking a dialog - 18/11/07 09:41 PM

thanks, i think ill try something else, ive never really
gotton into dcx myself..oh well.. hope that somebody
else might be able to help, if not ill try maybe another
dll tho, as im sure u are aware newer versions of mIRC
break "old" scripts and many of the older dlls arnt
updated to match.


Ill just keep plugging away still rusty at the scripting

ShadowDemon
Posted By: Wims

Re: Docking a dialog - 18/11/07 09:42 PM

You just need the 2 alias "xdock" and "dcx" that are in the dcx_tools.mrc :

just use /xdock -t $dialog(chanset).hwnd +v

Posted By: starbucks_mafia

Re: Docking a dialog - 18/11/07 10:06 PM

I've never used DCX but based on the error it seems pretty clear that you're passing an invalid window handle. And looking at your code you're using $chanset(dcx).hwnd - which unless you've created a $chanset alias should actually be $dialog(chanset).hwnd.
Posted By: shadowdemon

Re: Docking a dialog - 18/11/07 10:52 PM

Thanks starbucks and wims, hmm yeah i was kinda doing something wrong.

now i have a new problem, my new code is

Code:
ON *:START {
  dialog -m chanset chanset
  dll dcx.dll xdock -t $dialog(chanset).hwnd +v
}




but the dialog is docked to the Titlebar lol, thats what the -t
bit in the ON start bit is for, hmmm, reading this website
http://dcx.scriptsdb.org/xdock.htm, gives me some info, but if i give it the
Code:
 dll dcx.dll xdock -n $dialog(chanset).hwnd +v


-n is used for docking next to the NickList (which is where i want it to be yeilds an error
D_ERROR /xdock (Invalid Flag)

ill just keep looking, unless somebody who has worked on dcx.dll
can help me and point me in the right direction


ShadowDemon

(See i told ya i was rusty on the old scripting)
Posted By: starbucks_mafia

Re: Docking a dialog - 18/11/07 11:10 PM

Like the documentation shows on the page you linked, you need to tell it which window's nicklist you want to dock it with after the second switch.
Posted By: shadowdemon

Re: Docking a dialog - 18/11/07 11:19 PM

hehe, i feel like such a fool, thanks Starbucks, i got it

my code

Code:
ON *:START {
  dialog -m chanset chanset
  dll dcx.dll xdock -m $dialog(chanset).hwnd +r
}
dialog chanset {

***dialog stuffs here***

]


i went back and reread the site and found the -m between
xdock and $dialog, oooooops, my bad.

well it docks great and so far no probs with mIRC and my private server,
however i just have to recode my old script and incorp it into my new dcx
errrr friendly dialog and see if any of my events are triggering.

Thanks for your help, i might be back with more questions laugh

ShadowDemon
© 2021 mIRC Discussion Forums