Page 1 of 1

Load script into memory

Posted: 20 Sep 2014 03:57
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

Re: Load script into memory

Posted: 20 Sep 2014 09:11
by highend
Put them into a permanent variable. But it won't stop the loading time for the icons.

Re: Load script into memory

Posted: 20 Sep 2014 14:19
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.

Re: Load script into memory

Posted: 20 Sep 2014 15:32
by bdeshi
They're located in the parent of xypath:

Code: Select all

<xypath>\..\
:wink:
(ed)

Re: Load script into memory

Posted: 20 Sep 2014 17:19
by klownboy
Oops sorry Sammay I didn't notice the double dots for parent. :whistle: