mIRC Home    About    Download    Register    News    Help

Print Thread
#196716 22/03/08 06:39 AM
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Hello,

Id like to make an alias to fetch some data from an ini file given the section chosen from a combo drop down list box

so if I select the section ex. [DOGS] in the drop down combo box ini file, I would like to list its values in a seperate edit box

ex.) of .ini file
[DOGS]
1=intelligent animals
2=easy to take care
3=learn fast and quick

what I would like to list in the edit box is all the lines under the section [DOGS] and diplay the lines with the numbers and have them listed in a seperate edit box, Could this be done?

Thanks in advance,

- J

Joined: Mar 2008
Posts: 24
T
Ameglian cow
Offline
Ameglian cow
T
Joined: Mar 2008
Posts: 24
Yes it can be done. What part are you having troubles with?

$ini(mirc.ini,0) = 73
$ini(mirc.ini,1) = chanfolder
$ini(mirc.ini,chanfolder,0) = 38
$ini(mirc.ini,chanfolder,1) = n0
$readini(mirc.ini,n,chanfolder,n0) = #channelname

Joined: Mar 2008
Posts: 24
T
Ameglian cow
Offline
Ameglian cow
T
Joined: Mar 2008
Posts: 24
If this was your dialog entry for your dropbox(ini sections):
combo 141, 20 140 130 85, drop, hsbar, vsbar, tab 1

and the entry for your ini section contents:
list 142, 200 140 130 85, hsbar, vsbar, tab 1

selecting an entry from the dropbox 141 would populate the listbox 142 with this:

on 1:dialog:yourdialog:sclick:141: {
dir -r yourdialog 142
;loop through your ini and add the %data to the listbox
did -a yourdialog 142 %data
}

NOTE: there maybe errors in this, I havent tested it (off the top of my head)

Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
hi

you can also use /loadbuf -ot to load lines from an ini section to a dialog control. check /help /loadbuf for the exact syntax


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
im not exactly familiar with dialogs and stuff, but how would the look like?


Link Copied to Clipboard