mIRC Home    About    Download    Register    News    Help

Print Thread
#116747 08/04/05 07:33 PM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
ok, so it seems impossible for me to be able to do this, i am making a dialog for a clone scanner, simple, its set up kind of like this(cutting out a lot)
dialog NAME {
title "TITLE"
size -1 -1 blah blah
option dbu
icon icon.ico

box "Additional Clone Scan Commands:", 26, 7 135 138 27
edit "", 27, 30 143 50 10, return autohs
text "Channel:", 28, 9 145 21 10
button "Scan Now", 29, 80 143 40 10, flat
}
on *:dialog:protection:sclick:29:{ //.timer 1 0 /clonescanchannel }
alias clonescanchannel { var %clonescanchannel = $did(protection,27) | .timer 1 0 /clonescan %clonescanchannel }

====
everything i try, when i scan it says there are 0 clones, but if i use my /clonescan #channel - alias manually it works fine. but if i do it with the dialog, it messes up for some reason and says there are 0 clones. how do i fix this problem. please someone. Note: all i am wanting is to be able to put #channel into the edit box, and press the "scan now" button and for it to use my /clonescan alias and place the text i put in the edit box after /clonescan. ex. i put #blah in the edit and press scan i want it to /clonescan #blah. I have it fixed so it actually sets the text i enter as a variable and then does a /clonescan %var , and it works right but for some reason it says there are no clones even though i have one loaded in the room, and then if i type /clonescan #channel manually. it works fine. please help.

#116748 08/04/05 07:36 PM
Joined: Nov 2003
Posts: 257
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
have you tried doing a /who # on the active channel before you try the clonescan ?

#116749 08/04/05 07:37 PM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
just did and it still says 0 clones

#116750 08/04/05 07:41 PM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
even changed the code to ..
alias clonescanchannel { var %clonescanchannel = $did(protection,27) | .timer 1 0 /who %clonescanchannel | .timer 1 2 /clonescan %clonescanchannel }
- and it still didnt work. here is the code for the actual scan maybe the problem is with that but i dont see why because it works manually.

alias clonescan {
if ($1 ischan && $ial) {
var %i = $ialchan(*,$1,0) , %c = 0
while (%i) {
var %n = $ialchan($mask($ialchan(*,$1,%i),2),#,0)
if (%n > 1) {
inc %c
var %mask = $mask($ialchan(*,$1,%i),2)
inc %clone. [ $+ [ %mask ] ]
if (%clone. [ $+ [ %mask ] ] == %n) {
echo -a Clones: $gettok(%mask,2,64) ( $+ %clone. [ $+ [ %mask ] ] $+ )
}
}
dec %i
}
echo -a Total Clones Found: %c
unset %clone.*
}
elseif ($1 !ischan) { echo -a Error }
elseif ($ial == $false) { echo -a IAL is not on, type /ial on }
}

#116751 08/04/05 08:06 PM
Joined: Oct 2004
Posts: 72
C
Babel fish
Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
I think your problem is in here:
on *:dialog:protection:sclick:29:{ //.timer 1 0 /clonescanchannel }
alias clonescanchannel { var %clonescanchannel = $did(protection,27) | .timer 1 0 /clonescan %clonescanchannel }

As soon as your timer is released $did(protection,27) is not defined anymore.

I don't know why you use a timer, you could do it with:

on *:dialog:protection:sclick:29:{ /clonescan $active}

Or, if you still want to use a timer:

on *:dialog:protection:sclick:29:{ //.timer 1 0 /clonescan $active }

suc6

#116752 08/04/05 08:11 PM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
thanks for the help. i put your code in and it still doesnt work, with your code it acts like i didnt even specify a channel. my error tag echos. And i also wanted it so i could type the name of a channel in the edit box and scan that way. not the $active channel. I have no idea why $active wouldnt work either, but it acts as if i didnt specify a channel.
-
ps. thats just the way i want it i really dont mind, i will take it anyway i can get it to work, this has been driving me crazy, i have no idea why this stuff wont work, tons of people have told me all kinds of ways to fix it and they should all work but they dont, its like when its preformed in my dialog it messes it up for some reason.

Last edited by TyrantX; 08/04/05 08:13 PM.
#116753 08/04/05 08:48 PM
Joined: Oct 2004
Posts: 72
C
Babel fish
Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
Well, you should start your scanner from a channel, not from your status window. To check whether that is the case add:

if ($active ischan) {
/clonescan $active
}
else {
echo you should start the scanner from a channel
}

Maybe this was the case?

#116754 08/04/05 09:22 PM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
i had the dialog open in a channel not in status

#116755 09/04/05 02:09 AM
Joined: Oct 2004
Posts: 72
C
Babel fish
Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
You use an edit field with return. If you reference this, you reference ALL clones at once and that is too much. Instead use a list field and reference the clone with $did(protection, 27).sel
good luck!

#116756 09/04/05 07:48 AM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
I feel retarded bothering about this but here it is, i hope that SOMEONE will know what to do. Ok so after messing around with this forever this is the code i have.
;;;;;clone scan alias;;;;;;
alias clonescan {
if ($did(protection,27).text ischan && $ial) {
var %i = $ialchan(*,$did(protection,27).text,0) , %c = 0
while (%i) {
var %n = $ialchan($mask($ialchan(*,$did(protection,27).text,%i),2),#,0)
if (%n > 1) {
inc %c
var %mask = $mask($ialchan(*,$did(protection,27).text,%i),2)
inc %clone. [ $+ [ %mask ] ]
if (%clone. [ $+ [ %mask ] ] == %n) {
echo -a Clones: $gettok(%mask,2,64) ( $+ %clone. [ $+ [ %mask ] ] $+ )
}
}
dec %i
}
echo -a Total Clones Found: %c
unset %clone.*
}
elseif ($did(protection,27).text !ischan) { echo -a Error }
elseif ($ial == $false) { echo -a IAL is not on, type /ial on }
}
---
''''''''''''''''dialog(cutting out all but the important code)''''''''''''''''
dialog protection {
title "Protection"
size -1 -1 153 190
option dbu
icon cs.ico

box "Additional Clone Scan Commands:", 26, 7 135 138 27
edit "", 27, 30 143 50 10, autohs
text "Channel:", 28, 9 145 21 10
button "Scan Now", 29, 80 143 40 10, flat
}
on *:dialog:protection:sclick:29:{ //.timer 1 0 //clonescan $did(protection, 27).text }
-----------------------------
ok now for some reason no matter what i do, when i press "scan now" it works but it says 0 clones which i do not understand at all because lets say for example I opened my dialog, typed in a #channel then in an active window i typed //clonescan $did(protection, 27).text -- and guess what it worked perfect, but for some odd reason when i do it with the button it wont work, it says 0 clones when i have clones loaded. i even changed the on dialog to. do //echo ae- $did(protection, 27).text ---- and it echoed what i typed in the edit box, so i have no idea why this wont work. please someone help me out. is there something i need to do to make this alias work properly with a dialog.

Last edited by TyrantX; 09/04/05 08:15 AM.
#116757 09/04/05 10:35 AM
Joined: Oct 2004
Posts: 72
C
Babel fish
Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
Try a list box and referring to it with $did(protection, 27, $did(protection, 4).sel).text

list 27, 10 27 163 74, size hsbar vsbar sort

***EDITED***

Last edited by captain_comic; 09/04/05 11:07 AM.
Joined: Apr 2005
Posts: 1
J
Mostly harmless
Offline
Mostly harmless
J
Joined: Apr 2005
Posts: 1
Sorry about this, but I could not figure out how to start a NEW msg so am using the reply. What I'd like to know, does that trusted user list in the dcc options actually work? I've always had it on autoget but now for some reason, when I request a file from my friend it say he's not a trusted user and the file gets rejected. This has NEVER happened before/. So Iput his nick in that list in the dcc options, but it still says he not a trusted user, I have read the docs and to no avail, sure if I set it to trusted users only and the dialog pops up and I hit the accept button, it works, but I hate that and I can't be there all the time. Sometimes he sends me files to look at when I get home so if I'm not there, it won't work and it used to. I even unistalled mirc and reinstalled it but it does the same thing. What I'd like to know is, why isn't mirc reading that list or is it supposed to make this list into an ini file? I know there isn't one as I searched everywhere. I have no idea why out of the clear blue sky Mirc decide to start with that not a trusted user thing as it hasn't and I've been using mirc for some time. Any help on this will be appreciated. Thank you.

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Click the forum (Scripts And Popups, Connection Issues, etc) you want to post in and then click "post" near the top of the page.


New username: hixxy

Link Copied to Clipboard