mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2003
Posts: 143
D
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. }
Joined: Dec 2002
Posts: 295
S
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
Joined: Oct 2003
Posts: 143
D
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. }
Joined: Jun 2003
Posts: 68
D
Babel fish
Offline
Babel fish
D
Joined: Jun 2003
Posts: 68
lolz i asked it ages ago to for mp3 script :tongue:

Joined: Oct 2003
Posts: 143
D
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. }
Joined: Dec 2002
Posts: 295
S
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
Joined: Oct 2003
Posts: 143
D
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. }
Joined: Dec 2002
Posts: 1,321
H
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
Joined: Aug 2003
Posts: 325
W
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.

Joined: Oct 2003
Posts: 143
D
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. }
Joined: Oct 2003
Posts: 143
D
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. }
Joined: Dec 2002
Posts: 1,321
H
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
Joined: Oct 2003
Posts: 143
D
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. }

Link Copied to Clipboard