macro/filter in sdk?

Plug-in and third party software discussion.
Post Reply
lin-ycv
Posts: 10
Joined: Fri Mar 11, 2022 2:25 am

macro/filter in sdk?

Post 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.
Last edited by lin-ycv on Sun May 15, 2022 1:11 pm, edited 1 time in total.
horst.epp
Posts: 1446
Joined: Fri Apr 04, 2014 3:24 pm

Re: macro in sdk?

Post 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.
lin-ycv
Posts: 10
Joined: Fri Mar 11, 2022 2:25 am

Re: macro in sdk?

Post 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.
horst.epp
Posts: 1446
Joined: Fri Apr 04, 2014 3:24 pm

Re: macro in sdk?

Post 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.
lin-ycv
Posts: 10
Joined: Fri Mar 11, 2022 2:25 am

Re: macro in sdk?

Post 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.
horst.epp
Posts: 1446
Joined: Fri Apr 04, 2014 3:24 pm

Re: macro in sdk?

Post 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.
lin-ycv
Posts: 10
Joined: Fri Mar 11, 2022 2:25 am

Re: macro in sdk?

Post 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
horst.epp
Posts: 1446
Joined: Fri Apr 04, 2014 3:24 pm

Re: macro/filter in sdk?

Post 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
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: macro/filter in sdk?

Post 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.
Post Reply