Page 2 of 5
Re: Selection Store 0.1 (July 24, 2013)
Posted: 02 Aug 2013 04:34
by CookieMonster
Nope, I'm not getting what I drag into the selection store. I am getting an error;

Re: Selection Store 0.1 (July 24, 2013)
Posted: 02 Aug 2013 12:09
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.
Re: Selection Store 0.1 (July 24, 2013)
Posted: 02 Aug 2013 12:22
by admin
The string passed to load should be quoted else you get "0 \ 0" overflow if there is a space in the path.
Re: Selection Store 0.1 (July 24, 2013)
Posted: 02 Aug 2013 20:47
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.
Re: Selection Store 0.1 (July 24, 2013)
Posted: 02 Aug 2013 20:49
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
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.
Re: Selection Store 0.1 (July 24, 2013)
Posted: 02 Aug 2013 23:13
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
Re: Selection Store 0.1 (July 24, 2013)
Posted: 03 Aug 2013 00:23
by Enternal
Yeah it works!

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!
Re: Selection Store 0.1 (July 24, 2013)
Posted: 03 Nov 2013 04:23
by yusef88
is it possible to modify the script to assign "Add to Store #1" with a keyboard shortcut
Re: Selection Store 0.1 (July 24, 2013)
Posted: 03 Nov 2013 09:44
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";
Re: Selection Store 0.1 (July 24, 2013)
Posted: 03 Nov 2013 10:24
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.
Re: Selection Store 0.1 (July 24, 2013)
Posted: 03 Nov 2013 11:46
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
Re: Selection Store 0.1 (July 24, 2013)
Posted: 04 Nov 2013 00:12
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_150818.png
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.
Re: Selection Store 0.1 (July 24, 2013)
Posted: 04 Nov 2013 01:02
by yusef88
Enternal, thank you for this kindness

---

Re: Selection Store 0.1 (July 24, 2013)
Posted: 05 Nov 2013 09:39
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

Re: Selection Store 0.1 (July 24, 2013)
Posted: 05 Nov 2013 09:51
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.