Page 1 of 1
Favorite Files Attention
Posted: 30 Nov 2013 19:22
by Trasd
There is an option to bold Favorite Folders, is there a way I can make my Favorite Files stand out? I couldn't find anything in colors, tags, etc. This would be really useful in long, like-named lists, such as directories full of XML files where others need to be checked for content thus removing the focus from the Favorite File.
From my understanding, there is no Favorite File reference anywhere in XY for scripting and such.
Thanks!
Re: Favorite Files Attention
Posted: 01 Dec 2013 12:17
by Marco
+1
Bold filenames would totally make sense, since human eye is more sensitive to black/white patterns rather than colors: bold filenames would stand out nicely without being too eyecatchy.
Re: Favorite Files Attention
Posted: 01 Dec 2013 12:43
by admin
Forget it, too much burdon on performance, and also a lot of work to implement.
Re: Favorite Files Attention
Posted: 02 Dec 2013 14:56
by Trasd
admin wrote:Forget it, too much burdon on performance, and also a lot of work to implement.
Don, my question was "is there a way I can make my Favorite Files stand out?" I wasn't asking you to implement anything new, I would have posted in 'Wishes' if that were the case.
XY is vast and I've overlooked features in the past, I was just making sure I wasn't missing something, again.
Your answer doesn't quite correlate with my question, but from your response I think I can safely infer that the answer is no.
Re: Favorite Files Attention
Posted: 02 Dec 2013 15:51
by admin
I was rather replying to Marco who sounded a bit more "wishy" to me.
But right, there is no way to highlight favorite files automatically.
Re: Favorite Files Attention
Posted: 02 Dec 2013 16:00
by nerdweed
You may dedicate a label for Favorite Files and use this label instead of favorite Files to make them stand out.
Re: Favorite Files Attention
Posted: 02 Dec 2013 16:48
by Trasd
admin wrote:I was rather replying to Marco who sounded a bit more "wishy" to me.
But right, there is no way to highlight favorite files automatically.
Ah, OK, thanks.
nerdweed wrote:You may dedicate a label for Favorite Files and use this label instead of favorite Files to make them stand out.
Thanks for the suggestion, it's given me an idea!
As of yet, I have found no reason to write more than simple macros, either because they already exist, or because there are other solutions.
Now that I've verified that there is no way to script-matically identify a file marked as a favorite, I will try to write a macro that, when I toggle a file for favorites, will also toggle a favorites' Tag or Label (whichever works the best).
For the gurus out there (yes, you know who you are), I may be asking for help, but please don't write this for me (unless, of course, you need this functionality too; I need a good reason to learn this stuff). But, if someone knows this is not possible, please let me know now so I don't waste hours learning XY scripting (I still plan on learning it, but was waiting for a compelling reason) for a project that's not feasible.
Re: Favorite Files Attention
Posted: 31 Mar 2014 07:21
by SkyFrontier
Hope this helps.
1. run the script;
2. see your favorites glow on list;
3. running it again toggles the light off.
Tip: change the value 'FB4F04' to '000000', so to have white font on black bg.
Re: Favorite Files Attention
Posted: 31 Mar 2014 17:02
by klownboy
Hi SkyFrontier,
It worked great and that's quite a nice use of nested gettokens!

Why didn't you use "getkey" in this case? Was it because you were sick of using
setkey and
getkey from all your recent work on theme loaders.

For the heck of it, I made another version using getkey. This is my first use of while and getkey in a script...that's why I wanted to see if I could do it .
Code: Select all
$FavCount = getkey("Count", "FavFiles");
If($FavCount == "0") {status "You have no Favorite Files."; end 1==1;} // added in case the FavFiles count is "0"
$Favs = "";
$i = 1;
while ($i <= $FavCount) {
$a = getkey("Fav$i", "FavFiles");
$Favs = $Favs . $a . ";";
$i++;
}
colorfilter("$Favs>FFFFFF,FB4F04");
Thanks and by the way, how's the theme preview going?
Ken
Re: Favorite Files Attention
Posted: 31 Mar 2014 17:55
by SkyFrontier
klownboy wrote:
It worked great and that's quite a nice use of nested gettokens!

Why didn't you use "getkey" in this case? Was it because you were sick of using
setkey and
getkey from all your recent work on theme loaders.
Call me paranoid but I just don't trust counters in that way,
as I don't trust my own chosen method either (it relies on the '<crlf>[' structure, which may not be there in a unlikely layout revision, but the job had to be done, so...).
The thing that's got me really sick is that I discovered that setkey() doesn't properly work for certain keys, or if used on small amounts of keys. I'm investigating this before filling a bug report.
klownboy wrote:For the heck of it, I made another version using getkey. This is my first use of while and getkey in a script...that's why I wanted to see if I could do it .
Don't forget to set proper endings for the loops. As your scripts grow in size and complexity, you'll realize you may need to set external ends for them, too, in... nested foreach loops.
If a script causes XY to hang, that's the first cause to investigate, IMO.
klownboy wrote:Thanks and by the way, how's the theme preview going?
Our
GUI design team reported going AWOL on Javascript to get it working. I'd bet they (sic) are preparing something really big for this. The integration team (aka
me) just can't wait to put their (sic) hands on it, leaving here a little extra suggestion: a black frame around the XY mockup screen, allowing user to tweak either the BG or (who knows?) the frame's color at will without losing contrast for the mockup itself. Seems to be a good idea but may end rubbish when implemented, can't say for sure...
Re: Favorite Files Attention
Posted: 31 Mar 2014 19:09
by klownboy
Thanks Sky for the updates on theme preview and the "loop" tips. As a minimum I should at least have an "if" statement if the FavFiles count is "0" so I added it the above version.
Re: Favorite Files Attention
Posted: 31 Mar 2014 21:31
by TheQwerty
Worth noting...
Because currently the only way to retrieve the list of favorite files (or folders) is to read them directly from XYplorer.ini any changes made since the file was last saved will not be known by this script.
To ensure the list is not stale the user must either save settings before running the script or add a call to SaveSettings or #193; //File | Settings Special | Save Configuration to the beginning of the script.
Re: Favorite Files Attention
Posted: 01 Apr 2014 01:29
by klownboy
TheQwerty wrote:...the user must either save settings before running...
Thanks TheQwerty, I noticed that when testing the script afterwards but didn't go back a second time to edit it again. Personally, I don't even use "Favorites", I just wanted to try scripting a different method.

Re: Favorite Files Attention
Posted: 13 Sep 2014 16:35
by Trasd
Sorry, I was on hiatus again....
So, at least at the time of the last post (klownboy, above), what I was asking for (see my original post above) could not be done...
Has that changed (as usual, I was sidetracked and never got back to this project)? Is there now a better way?
Thanks for all the input.
Re: Favorite Files Attention
Posted: 13 Sep 2014 19:03
by bdeshi
Did you notice the script up there at the middle if this page?