Page 1 of 1

macro/filter in sdk?

Posted: Sat May 14, 2022 3:55 pm
by lin-ycv
Does macros work with the SDK?
is there a specific method I need to call first?
I passed it through as part of the search query but that doesn't seem to be working.

Re: macro in sdk?

Posted: Sat May 14, 2022 5:13 pm
by horst.epp
I would say yes.
Total Commander and Everything Toolbar use the SDK
and with both I can use my defined Everything macros.

Re: macro in sdk?

Posted: Sat May 14, 2022 5:59 pm
by lin-ycv
For Everything toolbar, they've implemented their own filter, checking for the macro keyword then filtering by file extension
https://github.com/stnkl/EverythingTool ... der.cs#L64
I don't know how Total Commander does it.
I'd rather not reimplement something Everything can already do.

Re: macro in sdk?

Posted: Sat May 14, 2022 7:59 pm
by horst.epp
lin-ycv wrote: Sat May 14, 2022 5:59 pm For Everything toolbar, they've implemented their own filter, checking for the macro keyword then filtering by file extension
https://github.com/stnkl/EverythingTool ... der.cs#L64
I don't know how Total Commander does it.
I'd rather not reimplement something Everything can already do.
My macros are in macros.csv and not in the old filters.csv
which is used by the Everything Toolbar for compatibilty reasons.
I use Everything 1.5 and the Toolbar can't understand the new filters format.
The SDK is compiled into Total Commander and it understands my Everything 1.5 macros
as the Toolbar does.

Re: macro in sdk?

Posted: Sun May 15, 2022 6:58 am
by lin-ycv
Just saw on an older post, should've searched more throughly
void wrote: Sat Mar 05, 2022 11:15 pm The SDK does not support access to filter macros.
(The next major version will)

Please try the following SDK call:

Code: Select all

$myCom ->Everything_SetSearch("regex:K199[^a-z0-9]*.* path:360 ext:ani;apng;bmp;bpg;cur;gif;ico;jfi;jfif;jif;jpe;jpeg;jpg;pcx;png;psb;psd;rle;svg;tga;tif;tiff;webp;wmf");
so both TC and Toolbar has implemented their own solutions for filtering.

Re: macro in sdk?

Posted: Sun May 15, 2022 9:12 am
by horst.epp
lin-ycv wrote: Sun May 15, 2022 6:58 am Just saw on an older post, should've searched more throughly
void wrote: Sat Mar 05, 2022 11:15 pm The SDK does not support access to filter macros.
(The next major version will)

Please try the following SDK call:

Code: Select all

$myCom ->Everything_SetSearch("regex:K199[^a-z0-9]*.* path:360 ext:ani;apng;bmp;bpg;cur;gif;ico;jfi;jfif;jif;jpe;jpeg;jpg;pcx;png;psb;psd;rle;svg;tga;tif;tiff;webp;wmf");
so both TC and Toolbar has implemented their own solutions for filtering.
I don't talk about filter macros !
I use Everything 1.5 macros and these are working thru the SDK.
TC and the Toolbar do nothing special with them.

Re: macro in sdk?

Posted: Sun May 15, 2022 1:11 pm
by lin-ycv
wait, are macros and filters different?
on the support page they call it macros:
https://www.voidtools.com/support/everything/searching/

Code: Select all

Macros

quot:	Literal double quote "
apos:	Literal apostrophe '
amp:	Literal ampersand &
lt:	Literal less than <
gt:	Literal greater than >
#<n>:	Literal unicode character <n> in decimal.
#x<n>:	Literal unicode character <n> in hexadecimal.
audio:	Search for audio files.
zip:	Search for compressed files.
doc:	Search for document files.
exe:	Search for executable files.
pic:	Search for picture files.
video:	Search for video files.
but on the forum and github, i see people call it filters

Re: macro/filter in sdk?

Posted: Sun May 15, 2022 1:21 pm
by horst.epp
For me macros and filters are different.
Macros are set with /define
For example her some of my macros from the Macros.csv

Code: Select all

Name,Search
"allcontent<search>","<content:search: | notindexed:content:search: | systemindex:search:> "
"comment","custom-property-0:"
"ncontent<search>","notindexed:content:search:"
"tag","custom-property-1:"
"tags","custom-property-1:"
"text<search>","content:search:"
The macros tag: and tags: for example prevent the default Everything tags: search
and search my ADS indexed properties instead.

The help for macros is here:
viewtopic.php?f=12&t=9795#macro

Re: macro/filter in sdk?

Posted: Mon May 16, 2022 9:44 am
by void
wait, are macros and filters different?
Filters and bookmarks can have macros.


These are filter macros.



In Everything 1.5, you can define macros without adding a filter or bookmark.
in Everything 1.5 you can have filter macros, bookmark macros and macros.



The SDK does not have access to filters (or filter macros) in Everything 1.4.
The SDK will have access to filters, filter macros, bookmarks, bookmark macros and macros in Everything 1.5.