mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Joined: Feb 2005
Posts: 194
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
How?


"God sometimes puts us in the dark for us to see the light"
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
There's a number of ways you can acheive this. There are alot of Progress Bar tutorials, you could create one in MDX and dock the window using hOs.dll.

There quite a few lag scripts about, so instead of displaying the data on dialogs using /did you'd use the /dll command. I thought you had a lagscript on your toolbar anyway.

Instead of writing to a dialog control as I said use the /dll command.

-Andy

Joined: Nov 2003
Posts: 257
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
Indeed, this lagbar would have to be on the statusbar though and not the toolbar.

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I thought I said you must use the StatusBar, looking back on my post I didn't. I'm sure alhammer knows he'd have to use the StatusBar hehe. grin

They could get a couple of ideas from this, this is a something IHere's some code I've just wrote off the fly, it's untested.

Code:
On *:Start: {
dll hOS.dll AddStatusBar noxptheme sizegrip
dll hOS.dll SBSetPanels 300 -1
dll hOS.dll AddProgressBar 1 noxptheme
dll hOS.dll PBSetColors 1 $rgb(0,252,0) $rgb(0,0,0)
test
}



alias test {
%lag = 0
while (%lag <= 100) {
.timer -m 1 $calc(100 * %lag)  { 
dll hOS.dll PBSetPos 1 %lag 0 100 
}
inc %lag 
}
}


Obviously it's just a progress bar for when the mIRC starts up, the background colour for the progress bar is black, and the positions in green ^K 09. It doesn't account for the lag, but they should have a rough idea of how to add positions. smile

-Andy

Joined: Feb 2005
Posts: 194
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
blush Sorry I wasn't more clear. Yes, I did mean making a progress bar in a status bar. So the code Andy gave me was what I was looking for. Now I understand the format. Thanks to both of you! grin


"God sometimes puts us in the dark for us to see the light"
Joined: Feb 2005
Posts: 194
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
grin Here is the finished LAGBAR. The whole thing obviously is NOT finished. There is alog of work to do on it to make it work/look good. Here is the code aswell. Also, how can I check my idle on the network? What I mean is, the same idle you see when you whois yourslef. Not your channel idle. I'm dead tired so I cant even think. crazy


Code:
alias statusbar {
  if ($1 == off) { dll hOS.dll RemStatusBar }
  else { 
    dll hOS.dll AddStatusBar sizegrip noxptheme
    dll hOS.dll SBSetPanels 80 200 430 530 -1
    dll hOS.dll AddProgressBar 2 smooth
    .timerlag 0 10 lagstatus
    .timeridle 0 1 idlestatus
  }
  if ($status == connected) { 
    dll hOS.dll SBSetData 3 $chr(9) Server: $chr(160) $scid($activecid).network ยป $scid($activecid).server 
  }
  else { 
    dll hOS.dll SBSetData 3 $chr(9) Server: $chr(160) Not Connected 
  }
}

alias idlestatus {
  if ($duration($nick($active,$me).idle) == $null) {
    dll hOS.dll SBSetData 4 $chr(9) Idle: $ch(160) N/A
  }
  else {
    dll hOS.dll SBSetData 4 $chr(9) Idle: $ch(160) $duration($nick($active,$me).idle) 
  }
}

alias lagstatus {
  if ($hget(txlag,curlag) == s) || ($hget(txlag,curlag) == ??) || ($hget(txlag,curlag) == $null)  { 
    dll hOS.dll SBSetData 1 +n $chr(9) Lag: $chr(160) N/A
  }
  else {
    dll hOS.dll SBSetData 1 +n $chr(9) Lag: $chr(160) $hget(txlag,curlag) $+ s
    %lag = $calc(10 * $hget(txlag,curlag))
    while (%lag <= 100) {
      dll hOS.dll PBSetPos 2 $round(%lag,0) 0 100 
      halt
    }
  }
}
I'm sure it's very messy and full of errors. Again, im so freakin tired it's not even funny. And I have to help soemoen move tommrow. crazy Oh well. Please let me know of errors you find. Thanks!

P.S. For those of your seeing a pic of my word counter dialog, REFRESH! :tongue: I used the same file name.

Last edited by alhammer; 30/04/05 05:57 AM.

"God sometimes puts us in the dark for us to see the light"
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Well, for the idle script you could make a timer for when mIRC Starts up to trigger an alias. Now this don't account for your idle time on the server.

Code:
On *:Start: {
  dll hOS.dll AddStatusBar noxptheme sizegrip
  dll hOS.dll SBSetPanels 100 400 -1
  .timeridle 0 1 idlecnt
}

alias idlecnt { 
  if  ($duration($idle) == 0secs) { return }
  dll hOS.dll SBSetData [color:red]<Panel number>[/color] $duration($idle)
}


It's whenever you send any command like /echo, /msg, /say.

Edit: As you've already created a StatusBar in another On Start event, you can remove the AddStatusBar and SBSetPanels lines.

All the best.

-Andy

Joined: Mar 2005
Posts: 17
T
Pikka bird
Offline
Pikka bird
T
Joined: Mar 2005
Posts: 17
is it possible guys to show as all the code?
I have also the hOS.dll and i want to create a statusbar with lag ,server etc ..
it possible to wrote fo us the final code??
(i test the alhammer's but its not working)

Joined: Feb 2005
Posts: 194
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
My code does work. It's not very efficiant, and has alot of bugs, but you should still see the bar. Make sure hOS.dll is in your main mIRC directory. Also, as you can see, I have no on START event. Therefore, you must use "/statusbar" to turn it on and "/statusbar off" to turn it off. This was only temperarly untill I get it working the way I want.


"God sometimes puts us in the dark for us to see the light"
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
It wont work because you did not append the Hash Table code for your lag script. smile

Joined: Mar 2005
Posts: 17
T
Pikka bird
Offline
Pikka bird
T
Joined: Mar 2005
Posts: 17
No i did start event but i forget the /statusbar on etc smile
so ..if u finish i hope to share with us ur code.

Joined: Mar 2004
Posts: 155
D
Vogon poet
Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
I'm glad that someone has finally began to discuss this hOS.dll in an example type setting, especially using a statusbar because I've read the document that came with the dll and to be honest I for some reason could not grasp how to get things done but I am beginning to understand it much more now that I am reading this post. Thanks to everyone that is contributing in this discussion because I'm actually learning something now. The mdx dll's were simple for me but this one for some unknown reason I'm baffeled... or atleast I was.

Joined: Nov 2003
Posts: 257
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
i've been told that the statusbar is buggy with hos.dll, i tried one myself a few weeks ago and it didn't work well with my custom toolbar and nicklist.

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Oh, I found hOs.dll easier than MDX. The help file is excellent, clicked on right away. I prefer hOs.dll for status bars to MDX because you'd need another DLL to dock the dialog. Where as you've got one command to create and dock and the second command to create the panels andthe third to insert progress bar at will.

Here's something that may help you.

Code:
alias hOs {
  if ($1 == Make) {
    dll hOS.dll AddStatusBar noxptheme sizegrip
    dll hOS.dll SBSetPanels 300 -1
    dll hOS.dll AddProgressBar 1 noxptheme
  }
  if ($1 == Destroy) {
    dll hOS.dll RemStatusBar
  }

  if ($1 == Setpos) {
    dll hOS.dll PBSetPos $2 $3 0 $4
  }
  if ($1 == Colour) {
    dll hOS.dll PBSetColors $2 $rgb(255,0,0) $rgb(0,255,0)
  }
}



/hOs make creates a status bar with the first panel 300 pixels. Creates the progress bar also.

/hos destroy - Removes the Status Bar.

/hOs setpos:

Sets the Progress Bar Positions.
/hOs SetPos <Panel Number> <Postion> <Out of...>

Example:

/hOs setpos 1 50 100 - Sets the position half way on panel number 1.

/hOs Colour <Panel Number>

Hope this makes life easier for anyone.

All the best,

-Andy

Joined: Mar 2004
Posts: 155
D
Vogon poet
Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
Yeah, since viewing this thread I've redownloaded the dll /help file and it's much easier. I'm thinking I was having a very bad day or was just dead tired the first time I attempted to use the dll because after looking at it now I don't know where I found it to be so hard to understand last time. But I guess every little bit helps when your learning new things. Thanks for the input.

Joined: Feb 2005
Posts: 194
A
Vogon poet
OP Offline
Vogon poet
A
Joined: Feb 2005
Posts: 194
Yea. I've figured out how to use it fine. I'm only trying to figure out what kinds of usefull info to display in it, and what commands to use for that info. Any ideas? So far I have lag, server, and idle. confused


"God sometimes puts us in the dark for us to see the light"
Joined: Mar 2004
Posts: 155
D
Vogon poet
Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
How about ram usuage and/or mp3 playing wheather through a coded mp3 player or winamp.

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Well that's simple enough when mIRC starts have the Ram usage on a timer like when we check the idle time. As for the song, when you slect a song get it to write to a panel, remember you're allowedtouse colour on these status bars, using +c. +p makes the statusbar panel appear popped up.
And when the song ends (The on MIDIEND, on WAVEEND, and on MP3END events trigger when mIRC finishes playing a sound) simply write again to the statusbar no song playing or something.

All the best,

-Andy.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Since I've not yet looked into hOS.dll, let me just ask here... Can the hOS progress bar be "smooth"? I've never gotten the MDX one to be "smooth" even though there's a command for it.


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2004
Posts: 155
D
Vogon poet
Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
Yes the hOs.dll can do smooth progress bars. Above is the screenshot that has it as smooth and below is from the hOS help file.

Quote:
Parameters:

<#panel> [styles]

Description:

This command attach a progressbar on a panel of the statusbar. [styles] is optional. See Events.

<#panel> panel number
[styles] the styles are:


noxptheme - remove the xp theme
vertical - vertical progressbar
smooth - smooth progressbar
marquee - marquee progressbar (work only on Windows XP or better)
track - progressbar as trackbar
handcurs - show the hand cursor on the progressbar (use it with track style)
windowedge
clientedge
staticedge
dlgmodal
dlgframe
border

Example:

//dll hOS.dll AddProgressBar 1 noxptheme

//dll hOS.dll AddProgressBar 2 smooth track

//dll hOS.dll AddProgressBar 3

Page 1 of 2 1 2

Link Copied to Clipboard