Search results to clipboard or a variable
Search results to clipboard or a variable
Hi.
In the use of the command line utility (es.exe) the output can be to the screen or to a file. Can't output to the clipboard or a variable? (that the results remain resident in memory so that they can be used by other languages such as AutoHotkey) If you don't have this possibility, it would be nice to implement it in future versions. The current option that can be used on output to a file, and from AutoHotkey to read the file. Two processes, when it could only be one.
In the use of the command line utility (es.exe) the output can be to the screen or to a file. Can't output to the clipboard or a variable? (that the results remain resident in memory so that they can be used by other languages such as AutoHotkey) If you don't have this possibility, it would be nice to implement it in future versions. The current option that can be used on output to a file, and from AutoHotkey to read the file. Two processes, when it could only be one.
Re: Search results to clipboard or a variable
Everything can't set environment variables.
What you *can* do is starting cmd from AHK with a command like
This way CMD will put the output on the clipboard.
Another alternative is to use the RunCMD AHK function to capture stdout to a variable.
What you *can* do is starting cmd from AHK with a command like
es.exe searchtext | clip
This way CMD will put the output on the clipboard.
Another alternative is to use the RunCMD AHK function to capture stdout to a variable.
Re: Search results to clipboard or a variable
Is this a different request from, Can variables be used from the command line function?
(And while we're here, Is there a benefit to be able to save ES results to an Environment Variable?)
Meanwhile, what I have done are things like:
(And while we're here, Is there a benefit to be able to save ES results to an Environment Variable?)
Meanwhile, what I have done are things like:
@es.exe -instance 15 %* -export-efu c:\out\sssGO.efu !\Windows\Recent file:
Code: Select all
:: SSSL SjB 12-18-2022 Open an ES File List
:: SSS, but an entire File List rather then a singular file (as with sssgo.TXT)
:: this opens in a "static" version of Everything (rather then in the current...)
@echo off
start /B cmd /C "C:\DEV\Locate\15.filelist\Everything.exe" -instance FILELIST -read-only -no-db -filelist C:\OUT\sssGO.efu
Code: Select all
:: SSSE SjB 12-18-2022
:: SSS, but an ES search
:: with the intent that it is a PROGRAM
:: so the START should EXECUTE the program...
@echo off
echo About to EXECUTE:
cat c:/out/sssgo.txt
pause
for /f "tokens=*" %%i in (c:\out\sssgo.txt) do start /B CMD /C %%i
Re: Search results to clipboard or a variable
Hi, NotNull.
From the command line works and therefore in a bat file. But in an autohotkey script the line , does not produce any output (I have a clipboard manager and it warns me when a change has occurred, I think it "ignores" the parameter )
I don't understand the terminology to use in RunCMD(), I don't know much about programming and the explanation given in the forum seems too cryptic to me.
Any suggestions?
From the command line
es.exe namefile | clip
RunWait, es.exe namefile | clip
| clip
I don't understand the terminology to use in RunCMD(), I don't know much about programming and the explanation given in the forum seems too cryptic to me.
Any suggestions?
Re: Search results to clipboard or a variable
Try it with
(this launches cmd and cmd executes es.exe nemafile | clip
When es.exe is finished, cmd will close (the /C parm takes care of that)
chcp 65001 takes care of special characters in filenames
Code: Select all
runwait, %comspec% /c chcp 65001 & es.exe nemafile | clip
When es.exe is finished, cmd will close (the /C parm takes care of that)
chcp 65001 takes care of special characters in filenames
Re: Search results to clipboard or a variable
Great NotNull, it works!
Thank you very much
(What does the symbol?)
Thank you very much
(What does the symbol
&
Re: Search results to clipboard or a variable
That is to specify multiple commands on one line: command 1 & command 2
(It is specific to CMD)
(It is specific to CMD)
Re: Search results to clipboard or a variable
Thanks again NotNull. You have been a great help to me. Likewise your clear explanations. In the autohotkey help, although they use the /c parameter, they don't explain what it means, nor when to use it.
Re: Search results to clipboard or a variable
You're welcome!
@therube:
@therube:
What 'cat' do you use?
Re: Search results to clipboard or a variable
.bin.zip from, https://sourceforge.net/projects/gnuwin ... ils/5.3.0/.
(You'd also need, coreutils-5.3.0-dep.zip, for the two .dll's in there.)
(You'd also need, coreutils-5.3.0-dep.zip, for the two .dll's in there.)
Re: Search results to clipboard or a variable
Thanks!
(those DLLs were already included in the zip I downloaded, btw)
Turns out to be basically the same as the cygwin cat I have installed (only difference: cygwin is 64-bit).
(those DLLs were already included in the zip I downloaded, btw)
Turns out to be basically the same as the cygwin cat I have installed (only difference: cygwin is 64-bit).
Re: Search results to clipboard or a variable
Re: Search results to clipboard or a variable
No worries, this was off-topic and meant for @therube as he often uses nifty little utilities that I was not aware of.
'cat' is a little program to "type" one or more textfiles to the screen with some extra formatting options.
Re: Search results to clipboard or a variable
cat (Unix)
Basic Cat Command Examples in Linux
In a basic sense, cat is like the Windows (command-line) TYPE command.
Basic Cat Command Examples in Linux
In a basic sense, cat is like the Windows (command-line) TYPE command.
Code: Select all
Displays the contents of a text file or files.
TYPE [drive:][path]filename