mIRC Homepage
Posted By: DeathfireD making .txt file show in list box - 10/05/04 06:39 PM
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?
Posted By: shadowdemon Re: making .txt file show in list box - 10/05/04 06:49 PM
Hi, try this

link Click Here for an example

Lol, i asked this question ages ago grin hope it helps

ShadowDemon
Posted By: DeathfireD Re: making .txt file show in list box - 10/05/04 07:18 PM
cool ill try it thanks.
Posted By: Dr4g0n Re: making .txt file show in list box - 10/05/04 07:30 PM
lolz i asked it ages ago to for mp3 script :tongue:
Posted By: DeathfireD Re: making .txt file show in list box - 10/05/04 07:36 PM
never noticed
Posted By: shadowdemon Re: making .txt file show in list box - 10/05/04 07:54 PM
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
Posted By: DeathfireD Re: making .txt file show in list box - 10/05/04 11:57 PM
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

Code:
 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.
Posted By: Hammer Re: making .txt file show in list box - 11/05/04 02:31 AM
Assuming ID 1 is your listbox and 4 is your Delete button:

if $did == 4 { did -d $dname 1 $$did(1,1).sel }
Posted By: Wolfie Re: making .txt file show in list box - 11/05/04 02:49 AM
Time Sync

Click 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. smile It's deceptively simple, really.. I don't fully understand dialogs myself, and that was screaming at me with simplicity.
Posted By: DeathfireD Re: making .txt file show in list box - 11/05/04 07:08 PM
thank you bolth Hammer im gonna try what you sead and if that dosent work ill go with what Wolfie sead.
Posted By: DeathfireD Re: making .txt file show in list box - 12/05/04 12:16 AM
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.
Posted By: Hammer Re: making .txt file show in list box - 12/05/04 06:33 AM
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.
Posted By: DeathfireD Re: making .txt file show in list box - 13/05/04 03:59 AM
thanks ill try it later Im not on the pc that has my script ><;;
© mIRC Discussion Forums