Page 3 of 3

Re: snippet lab

Posted: 16 Jan 2012 17:05
by Stefan
admin wrote:
eil wrote: or there is some way to direct it where to get script?
something like:
Code:

Code: Select all

ScriptL
  load <xydata>\scripts\my_sc.xys
Nope, not posssible.
Not possible to use Load() in an snippet?
I mean it is:

Code: Select all

Snip: CTB 1
  XYplorer 10.70.0200, 16.01.2012 16:57:34
Action
  NewUserButton
Name
  Archiver stuff
Icon
  <xypath>\Tools\ICONS\ZiP2.ico
ScriptL
  Load "..\Tools\Packer\Packer"
ScriptR
  Load 7zip;
FireClick
  0
@eil
please note that Load() looks first in "<xydata>\scripts\" so you don't have to use that as path.
Also you must not use the extension ".xys"!
So simple use "load my_sc".

Re: snippet lab

Posted: 16 Jan 2012 17:53
by admin
Stefan wrote:Not possible to use Load() in an snippet?
Of course you can. But you cannot dynamically generate user button contents using snippet plus load().

Re: snippet lab

Posted: 17 Jan 2012 14:50
by Borut
Hey people, I am quite late to this topic, but find it extremely interesting. What a potentially easy way to describe a user button to someone interested: a snippet file and (possibly) a script file! So I have to ask:

Why is this still unofficial?

Why is "Copy Snippet" still concealed on the User Button Editor?

Why is "Paste Snippet" concealed and grayed out?

Why not make the whole thing official and start "User Button Exchange" (a Button Library) in the forum?

Re: snippet lab

Posted: 17 Jan 2012 15:03
by admin
Yes, it's a cool feature. :)

Yes, it's still unofficial.

"Paste Snippet" is enabled when there is a valid snippet in the clipboard.

Re: snippet lab

Posted: 04 Mar 2013 21:19
by Marco
Some questions:
1. Is the structure of the first line fixed? I mean, what can I type after "Snip: "? Is this line necessary at all?
2. Is the second line necessary? Seems no, but what could be used for?
3. In the snipper here ( http://www.xyplorer.com/xyfc/viewtopic. ... 990#p77990 ) I had to indent with three spaces, not just two (else upon click a menu with the three load's appears). Is that a bug?

Re: snippet lab

Posted: 05 Mar 2013 08:56
by admin
Marco wrote:Some questions:
1. Is the structure of the first line fixed? I mean, what can I type after "Snip: "? Is this line necessary at all?
2. Is the second line necessary? Seems no, but what could be used for?
3. In the snipper here ( http://www.xyplorer.com/xyfc/viewtopic. ... 990#p77990 ) I had to indent with three spaces, not just two (else upon click a menu with the three load's appears). Is that a bug?
1./2. The format is not all meaningful yet. Let's called it "reserved for future use".

3. No, bug but you have to indent the non-first lines for what you want:

Code: Select all

ScriptL
   load "SimpleUpdater", "_Initialize";
     load "SimpleUpdater", "Updates";
     load "SimpleUpdater", "_Terminate";