Is it possible to automatically open the top item if it is the only result? Be it a setting, or API call?
For example: If someone runs a search for a specific PDF on a Everything instance, a dream scenario would be an option to automatically open the searched name if there was only a single result returned. Right now I'm working on implementing this into a workflow where the employee scans a QR code which takes them to the Everything HTTP page with the appropriate result. They then click the .PDF link (should always be a single result) and it opens the PDF. A method to skip the clicking would be amazing!
Thanks again.
Automatically open single query results
Re: Automatically open single query results
If you are using the embedded Everything HTTP server: you can customize the HTTP server.
Adding some (JavaScript) code should do it.
When using the ETP Server instead, there are easier options.
Adding some (JavaScript) code should do it.
When using the ETP Server instead, there are easier options.
Re: Automatically open single query results
I was looking into JavaScript.
What would your recommendation be at the software level for scanning a QR code to pull up a PDF?
What would your recommendation be at the software level for scanning a QR code to pull up a PDF?
Re: Automatically open single query results
Bit depending on your situation, but in large steps (details when needed):
Scenario 1 (Simple): Use command-line tool ES.exe
In - for example - PowerShell you now execute (using ABC123 as a parameter):
That will run/execute the first result.
( I would advice some extra checks, like:
$Results=("c:\path to\es.exe" ABC123 )
and check if $Results[1] is empty ànd that $Results[0] exists before running
)
You can also limit the number of result to - let's say 5 - with ES.exe's parameter -n 5
Scenario 2 : Use the Everything SDK
Using the SDK, you can write your own program to communicate with a running Everything client.
I'm not a developer so can't help you in detail, but there are examples in the SDK for multiple programming languages.
Good luck!
Some notes:
- If needed, you can run this ETP client next to your regular Everything client
- For your case, it would be useful if you could talk to the ETP Server directly using the Everything SDK. But I don't think that's (technically) possible.
Scenario 1 (Simple): Use command-line tool ES.exe
- Setup an ETP server
- Download ES.exe from here.
- Setup an Everything client to automatically connect to this ETP Server.
- Let this client run at startup/logon (parameter -startup) and let it run in the background (ES.exe 'talks' to this client to get it's information).
In - for example - PowerShell you now execute (using ABC123 as a parameter):
Code: Select all
start ("c:\path to\es.exe" ABC123 )[0]
( I would advice some extra checks, like:
$Results=("c:\path to\es.exe" ABC123 )
and check if $Results[1] is empty ànd that $Results[0] exists before running
)
You can also limit the number of result to - let's say 5 - with ES.exe's parameter -n 5
Scenario 2 : Use the Everything SDK
Using the SDK, you can write your own program to communicate with a running Everything client.
I'm not a developer so can't help you in detail, but there are examples in the SDK for multiple programming languages.
- Setup an ETP server
- Setup an Everything client to automatically connect to this ETP Server.
- Create a program that talks to this Everything client and handles the results (from what I heard that should not be very hard and there is always support here on the forums)
Good luck!
Some notes:
- If needed, you can run this ETP client next to your regular Everything client
- For your case, it would be useful if you could talk to the ETP Server directly using the Everything SDK. But I don't think that's (technically) possible.