Snippets?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Snippets?

Post by highend »

From the roadmap...

How exactly will these look like?
One of my scripts helped you out? Please donate via Paypal

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

Re: Snippets?

Post by admin »

I barely remember. This thing is on the roadmap for 10 years or so. :mrgreen:

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Snippets?

Post by TheQwerty »

They are simple plain text representations of certain user configurations.

The first usage came from right-clicking the Clear button in a CTB's Edit User Button dialog, and looks like this:

Code: Select all

Snip: CTB 1
  XYplorer <xyver>, <date>
Action
  NewUserButton
Name
  <name>
Icon
  <icon>
ScriptL
  <left_script>
ScriptR
  <right_script>
FireClick
  <fire_on_mousedown>
Custom Columns also support them:

Code: Select all

Snip: CustomColumn 1
  XYplorer <xyver>, <date>
Action
  ConfigureColumn
Caption
  <caption>
Type
  <type_index>>
Definition
  <property_template_or_script>
Format
  <format_index>
Trigger
  <trigger_index>
Item Type
  <item_type_index>
Item Filter
  <item_filter>
I believe these are the only two actions currently supported.


My guess is they'll take the form:

Code: Select all

Snip: <snip_category> <snip_version>
  XYplorer <xyver>, <date>
Action
  <snip_config>
<key>
  <value>
...
But maybe Don has better terminology for the category and config fields.

Another way to look at them is as a shortcut to filling out configuration dialogs - with <snip_config> being the key to the specific dialog, and <snip_category> tying it to a specific feature.


I do find it odd that they use this format instead of standard INI, which would be easier to work with in scripts, but this format is friendlier to read without all that syntactic sugar.

Post Reply