hi I have a .txt file called topics and I want it to show up in a Dialog list box. How would i have it show all the lines in the text file on start up?
So like i hit Dialog "topicsnew" and it comes up with all the stuff from the txt file in the list box.any ideas?
Hi, try this
link
Click Here for an exampleLol, i asked this question ages ago
hope it helps
ShadowDemon
lolz i asked it ages ago to for mp3 script :tongue:
Hi, yeah i asked that same very question ages ago, forgot about it until u just asked it,
tbh i never saw the mp3's question but then i just got a new pc and it was off for like a month.
Glad u gonna try it, i think i asked it to goto a list box, beem ages since i actually used the script
ShadowDemon
hmmm ok that worked very well now im running into other probs like in a list box. I wanna click on one of the things from a txt file and have it say it in a chat or like change the channel topic to the thing i click. this is what i havew so far
on *:dialog:topicchanger:sclick:*:{
if $did == 3 { did -a topicchanger 1 %message | write channeltopics.txt %message }
if $did == 7 { did -r topicchanger 1
loadbuf -o topicchanger 1 channeltopics.txt }
[color:red] if $did == 1 { /topic # $1- } [/color]
if $did == 4 { }
}
I also want some way to del single lines from the text so when i click on it in the list and i hit the del button that i added to the dialog (dialog number 4) it will del that highlighted string.
Assuming ID 1 is your listbox and 4 is your Delete button:
if $did == 4 { did -d $dname 1 $$did(1,1).sel }
Time SyncClick on that link, and download that file. Now, once installed and running, right click in a window and select the help. I think what it does there is what you are looking for. Look through the source and see how they did it.
It's deceptively simple, really.. I don't fully understand dialogs myself, and that was screaming at me with simplicity.
thank you bolth Hammer im gonna try what you sead and if that dosent work ill go with what Wolfie sead.
ok what hammer sead worked but it dident delete that single line from the text file. and how would i get it so when i click on that text line it would make it my topic?
if $did == 1 { topic $chan $1- } or if $did == 1 { topic $active $1- } dosent work.
if $did == 4 { write $+(-dw,*,$did(1,1).seltext,*) filename.txt | topic $chan $did(1,1).seltext | did -d $dname 1 $$did(1,1).sel }
This assumes that you have used /dialog -a to use the active channel window as the $active window. I haven't tested it, but you might need to specify $active instead of $chan, but I think either should work.
thanks ill try it later Im not on the pc that has my script ><;;