mIRC Home    About    Download    Register    News    Help

Print Thread
#194029 28/01/08 05:31 PM
Joined: Aug 2007
Posts: 25
S
sameh84 Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2007
Posts: 25
please wt the reason to prevent $active to show the channel its't working correct :-


Code:
alias ShowNicks {
  var %x 1
  while (%x <= $Nick($active,0)) {
    echo -a $Nick($active, %x)
    inc %x
  }
}



that one doesnt work :S so wt is the reason for that maybe ?! ,, thanks for you all

sameh84 #194031 28/01/08 05:49 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Originally Posted By: sameh84
please wt the reason to prevent $active to show the channel its't working correct :-


I can't parse this.

Originally Posted By: sameh84
Code:
alias ShowNicks {
  var %x 1
  while (%x <= $Nick($active,0)) {
    echo -a $Nick($active, %x)
    inc %x
  }
}



that one doesnt work :S so wt is the reason for that maybe ?! ,, thanks for you all


I believe it does work - though untested. Note that it certainly doesn't work for status windows or p.m.'s.

LostShadow #194042 28/01/08 06:59 PM
Joined: Aug 2007
Posts: 25
S
sameh84 Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2007
Posts: 25
i made sidebar dialog and made icon for that code in the sidebar and when i join the room i click the icon and when i press show doesnt show that even the code as i paste it before but when i write the name of the alias from chat main windows its working so may i need something to be identified in the dialog ?

sameh84 #194043 28/01/08 07:00 PM
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
try: var %x = 1
(note the = sign :P)

sameh84 #194046 28/01/08 07:53 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Originally Posted By: sameh84
i made sidebar dialog and made icon for that code in the sidebar and when i join the room i click the icon and when i press show doesnt show that even the code as i paste it before but when i write the name of the alias from chat main windows its working so may i need something to be identified in the dialog ?


Aha, what does $active return in the dialog?

LostShadow #194047 28/01/08 07:54 PM
Joined: Aug 2007
Posts: 25
S
sameh84 Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2007
Posts: 25
it should return for the channel or i should set it in different way ?

sameh84 #194048 28/01/08 08:00 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
if the channel isnt active (your dialog is) then it surely wont be $active.

In any case though, "var %x = 1" needs to be fixed as was mentioned


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
argv0 #194050 28/01/08 08:06 PM
Joined: Aug 2007
Posts: 25
S
sameh84 Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2007
Posts: 25
the sclick in the dialog is

Code:
  if (%D == 14) { ShowNicks }


and the code as i pasted it and the var has been edited to %x = 1

and i already joined the channel but still couldnt show it, the dialog is load before joining any channel and nothing in the sidebar is changing after joining is only containing icons as shortcut for other dialogs and when i press the icon couldt identify the alias

sameh84 #194052 28/01/08 08:14 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Originally Posted By: LostShadow
Aha, what does $active return in the dialog?


Originally Posted By: sameh84
it should return for the channel or i should set it in different way ?


Was I asking a hypothetical question?

Originally Posted By: sameh84
and i already joined the channel but still couldnt show it, the dialog is load before joining any channel and nothing in the sidebar is changing after joining is only containing icons as shortcut for other dialogs and when i press the icon couldt identify the alias blah blah blah blah


I sort of asked a yes/no question. Heh.

-Neal.

sameh84 #194054 28/01/08 08:45 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
there is no $active from dialogs, use $lactive to get the *last* active window, and hope that its the channel in question


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
argv0 #194056 28/01/08 08:52 PM
Joined: Aug 2007
Posts: 25
S
sameh84 Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2007
Posts: 25
doesnt work 2 here is a dialog may help little

Code:
dialog sidebar {
  title "New Project"
  size 1 1 93 340
  option dbu
  list 1, 1 1 90 232, size
  button "Join Selected Room", 12, 9 281 74 8, flat
  box "Additions", 2, 3 234 88 80
  list 3, 6 252 81 27, size
  text " Recently Rooms :", 4, 9 243 53 8
  button "Clear", 9, 9 291 35 8, flat
  button "Access list", 10, 47 291 36 8, flat
  check "rec. conv.", 11, 8 302 33 9
  button "show conv", 13, 47 302 35 8, flat
}

on *:dialog:sidebar*:init:*:{
  dll $mdx SetMircVersion $version
  dll $mdx MarkDialog $dname
  dll $mdx SetControlMDX $dname 1 listview icon single noheader flatsb > DLLs\views.mdx
  dll $mdx SetBorderStyle $dname 1 windowedge clientedge
  if ($group(#convrecorder) == off) did -u $Dname 11
  dll $mdx SetDialog $dname bgcolor $rgb(54,100,139)
  did -i $dname 1 1 seticon list 0 Icons\info.ico
  did -i $dname 1 1 seticon list 0 Icons\main.Ico
  did -i $dname 1 1 seticon list 0 Icons\look.Ico
  did -i $dname 1 1 seticon list 0 Icons\prot.Ico
  did -i $dname 1 1 seticon list 0 Icons\joiner.Ico
  did -i $dname 1 1 seticon list 0 Icons\profile.Ico
  did -i $dname 1 1 seticon list 0 Icons\Decoder.Ico
  did -i $dname 1 1 seticon list 0 Icons\level.Ico
  did -i $dname 1 1 seticon list 0 Icons\mp3.Ico
  did -i $dname 1 1 seticon list 0 Icons\conf.Ico
  did -i $dname 1 1 seticon list 0 Icons\advert.Ico
  did -i $dname 1 1 seticon list 0 Icons\cursor.Ico
  did -i $dname 1 1 seticon list 0 Icons\Folder.Ico
  did -i $dname 1 1 seticon list 0 Icons\restart.Ico
  did -i $dname 1 1 seticon list 0 Icons\shutdown.Ico
  did -a $dname 1 0 1 $chr(149) Help And Informations
  did -a $dname 1 0 2 $chr(149) Main Setting
  did -a $dname 1 0 3 $chr(149) LookUp Connection
  did -a $dname 1 0 4 $chr(149) Protections
  did -a $dname 1 0 5 $chr(149) Mass Rooms Joiner
  did -a $dname 1 0 6 $chr(149) Profile Manager
  did -a $dname 1 0 7 $chr(149) Decoder / Encoder
  did -a $dname 1 0 8 $chr(149) Levels System
  did -a $dname 1 0 9 $chr(149) Mp3 Player
  did -a $dname 1 0 10 $chr(149) Quick Modes and Options
  did -a $dname 1 0 11 $chr(149) Adverting Dialog
  did -a $dname 1 0 12 $chr(149) Cursor Changer
  did -a $dname 1 0 13 $chr(149) Open Script Folder
  did -a $dname 1 0 14 $chr(149) Restart script
  did -a $dname 1 0 15 $chr(149) Close Script
  did -r $Dname 3 
  var %x 1 
  while (%x <= 10) { 
    did -a $dname 3 %scnr. [ $+ [ %x ] ]
    inc %x 
  }
  //DLL $ReBar Dock $dialog(sidebar).hwnd > left

}

sameh84 #194058 28/01/08 09:16 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
It doesnt matter how the dialog is made, it will always steal focus and therefore the $active value from your channel. Again, the best you can do is use $lactive-- but if that doesn't work, you have to use some ingenuity to figure out the topmost window.. I can't think of any way off the top of my head to do that.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard