mIRC Home    About    Download    Register    News    Help

Print Thread
#192558 04/01/08 06:46 PM
Joined: Sep 2006
Posts: 35
C
chump Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Sep 2006
Posts: 35
hi ive designed a dialog box my question is how do i use that info from the input from the dialog box such as setchan>>#test to work with a variable like ontxt %setchan so that its using the info from the dialog and also somthing like stripcode>>$strip($remove($3,[,])))
so that it displays the stripped text etc..thx in advance peeps smile


btw i know the on text isnt correct its just a quick example of what i am trying to accheive smile

chump #192560 04/01/08 08:43 PM
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Originally Posted By: Chump
hi ive designed a dialog box my question is how do i use that info from the input from the dialog box such as setchan>>#test to work with a variable like ontxt %setchan so that its using the info from the dialog
I'm not sure what you mean but if it's $input or $?="" $! refer to the text...

Be more precise about the $strip part, i'm unable to understand what you want


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #192561 04/01/08 09:25 PM
Joined: Sep 2006
Posts: 35
C
chump Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Sep 2006
Posts: 35
ok ive made a dialog box..contains 3 entrys
prebot- me
sitechan- #mirc
stripcode- $strip($remove($4,[,]))

the me ,#mirc,and strip is an input

so what i am trying to do is

on *:text:*OK*:%sitechan: {
if (($nick == %prebot))

and the strip codes strip a line picked up by *ok* etc

giving 3.10.To.Yuma.DVDR-Replica for example

i ahve all this working on my script if i edit it manually..i made the dialog so id be able to edit via menu dialog etc


hope this makes a bit more sense

chump #192562 04/01/08 10:08 PM
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Ok i see what you want, you have to use $did but paste your dialog here would be better, See /help on dialog, /help $devent (edit) :
Code:
on *:dialog:dialog_name:edit:*:Set $addtok($+(%,$token(prebot.sitechan.stripcode,$did,46)),$did($did),$token(32.44.32,$did,46))
;prebot have to be id 1, sitechan id 2 and stripcode id 3 
and then use :
Code:
on *:text:*:$(%sitechan):{
var %f = $findtok(%sitechan,$chan,32)
if ($nick == $token(%prebot,%f,32)) {
echo -a > $($token(%stripcode,%f,32),2)
do what you want
 }
}


I haven't tested, but it's better than set a variable for each case.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #192577 05/01/08 02:34 PM
Joined: Sep 2006
Posts: 35
C
chump Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Sep 2006
Posts: 35
ok heres the code it self

menu channel,query,status {
PFTP
.Enable : { set %pftp on } { .echo 3PFTP-AUTO ON }
.Disable : { set %pftp off } { .echo 3PFTP-AUTO OFF }
.config : { /open_config }
}
dialog CONFIG {
title "CONFIG"
size -1 -1 116 35
option dbu
text "STRIPCODE", 1, 1 24 133 8
text "PREBOT", 2, 1 4 133 7
text "SITECHAN", 3, 1 14 133 8
edit "", 4, 30 22 80 10
edit "", 5, 30 12 80 10
edit "", 6, 30 2 80 10
}
on *:dialog:config:edit:*:{
if ( $did == 4 ) {
if ( $did($dname,$did) == $null ) { unset %stripcode | halt }
if ( $did($dname,$did) != $null ) { set %stripcode $did($dname,$did) | halt }
}
if ( $did == 5 ) {
if ( $did($dname,$did) == $null ) { unset %prebot | halt }
if ( $did($dname,$did) != $null ) { set %prebot $did($dname,$did) | halt }
}
if ( $did == 6 ) {
if ( $did($dname,$did) == $null ) { unset %sitechan | halt }
if ( $did($dname,$did) != $null ) { set %sitechan $did($dname,$did) | halt }
}
}
alias open_config {
dialog -mdo config config
if ( %prebot != $null ) { did -a config 5 %prebot }
if ( %sitechan != $null ) { did -a config 6 %sitechan }
if ( %stripcode != $null ) { did -a config 4 %stripcode }
}
on *:text:*OK*:%sitechan: {
if (($nick == %prebot)) {
var %section = $strip($remove($3,[,]))
if (*/* iswm $1-) { goto end }
if ($istok(%section,APPS,32) == $true) { goto APPS }
if ($istok(%section,DVDR,32) == $true) { goto DVDR }
if ($istok(%section,XVID,32) == $true) { goto XVID }
if ($istok(%section,XXX:,32) == $true) { goto XXX }
if ($istok(%section,XBOX360,32) == $true) { goto XBOX360 }
if ($istok(%section,Wii,32) == $true) { goto Wii }
if ($istok(%section,PS2,32) == $true) { goto PS2 }
if ($istok(%section,PS3,32) == $true) { goto PS3 }
if ($istok(%section,GAMES,32) == $true) { goto GAMES }
if ($istok(%section,PSP,32) == $true) { goto PSP }
if ($istok(%section,TV-XVID,32) == $true) { goto TV-XVID }
if ($istok(%section,VCD,32) == $true) { goto VCD }
else { goto end }


:XXX
if (-Pr0nStarS isin $1-) { goto Pr0nStarS }
else { goto end }

:Pr0nStarS
sockudp -t pftp ip port password WHORE xxx site1,site2 %stripcode
.window -z @Pr0nStarS
.aline @Pr0nStarS $timestamp 4(0Pr0nStarS4) - 8 %stripcode
:end
}
}


Link Copied to Clipboard