"Virtual icons" possible in any way?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
eil
Posts: 1617
Joined: 13 Jan 2011 19:44

"Virtual icons" possible in any way?

Post by eil »

After popup-menus scripting was added i was using some simple menus with icons, basically using bold format:

Code: Select all

C:\Program\Launch.exe|C:\Program\Launch.exe|C:\Program\Launch.exe
name|location|icon
As i understand i was using everything right and only way possible when adding icons to menus.

But then one day i suddenly realised, that each time when i open say a menu of 20 items with icons = it's 20 reads from different parts of hard drive, and i didn't even do anything useful yet, or maybe even i won't select anything. Plus when such menus opened dozens times per day, and again just to open some one item from there while other files are still read each time = it results in hundreds, if not thousands, of useless I/O operations.
As a result i remade menus no have no icons, but that surely is less practical. Then i remembered how i adapted some scripts to load-store their data in variable on first run per session and next times these scripts are run there was no unnecessary reads just for menu forming.
So i wonder, if there is some way via XY to send icons into ram/variables? Or maybe there is a way to transform icons into base64 and use that stored in ram/variable, instead of real reading files?
Win 7 SP1 x64 100% 1366x768

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: "Virtual icons" possible in any way?

Post by highend »

Create a .dll from all the icons necessary and load them via their id?
One of my scripts helped you out? Please donate via Paypal

eil
Posts: 1617
Joined: 13 Jan 2011 19:44

Re: "Virtual icons" possible in any way?

Post by eil »

That will solve only moment with reading from different places, dll would still be read each time. Plus constantly updating these dlls with new icons corresponding to new items in menus would be not convenient.
Win 7 SP1 x64 100% 1366x768

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: "Virtual icons" possible in any way?

Post by highend »

Nope, Windows does file caching. It's not constantly reread.

If Don has time to implement base64 encoded icon decoding into all the necessary places... I doubt that^^
One of my scripts helped you out? Please donate via Paypal

GreetingsFromPoland
Posts: 216
Joined: 29 Sep 2022 14:20

Re: "Virtual icons" possible in any way?

Post by GreetingsFromPoland »

if that option gets added, this is a nice to use for quick encoding of files to base64 (https://jpillora.com/base64-encoder/). i use this on my php site that creates an offline file that displayes font awesome icons when no connection is available.

eil
Posts: 1617
Joined: 13 Jan 2011 19:44

Re: "Virtual icons" possible in any way?

Post by eil »

highend wrote: 24 Nov 2022 22:09 If Don has time to implement base64 encoded icon decoding into all the necessary places... I doubt that^^
Actually i was exactly planning to ask for that if no similar already present way would be found. :roll:
Though thank you for mentioning about caching dlls, need get more info how that works.
Win 7 SP1 x64 100% 1366x768

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: "Virtual icons" possible in any way?

Post by highend »

There is no need for an external website, XY can encode base64 via scripting already
One of my scripts helped you out? Please donate via Paypal

Post Reply