Jump to content

Views.dll


Silo

Recommended Posts

I wasn't quite sure where to post this since there doesn't seem to be a general forum for asistance with mIRC scripts (unless I'm totally blind and missed it) :)

 

I'm trying to use the checkbox function that MDX offers (doubt I'll ever make the switch to DCX), and really have no idea how to impliment it. I use a list box to display Channels in one column and the Server they're on in the next.

 

faves.jpg

(PS - I don't actually chat in those rooms, I just added them for an example)

 

I'm old fashioned and write the data to a .txt file (I just can't get the whole .ini file thing :( ) Anyway. the list is displayed with a regular while loop, so this list is dynamic for want of a better word. I'd like to ad the check boxes to utilise an autojoin feature. The trouble is I have no idea how to use this control/function. I've loked at some other scripts for ideas but got totally lost.

 

I fear this may be beyond my scope. Since I'm writing to a .txt file is it possible to still add the ticks next to an item at init?

 

The .text file looks like

#Peers.30s qld-chat.bigpond.com
#Romance.Married&Flirting qld-chat.bigpond.com

 

Any help or snippets would be greratly appreciated. Thanks in advance :)

Edited by Silo
Link to comment
Share on other sites

if that is really on the bigpond server, why not use mIRC's auto join feature instead of creating your own? The works all there and done, you just need to utilize it.

 

 

I was actually going to write in my first post that I know mIRC has the feature already, but I just wanted to have my own. I actually want to use it on a variety of different servers and when I join Server A it will auto join to all the chanels specified.

 

Travis, could you explain a little bit more, please?

 

Thanks guys, I appreciate it :)

Link to comment
Share on other sites

You'd basically need to have a timer to check for boxes checked, and then if a box is checked to join that channel. Here is what you can do...

 

alias checkum .timerboxcheck 1 1 checkboxes
alias checkboxes {
  if ($dialog(<dialognamehere>)) {
    var %l = $did(<dialog name here>,<dialog id here>).lines , %a = 2
    :next
    if ($gettok($did(<dialog name here>,<dialog id here>,%a).text,5,32) == 2) {
      if (!$chan($gettok($gettok($did(DownloadM,1,2).text,2,9),5-,32))) join $gettok($gettok($did(DownloadM,1,2).text,2,9),5-,32)
    }
    inc %a
    if (%a <= %l) goto next
    else checkum
  }
}

on *:dialog:<dialognamehere>:init:*: {
  <mdx coding here>
  checkum
}

 

What this should do is check each line for a checked box. If found it should join the channel if the channel doesn't already exist. Then, it will go to the next line.

 

If all lines have been checked, and the dialog is still open it will begin again until the dialog is finally closed. :)

Edited by Warrior124
Link to comment
Share on other sites

Guest Travis

Oh sorry, I didn't really understand your question ... or where your question was for that matter. I thought your question was how to get checkboxes in the second column.

 

If your question hasn't been answered please re-ask it. Thanks.

 

 

Edit:

 

Read: /scid /scon $scid $scon $cid in the help file.

 

 

If you are connected to more than one network on the same mirc, each network probably has its own CID. Say you are connected to 4 networks.

 

So if network 1 is your active network and your code tells mirc to join #roomA (on network 2), first you have to tell mirc to make Network 2 the active network, then join the room. Otherwise mIRC will try to join the room on the active network.

 

There are many ways of doing this, but they will all use one or all the commands and identifiers I suggested you read about.

 

 

/scid & /scon

 

/scid

When mIRC opens a new status window it numbers it a "connection id" or CID. It will number them consecutively but will not refresh the list. If you open 4 status windows, CID's 1, 2, 3 & 4. Then you close 3 & 4 so now only CID's 1 & 2 are available. After this the next connection will be named 5 and so on. So if you have 6 cid's they may not be numbered 1 - 6. This is where /scon comes in handy.

 

/scon

This is the number of your connections. Not their ID. So if you have 5 connections they are numbered 1 - 5. (Each will have their individual ID as well) The first connection will be $scon(1) the second will be $scon(2) and so on.

 

So one way is to use a goto or while loop to scan through each $scon until you match the network you desire.

 

var %x = $scon(0) | while (%x) {

if ($scon(%x).network == <networkIwant>) { scon %x | join #room }

dec %x
}

 

/scon N, where N is the number of the connection, will make that connection your active connection.

 

/scid N, where N is the ID # of the connection, will make that connection your active connection.

 

 

edit: Looking at the help file:

 

/scid <-rsatM | N> [command]

 

The /scon command works in exactly the same way, except that N represents the Nth connection, not a connection id value.

 

You do not need to do seperate commands. You should be able to include the /join #channel in with the /scon.

 

{ scon 1 join #channel } instead of { scon 1 | join #channel }

 

I've never done it this way, but if it works I will from now on. :)

Edited by Travis
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...