mIRC Home    About    Download    Register    News    Help

Print Thread
making .txt file show in list box #82607 10/05/04 06:39 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
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?


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: making .txt file show in list box #82608 10/05/04 06:49 PM
Joined: Dec 2002
Posts: 295
S
shadowdemon Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 295
Hi, try this

link Click Here for an example

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

ShadowDemon


Never argue with an idiot...they'll drag you down to their level and beat you up with experience
Re: making .txt file show in list box #82609 10/05/04 07:18 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
cool ill try it thanks.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: making .txt file show in list box #82610 10/05/04 07:30 PM
Joined: Jun 2003
Posts: 68
D
Dr4g0n Offline
Babel fish
Offline
Babel fish
D
Joined: Jun 2003
Posts: 68
lolz i asked it ages ago to for mp3 script :tongue:

Re: making .txt file show in list box #82611 10/05/04 07:36 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
never noticed


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: making .txt file show in list box #82612 10/05/04 07:54 PM
Joined: Dec 2002
Posts: 295
S
shadowdemon Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 295
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


Never argue with an idiot...they'll drag you down to their level and beat you up with experience
Re: making .txt file show in list box #82613 10/05/04 11:57 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
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.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: making .txt file show in list box #82614 11/05/04 02:31 AM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Assuming ID 1 is your listbox and 4 is your Delete button:

if $did == 4 { did -d $dname 1 $$did(1,1).sel }


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: making .txt file show in list box #82615 11/05/04 02:49 AM
Joined: Aug 2003
Posts: 325
W
Wolfie Offline
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
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.

Re: making .txt file show in list box #82616 11/05/04 07:08 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
thank you bolth Hammer im gonna try what you sead and if that dosent work ill go with what Wolfie sead.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: making .txt file show in list box #82617 12/05/04 12:16 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
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 (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: making .txt file show in list box #82618 12/05/04 06:33 AM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
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.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: making .txt file show in list box #82619 13/05/04 03:59 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
thanks ill try it later Im not on the pc that has my script ><;;


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }