mIRC Home    About    Download    Register    News    Help

Print Thread
Hidden information in @windows #149917 25/05/06 04:39 PM
Joined: May 2006
Posts: 17
N
nelgin Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: May 2006
Posts: 17
Someone will probably point out this is already possible but here goes.

I would like to present a list of files in an @window, mp3 files specifically in this case, without the path for easy sorting.

However I still need to retain the full path somehow so if the file is selected it can be played.

I'd like to see an addition to the /aline command that'll allow me to add "hidden" text.

For example, I might have

"Genesis - Invisible Touch.mp3" showing in the window, but I dclick (or right click and selection from a popup) would need to return

M:\Artists\Genesis\Invisible Touch\Genesis - Invisible Touch.mp3

Not sure exactly how it'd be implimented or how to get back what is hidden rather than what is in the @window. smile

Regards
Nigel / Nelgin

Re: Hidden information in @windows #149918 25/05/06 04:41 PM
Joined: Apr 2006
Posts: 464
O
OrionsBelt Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Cant you solve this using the $gettok command?

Re: Hidden information in @windows #149919 25/05/06 05:20 PM
Joined: May 2006
Posts: 17
N
nelgin Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: May 2006
Posts: 17
Not really since I'll be removing the path once it gets added to the @window with no way to recover it.

I considered using a hash but that wont work because it's possible to have the same version of two songs with the same name...oddly. With 12,500 files in my mp3 list, I'm going to get some duplicates of the same song with different mixes.

Then again I could use the line number reference, but it's still a long way around smile

Regards
Nigel / Nelgin

Re: Hidden information in @windows #149920 25/05/06 05:42 PM
Joined: May 2006
Posts: 17
N
nelgin Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: May 2006
Posts: 17
On second thoughs a hash won't work for me either. If I add a hash using the line number of the @window, then as soon as the data is sorted in the @window, the hash reference is invalid.

Again, I can't use a filename because of duplicates. I guess spaces in filenames would be a problem within the hash item reference. *ponder*.

Regards
Nigel / Nelgin

Re: Hidden information in @windows #149921 25/05/06 08:38 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
are u using a @window using listbox, if so you can push off the screen to the right, setting the tab stops can do this.
//window -c @example | window -el -t9999 @example | aline @example $+(info1,$chr(9),info2)

another option is to hide the data under the displaying text, this however takes a bit of mucking around and isnt always what you want
//window -c @example | window -el -t1 @text | aline @text $+(          info2,$chr(9),info1)

* different fonts seem to effect the tab stop distances differently, on my default font u only need one space to push info1 under the tab1, but i placed 10 spaces in there as some fonts make tab1 move like 8 characters across the screen

Re: Hidden information in @windows #149922 26/05/06 12:06 AM
Joined: May 2006
Posts: 17
N
nelgin Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: May 2006
Posts: 17
Thanks for the hint, I'll give that a go.

Re: Hidden information in @windows #149923 26/05/06 02:31 AM
Joined: May 2006
Posts: 17
N
nelgin Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: May 2006
Posts: 17
Using the tab method worked a treat. I was able to use the $mid function to get the bits that I needed rather easily given that the tab character is unique within each line. Thanks for the tip.

Regards
Nigel / Nelgin

Re: Hidden information in @windows #149924 26/05/06 07:07 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
np , i use the same thing for some of my windows, i use a hidden field at the begining (just a numeric value but its a calculated value based on other things in the line), that is tabhidden by the next field, i use this to sort the lines, by fieldone then fieldtwo. (field 2 is nick) so that gets a list in value weighted order, with sub sorting of save values based on nick.

Anyway i digress, i replied to suggest you use $gettok to get the correct tab seperated field

$gettok($line(@window,N),1,9) => first field (tab seperated) on line N
$gettok($line(@window,N),2,9) => second field (tab seperated) on line N
etc etc

Re: Hidden information in @windows #149925 26/05/06 08:10 AM
Joined: May 2006
Posts: 17
N
nelgin Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: May 2006
Posts: 17
Actually, this isn't an ideal solution. Now if I want to search for a string, then it looks on both sides of the tab, right? That's not what I'd like to achive, obviously, so having hidden data is still a plus.

Regards
Nigel / Nelgin

Re: Hidden information in @windows #149926 26/05/06 08:15 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Searching should no be any different than normal

Assuming your visable data is first and your hidden data is second, then u just need to change *searchtext* to $+(*searchtext*,$chr(9),*)

This well block any mathcing in the second tabbed field, becuase it must find a TAB following the searched for string, which cant occur if its located in the second field