mIRC Home    About    Download    Register    News    Help

Print Thread
Autocompleting Nicknames on @Windows #128869 30/08/05 06:52 PM
Joined: Aug 2005
Posts: 1
R
rippen Offline OP
Mostly harmless
OP Offline
Mostly harmless
R
Joined: Aug 2005
Posts: 1
heya.
i'm on the channels all the time through @Windows.. and obviously these @Windows don't have any nicklist BUT they have the standard editbox to type.
but.. while on the @Windows i cannot complete nicknames with the TAB key which was really useful..

is there any way to complete nicknames on @Windows with TAB?

thanks.

Re: Autocompleting Nicknames on @Windows #128870 30/08/05 07:53 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You can put nicklist in @Windows with the -l switch.

/window -el12 @Window

If your windows are like: @#Channel

Then you could use the On Keydown event anticipate the TAB key value and use an alias like:

Code:
alias tab {
  var %tab.chan = #$$1, %x = 1
  while (%x <= $nick(%tab.chan,0)) {
    if ($left($nick(%tab.chan,%x),1) == %tab.chan) {
      %token = $addtok(%token,$fline(%tab.chan,$nick(%tab.chan,%x),1,1),32)
    }
    inc %x
  }
  if ($numtok(%token,32) == 1) { 
    editbox $+($nick(%tab.chan,$gettok(%token,1,32)),:) 
  }
  elseif ($numtok(%token,32) > 1) { 
    inc %names $calc($gettok(%token,1,32) - 1)
    if ($istok(%token,%names,32)) {
      editbox $+($nick(%tab.chan,%names),:)
    }
    if (%names == $gettok(%token,$numtok(%token,32),32)) unset %names
  }
}


I'm pretty tired so it can be improved a hell of a lot but I didnt have much sleep last night so it is fairly hard to concentrate.. smile

You can test it in a channel.

/tab #Channel B

Obviously, if you use it in a window and keep pressing TAB to refresh the tab alias you wouldnt need to keep hitting the up arrow to get the next nickname.

-Andy

Re: Autocompleting Nicknames on @Windows #128871 31/08/05 01:05 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
You wheel reinventor you! smile

Quote:
You can put nicklist in @Windows with the -l switch.
/window -el12 @Window
If your windows are like: @#Channel
Then you could use the On Keydown event anticipate the TAB key value and use an alias like:
etc etc etc


An even better idea is to NOT intercept the TAB key at all and just let mirc do the job itself, since TAB completeion works of the contents of the listbox of what ever window your in, custom or channel. :-)

Re: Autocompleting Nicknames on @Windows #128872 31/08/05 01:13 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
How do you mean wheel reinventor dude? shocked

-Andy

Re: Autocompleting Nicknames on @Windows #128873 31/08/05 01:37 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
lol it was just a joke. you were gonna build a tab completor when its got one built in, you were reinventing the wheel.

Re: Autocompleting Nicknames on @Windows #128874 31/08/05 01:49 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I guess I didn't even get that to work, kinda does for the most but bleh.. grin

-Andy