mIRC Homepage

Hidden information in @windows

Posted By: nelgin

Hidden information in @windows - 25/05/06 04:39 PM

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
Posted By: OrionsBelt

Re: Hidden information in @windows - 25/05/06 04:41 PM

Cant you solve this using the $gettok command?
Posted By: nelgin

Re: Hidden information in @windows - 25/05/06 05:20 PM

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
Posted By: nelgin

Re: Hidden information in @windows - 25/05/06 05:42 PM

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
Posted By: DaveC

Re: Hidden information in @windows - 25/05/06 08:38 PM

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
Posted By: nelgin

Re: Hidden information in @windows - 26/05/06 12:06 AM

Thanks for the hint, I'll give that a go.
Posted By: nelgin

Re: Hidden information in @windows - 26/05/06 02:31 AM

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
Posted By: DaveC

Re: Hidden information in @windows - 26/05/06 07:07 AM

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
Posted By: nelgin

Re: Hidden information in @windows - 26/05/06 08:10 AM

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
Posted By: DaveC

Re: Hidden information in @windows - 26/05/06 08:15 AM

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
© 2020 mIRC Discussion Forums