mIRC Home    About    Download    Register    News    Help

Print Thread
#36962 18/07/03 06:44 AM
Joined: Jan 2003
Posts: 127
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Jan 2003
Posts: 127
I make a dialog which have a lot of checkboxes options. My qs is will using set %state $did($did).state be better or using writeini to store the state and then later retrieve from $readini store in the corresponding file.

As all set %VARIABLE is store inside remote.ini, will it be slower as the variable get more and more

#36963 18/07/03 08:18 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
In the past it's happened that for some reason I still haven't figured out my variables got wiped. So I actually use a combination of both. On some scripts, I will store settings in variables until I quit mirc, then I write them to file, and on other scripts I'll write them to file when the dialog closes. The sooner you write em to file, the less chance there is of something happening to them. Although in the end the chance is very smll.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#36964 18/07/03 09:37 AM
Joined: Jan 2003
Posts: 127
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Jan 2003
Posts: 127
Variable store using 'var' will be removed once the script end or unset.

Whereas variable store using 'set' will only be removed when it is unset or use with -uN switch

#36965 18/07/03 10:13 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
I know this. what I am saying is that he wouldn't be the first one to discover his variables created with /set were wiped after mirc crashed...


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#36966 18/07/03 10:19 AM
Joined: Jan 2003
Posts: 127
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Jan 2003
Posts: 127
but you didnt answer my qs!

#36967 18/07/03 10:31 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I use variables with no trouble at all. But the best way is to use what you know best. If you are gunna set a variable then store it in an ini file when closing then you may as well be using hash tables because they are fastereven if the amount of data is small.

#36968 18/07/03 10:37 AM
Joined: Jan 2003
Posts: 127
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Jan 2003
Posts: 127
I still do not really know how to use hash table!

#36969 18/07/03 10:42 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
They can be a bit confusing at first, but like anything practice makes perfect. grin

#36970 18/07/03 11:36 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
with the exception of picwins frown


new username: tidy_trax

Link Copied to Clipboard