Selection Store 1.0.1 (March 27, 2014)

Discuss and share scripts and script files...
CookieMonster

Re: Selection Store 0.1 (July 24, 2013)

Post by CookieMonster »

Nope, I'm not getting what I drag into the selection store. I am getting an error;

Image

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: Selection Store 0.1 (July 24, 2013)

Post by Enternal »

Aaargh this is crazy. I don't even know exactly why it's breaking. For some reason, it's not loading the name and location of the script correctly at all. Can you try moving your Data folder to your Desktop as well as your XYplorer.exe to the Desktop as well and run it from there. Then try to load the script from there again and see if it works. Otherwise, I don't know what else I could do. Sorry for all the trouble.

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

Re: Selection Store 0.1 (July 24, 2013)

Post by admin »

The string passed to load should be quoted else you get "0 \ 0" overflow if there is a space in the path.

CookieMonster

Re: Selection Store 0.1 (July 24, 2013)

Post by CookieMonster »

admin wrote:The string passed to load should be quoted else you get "0 \ 0" overflow if there is a space in the path.
You directly speaking to me or Enternal ?

Enternal - I tried what you suggested, nothing different, same issue.

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: Selection Store 0.1 (July 24, 2013)

Post by Enternal »

He was talking to you. In that error window, the command was load /path/to/script. He said you should instead put load "path/to/script". That should prevent any issues with space in that path from causing errors. However I know your path should not have spaces.

EDIT: Also, try this script now. I think I might have found the problem.
SelectionStore.xys
Very Very Minor Edit.
(11.98 KiB) Downloaded 202 times
EDIT2: BEFORE you try the script above, do what Don suggested first.
Instead of using:
::load C:\Users\*****\AppData\Roaming\XYplorer\Scripts\SelectionStore.xys
Use:
::load "<xyscripts>\SelectionStore.xys"
Notice the quotations.
Also, try:
::load "C:\Users\*****\AppData\Roaming\XYplorer\Scripts\SelectionStore.xys"
Same thing as your original but again, notice the quotations.
Last edited by Enternal on 03 Aug 2013 00:24, edited 1 time in total.

CookieMonster

Re: Selection Store 0.1 (July 24, 2013)

Post by CookieMonster »

Instead of using your latest script, I decided to quote the path of the script from your post made on July 31-2013, and it works :)
Would you still prefer I use your latest modified script, or stick with the one I'm presently using ?

Quote your path ! :) Tip

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: Selection Store 0.1 (July 24, 2013)

Post by Enternal »

Yeah it works! :biggrin:
You can just stick with the one you currently have since the change is pretty insignificant. Anyway, glad that it totally work now for you!
Haha, I learned about quoting the hard way. The first couple scripts I wrote totally drained me because of it. Anyway thanks!

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: Selection Store 0.1 (July 24, 2013)

Post by yusef88 »

is it possible to modify the script to assign "Add to Store #1" with a keyboard shortcut

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: Selection Store 0.1 (July 24, 2013)

Post by yusef88 »

i made a new command with that part

Code: Select all

"_Add"
	End ("<selitems>"==""),"Nothing Is Selected!";
	$localCountItems = Get("CountSelected");
	If $P_SStoreNum == 1 {
		$P_SStore1 = "$P_SStore1"."|".Get("SelectedItemsPathNames","|");
		$P_SStore1 = FormatList("$P_SStore1","ned"); }
	If $P_SStoreNum == 2 {
		$P_SStore2 = "$P_SStore2"."|".Get("SelectedItemsPathNames","|");
		$P_SStore2 = FormatList("$P_SStore2","ned"); }
	Status "$localCountItems Item(s) Added to Selection Store #$P_SStoreNum.",,"ready";

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: Selection Store 0.1 (July 24, 2013)

Post by Enternal »

The way the script is written, it won't work well. However, if you take it apart like you did and use it in the User-Defined Commands, then it will work. However, make sure you have:

Code: Select all

	Perm $P_SStore1;
	Perm $P_SStore2;
	Perm $P_SStoreNum;
	If $P_SStoreNum == "" {$P_SStoreNum = 1;}
Because this is used to setup the script before any other commands can be used.

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: Selection Store 0.1 (July 24, 2013)

Post by yusef88 »

Code: Select all

	Perm $P_SStore1;
	Perm $P_SStore2;
	Perm $P_SStoreNum;
	If $P_SStoreNum == "" {$P_SStoreNum = 1;}
very thanks for replay
Where exactly are these values should be added?
what i do for first use i press activate store 1 then useing command and it works for me

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: Selection Store 0.1 (July 24, 2013)

Post by Enternal »

yusef88 wrote:

Code: Select all

	Perm $P_SStore1;
	Perm $P_SStore2;
	Perm $P_SStoreNum;
	If $P_SStoreNum == "" {$P_SStoreNum = 1;}
very thanks for replay
Where exactly are these values should be added?
what i do for first use i press activate store 1 then useing command and it works for me
Ah. I just realized that you're using it together with the script as a Custom User Button or Catalog item right? If that's the case, then the permanent variables that are used are already set which is why it's working for you. The code that I asked you to use i needed if you using the script fresh, meaning the script has not been run before so those permanent variables that are required by the script are not set.

Just in case, you should just add the code to the beginning of the script. Basically:

Code: Select all

   Perm $P_SStore1;
   Perm $P_SStore2;
   Perm $P_SStoreNum;
   //"_Add"
   If $P_SStoreNum == "" {$P_SStoreNum = 1;}
   End ("<selitems>"==""),"Nothing Is Selected!";
   $localCountItems = Get("CountSelected");
   If $P_SStoreNum == 1 {
      $P_SStore1 = "$P_SStore1"."|".Get("SelectedItemsPathNames","|");
      $P_SStore1 = FormatList("$P_SStore1","ned"); }
   If $P_SStoreNum == 2 {
      $P_SStore2 = "$P_SStore2"."|".Get("SelectedItemsPathNames","|");
      $P_SStore2 = FormatList("$P_SStore2","ned"); }
   Status "$localCountItems Item(s) Added to Selection Store #$P_SStoreNum.",,"ready";
Just as a guide, you noticed that in the code there are labels "_Add", "_Remove", "_Edit", and etc. Those are known as labels and if you're using User-Defined Commands, you can use them like this:
2013-11-03_150742.png
2013-11-03_150742.png (63.56 KiB) Viewed 3781 times
2013-11-03_150818.png
2013-11-03_150818.png (66.87 KiB) Viewed 3781 times
Of course that's just an example. You should not really use the SelectionStore.xys like this because of the _Initialize function I used for the code which is required. But at lest this example gives you more of an idea of how to easily use User-Defined Commands for other scripts if they have labels.

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: Selection Store 0.1 (July 24, 2013)

Post by yusef88 »

Enternal, thank you for this kindness :appl:

Image
---
Image

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: Selection Store 0.1 (July 24, 2013)

Post by yusef88 »

why when putting SelectionStore as right click of customized button the menu does not appear directly, while when loading other scripts they load directly..why must to click twice until the menu appears

Image

Image

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: Selection Store 0.1 (July 24, 2013)

Post by Enternal »

It is written that way on purpose by Don. The Right Click on User Custom Buttons will always pop out a menu first. There was several good reason for that but... I can't think right now lol.

Post Reply