Load script into memory

Discuss and share scripts and script files...
Post Reply
U_2582
Posts: 34
Joined: 05 Oct 2013 10:33

Load script into memory

Post by U_2582 »

I have few custom user buttons to load favorite files and folders as menus (drop down menus), some contain many entries and they are not smooth/fast to load, I think because they rebuild the menu and menu icons every time they are clicked. Is there a way to load them once on startup and keep them into memory so they are faster to load? If so, an example would be much appreciated.

They are just basic menu scripts as follows...

Code: Select all

"Notepad++|<xypath>\..\Notepad++\notepad++.exe" open "<xypath>\..\Notepad++\notepad++.exe" "<curitem>"
"CintaNotes|<xypath>\..\CintaNotes\CintaNotes.exe" open "<xypath>\..\CintaNotes\CintaNotes.exe"
"AIMP|<xypath>\..\AIMP\AIMP3.exe" open "<xypath>\..\AIMP\AIMP3.exe"
...
Danke

Btw, thanks for the 5 days 50% discount Image

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Load script into memory

Post by highend »

Put them into a permanent variable. But it won't stop the loading time for the icons.
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4397
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440

Re: Load script into memory

Post by klownboy »

I have a some XY menus and I tend to avoid using the exe file for the icon. Extract the icon for these or any program and put then in your XY icon folder, <xyicons>. There are plenty of free icon extractors like this one http://www.botproductions.com/iconview/iconview.html Or find alternative icons. Your lines can then be something similar to this...

Code: Select all

"Notepad++|<xyicons>\notepad++.ico" open "<xypath>\..\Notepad++\notepad++.exe" "<curitem>"
By the way, why are your programs listed in your example all off of <xypath> and not located in some other location, for example "D:\Tools\textpad.exe"?

A second by the way, have you tried using the Recent Files/Folders script. There are few variations in this thread http://www.xyplorer.com/xyfc/viewtopic. ... 30#p103649 which include Favorite Files and Favorite folders. You can add, delete or change the entries in Tools | List Management | Favorite Files or Favorite Folders.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Load script into memory

Post by bdeshi »

They're located in the parent of xypath:

Code: Select all

<xypath>\..\
:wink:
(ed)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

klownboy
Posts: 4397
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440

Re: Load script into memory

Post by klownboy »

Oops sorry Sammay I didn't notice the double dots for parent. :whistle:

Post Reply