mIRC Home    About    Download    Register    News    Help

Print Thread
#15987 18/03/03 09:02 PM
Joined: Dec 2002
Posts: 174
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Dec 2002
Posts: 174
on *:dialog:startpref.d:init:0: {
dll $mdx SetMircVersion $version
dll $mdx MarkDialog $dname
dll $mdx SetDialog $dname bgcolor $rgb(144,238,144)
dll $mdx SetColor $dname 3,9 background $rgb(144,238,144)
.did -a startpref.d 10 $hget(scriptpref2003,editedstats)
if ($hget,scriptpref2003 == autoop) && (autoop == on) { did -c startpref.d 5 }
}

the last part the if ($hget,scriptpref2003 == autoop) && (autoop == on) { did -c startpref.d 5 }

i cant get the button to stay pressed.


anyone see the problem?

Last edited by PHMinistries; 18/03/03 09:08 PM.
#15988 18/03/03 11:38 PM
Joined: Dec 2002
Posts: 174
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Dec 2002
Posts: 174
this is the rest of the code for it might make more sense but
any ways

dialog startpref.d {
title ".:.:Starting PHM Script Preferences:.:."
size -1 -1 200 100
option dbu
icon $mircdir\graphics\icon.ico
button "Next",1, 100 80 60 15,flat
button "Back",2, 40 80 60 15,flat
text "What Church Do You Attend",3,10 5 80 10
edit "",4,80 5 80 12,autohs,center
check "Enaable Auto Op",5,20 20 60 12,push
check "Enable Announce Opers",6,90 20 65 12,push
check "Enable Auto Joins",7,20 35 65 12,push
check "Enable !Stats",8, 90 35 40 12,push
text "!Stats",9, 20 50 40 10
edit "",10,40 50 150 12,autohs,center
}
on *:dialog:startpref.d:edit:10:{ hadd scriptpref2003 editedstats $did($dname,10) | hsave -o scriptpref2003 scriptpref2003.txt }
on *:dialog:startpref.d:edit:4:{ hadd scriptpref2003 church $did($dname,4) | hsave -o scriptpref2003 scriptpref2003.txt }

on *:dialog:startpref.d:sclick:5:{
if ($did(startpref.d,5).state == 1) { hadd scriptpref2003 autoop on | hsave -o scriptpref2003 scriptpref2003.txt }
else { hadd scriptpref2003 autoop off | hsave -o scriptpref2003 scriptpref2003.txt }
}
on *:dialog:startpref.d:sclick:6:{
if ($did(startpref.d,6).state == 1) { hadd scriptpref2003 announceoper on | hsave -o scriptpref2003 scriptpref2003.txt }
else { hadd scriptpref2003 announceoper off | hsave -o scriptpref2003 scriptpref2003.txt }
}
on *:dialog:startpref.d:sclick:7:{
if ($did(startpref.d,7).state == 1) { hadd scriptpref2003 autojoin on | hsave -o scriptpref2003 scriptpref2003.txt }
else { hadd scriptpref2003 autojoin off | hsave -o scriptpref2003 scriptpref2003.txt }
}
on *:dialog:startpref.d:sclick:8:{
if ($did(startpref.d,8).state == 1) { hadd scriptpref2003 !stats on | hsave -o scriptpref2003 scriptpref2003.txt }
else { hadd scriptpref2003 !stats off | hsave -o scriptpref2003 scriptpref2003.txt }
}
on *:dialog:startpref.d:init:0: {
if ($hget,scriptpref2003 == autoop) && (autoop == on) { .did -c startpref.d 5 }
dll $mdx SetMircVersion $version
dll $mdx MarkDialog $dname
dll $mdx SetDialog $dname bgcolor $rgb(144,238,144)
dll $mdx SetColor $dname 3,9 background $rgb(144,238,144)
.did -a startpref.d 10 $hget(scriptpref2003,editedstats)
.did -a startpref.d 4 $hget(scriptpref2003,church)

}

i hpe this helps

#15989 18/03/03 11:59 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
You're using incorrect syntax for $hget()
$hget(table,item)
Code:
if ($hget(scriptpref2003,autoop)  == on) { did -c startpref.d 5 }


#15990 19/03/03 12:02 AM
Joined: Dec 2002
Posts: 174
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Dec 2002
Posts: 174
Thank you
i couldnt figure out what i was doing


Link Copied to Clipboard