Favorite Files Attention

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Trasd
Posts: 147
Joined: 19 Oct 2011 15:45

Favorite Files Attention

Post 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!
Trasd

"Any sufficiently advanced technology is indistinguishable from magic." A.C.C.

"I'll tell you this, no eternal reward will forgive us now for wasting the dawn." J. M.

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: Favorite Files Attention

Post 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.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

admin
Site Admin
Posts: 60564
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Favorite Files Attention

Post by admin »

Forget it, too much burdon on performance, and also a lot of work to implement.

Trasd
Posts: 147
Joined: 19 Oct 2011 15:45

Re: Favorite Files Attention

Post 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.
Trasd

"Any sufficiently advanced technology is indistinguishable from magic." A.C.C.

"I'll tell you this, no eternal reward will forgive us now for wasting the dawn." J. M.

admin
Site Admin
Posts: 60564
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Favorite Files Attention

Post 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.

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: Favorite Files Attention

Post by nerdweed »

You may dedicate a label for Favorite Files and use this label instead of favorite Files to make them stand out.

Trasd
Posts: 147
Joined: 19 Oct 2011 15:45

Re: Favorite Files Attention

Post 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.
Trasd

"Any sufficiently advanced technology is indistinguishable from magic." A.C.C.

"I'll tell you this, no eternal reward will forgive us now for wasting the dawn." J. M.

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Favorite Files Attention

Post 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.
Attachments
HiliteFavoritesOnList.xys
(385 Bytes) Downloaded 120 times
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Favorite Files Attention

Post by klownboy »

Hi SkyFrontier,
It worked great and that's quite a nice use of nested gettokens! :appl: 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
Last edited by klownboy on 31 Mar 2014 19:13, edited 1 time in total.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Favorite Files Attention

Post by SkyFrontier »

klownboy wrote: It worked great and that's quite a nice use of nested gettokens! :appl: 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. :wink:
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...
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Favorite Files Attention

Post 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.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Favorite Files Attention

Post 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.

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Favorite Files Attention

Post 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. :)
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

Trasd
Posts: 147
Joined: 19 Oct 2011 15:45

Re: Favorite Files Attention

Post 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.
Trasd

"Any sufficiently advanced technology is indistinguishable from magic." A.C.C.

"I'll tell you this, no eternal reward will forgive us now for wasting the dawn." J. M.

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Favorite Files Attention

Post by bdeshi »

Did you notice the script up there at the middle if this page?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply