Re: setting Finder search input

2022-12-13 Thread Torsten Curdt via Cocoa-dev
> Is it not enough to use NSWorkspace’s showSearchResultsForQueryString?
>

I need to see what queries this allows.
(IIRC there were two different ways to specifying search queries)

But this looks perfect! I didn't realize this was available on NSWorkspace.
Thank you so much.

I'll report back when I have some more details.
But this is looking promising!

cheers,
Torsten

https://torstencurdt.com/
https://twitter.com/tcurdt
https://www.linkedin.com/in/tcurdt/

Ever had broken flip flops

?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: setting Finder search input

2022-12-13 Thread Alex Zavatone via Cocoa-dev
This might be an actual good application of launching a compiled AppleScript or 
even an Automator action.

I seem to remember making terminal applications in Xcode.  I wonder if you 
could do that with an AS-OC script and then just call the application within 
your bundle to 

Activate the Finder
Open a new window
Press command F
Type text.

Of course, you’d need to request GUI Scripting control.

You could also just have the compiled script within your bundle and call it.  
Just compile it  using osacompile.

osacompile -o output.app input.applescript

Cheers,
Alex Zavatone

> On Dec 13, 2022, at 2:48 PM, Torsten Curdt via Cocoa-dev 
>  wrote:
> 
> Thanks for the help, Rob
> 
> Is it always going to be the same search?  If so, you could create a Saved
>> Search in the Finder and include it with your app.  Then when you want to
>> bring up the search you can open the Saved Search bundle and it will open
>> in the Finder.  Hope that helps.
>> 
> 
> I was hoping to pass it in so that search parameters are still accessible
> to the user.
> Basically the same as CMD+F and entering some search parameters.
> That would be the ideal solution.
> 
> But maybe a Saved Search could be a workaround.
> I am quite sure it would be OK if the user could see and change the
> properties of the Saved Search.
> 
> But I could not figure out how to edit a Saved Search myself yet 
> 
> Is there a way to edit a Saved Search?
> 
> cheers,
> Torsten
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: setting Finder search input

2022-12-13 Thread Alex Zavatone via Cocoa-dev
Is it reasonable to use an AppleScript to do it?

Back in the olden days, I used AS-OC to automate Illustrator, Photoshop, the 
Finder, TextEdit and ImageOptim all in one compiled application.
 
AS-OC is AppleScript-Objective-C

Cheers,
Alex Zavatone

> On Dec 13, 2022, at 2:22 PM, Rob Petrovec via Cocoa-dev 
>  wrote:
> 
> Is it always going to be the same search?  If so, you could create a Saved 
> Search in the Finder and include it with your app.  Then when you want to 
> bring up the search you can open the Saved Search bundle and it will open in 
> the Finder.  Hope that helps.
> 
> —Rob
> 
> 
>> On Dec 13, 2022, at 1:10 PM, Torsten Curdt via Cocoa-dev 
>> mailto:cocoa-dev@lists.apple.com>> wrote:
>> 
>> I would like to open a Finder window with a pre-filled search filter and
>> search results - but I just cannot find a good way to do it. I tried to
>> find a way through the Scripting Bridge but it seems like this is not
>> exposed at all.
>> 
>> Any other suggestions?
>> 
>> cheers,
>> Torsten
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com 
>> 
>> 
>> This email sent to petr...@mac.com 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com 
> )
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com 
> 
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com 
> 
> 
> This email sent to z...@mac.com 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: setting Finder search input

2022-12-13 Thread Steve Mills via Cocoa-dev
> On Dec 13, 2022, at 14:11, Torsten Curdt via Cocoa-dev 
>  wrote:
> 
> I would like to open a Finder window with a pre-filled search filter and
> search results - but I just cannot find a good way to do it. I tried to
> find a way through the Scripting Bridge but it seems like this is not
> exposed at all.

Is it not enough to use NSWorkspace’s showSearchResultsForQueryString?

Steve via iPad

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: setting Finder search input

2022-12-13 Thread Torsten Curdt via Cocoa-dev
Thanks for the help, Rob

Is it always going to be the same search?  If so, you could create a Saved
> Search in the Finder and include it with your app.  Then when you want to
> bring up the search you can open the Saved Search bundle and it will open
> in the Finder.  Hope that helps.
>

I was hoping to pass it in so that search parameters are still accessible
to the user.
Basically the same as CMD+F and entering some search parameters.
That would be the ideal solution.

But maybe a Saved Search could be a workaround.
I am quite sure it would be OK if the user could see and change the
properties of the Saved Search.

But I could not figure out how to edit a Saved Search myself yet 

Is there a way to edit a Saved Search?

cheers,
Torsten
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: setting Finder search input

2022-12-13 Thread Rob Petrovec via Cocoa-dev
Is it always going to be the same search?  If so, you could create a Saved 
Search in the Finder and include it with your app.  Then when you want to bring 
up the search you can open the Saved Search bundle and it will open in the 
Finder.  Hope that helps.

—Rob


> On Dec 13, 2022, at 1:10 PM, Torsten Curdt via Cocoa-dev 
>  wrote:
> 
> I would like to open a Finder window with a pre-filled search filter and
> search results - but I just cannot find a good way to do it. I tried to
> find a way through the Scripting Bridge but it seems like this is not
> exposed at all.
> 
> Any other suggestions?
> 
> cheers,
> Torsten
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
> 
> This email sent to petr...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


setting Finder search input

2022-12-13 Thread Torsten Curdt via Cocoa-dev
I would like to open a Finder window with a pre-filled search filter and
search results - but I just cannot find a good way to do it. I tried to
find a way through the Scripting Bridge but it seems like this is not
exposed at all.

Any other suggestions?

cheers,
Torsten
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com