mIRC Home    About    Download    Register    News    Help

Print Thread
#40187 07/08/03 03:17 AM
Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
is there an easy way for mirc to remember wheather a checkbox had a check mark or not in a dialog called with /dialog -m ?

basically what i want is if a check box was marked with a check box when the dialog was last closed, then a check mark should appear when it is reopened, is there a way to do this without setting hundreds of variables.

thanks for any help


cool


keek: Scots - intr.v. keeked, keekĀ·ing, keeks
To peek; peep.
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
It is your job to remember what was checked. If you don't want to store it in variables, then use either a hash table or an ini file.

Joined: Feb 2003
Posts: 79
A
Babel fish
Offline
Babel fish
A
Joined: Feb 2003
Posts: 79
heres a sample from my script..hope u learn by seeing lol

in this case my ID is 31 and my dialog is themex8 change %timestamp to somthing easy to remember and related to ur button

on *:dialog:themex8:init:0: {
if ( %timestamp == 1 ) did -c themex8 31
}
on *:dialog:themex8:sclick:31: {
if ( %timestamp == 1 ) { /set %timestamp 0 | halt }
if ( %timestamp == 0 ) { /set %timestamp 1 | halt }
if ( %timestamp == $null ) { /set %timestamp 1 | halt }
}

ooo sorry just misread it..lol um other than this way, or hash table, i dont think u can do it...unless u put it in a text file on a line and have each line represent a setting?

Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
thanks codemastr, will start setting variables ... and now if you;; excuse me, i have to go to the eye doctor after reading ancyker's post (sorry if i got the name wrong)


keek: Scots - intr.v. keeked, keekĀ·ing, keeks
To peek; peep.
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Yeah, that yellow text does NOT look good on the beige background smile

Joined: Feb 2003
Posts: 79
A
Babel fish
Offline
Babel fish
A
Joined: Feb 2003
Posts: 79
I know, i wanted to delete it but then i thought what if he needs it for reference, so i just left it there but made it hard to see lol

Joined: Apr 2003
Posts: 426
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
You can use hash tables.

if ($did(x).state == 1) { .hadd timestamp timestamping on }
if ($did(x).state == 0) { .hadd timestamp timestamping off }


Just an example.

Note that hash tables are not permanently stored, and you will lose it once mIRC is closed.


--------
mIRC - fun for all the family (except grandma and grandpa)
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
You can save your hash tables to files with /hsave .. these files can then be reloaded the next time you run mIRC by /hmake-ing the tables again and then /hload-ing them.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard