ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Find And Run Robot

#filecontents FILEPATH -- how does it work?

<< < (4/6) > >>

ertwro:
Hi, I'm the person who asked about this feature in the #donationcoder chat.
I just looked for software similar to dmenu or rofi from Linux but on Windows and out of all the alternative FARR is by far the best. The main thing I was missing was dmenu's greatest strength: receiving stdin from a script and displaying the output as a list in the FARR window and if possible using that to run scripts (stdout). Something like the following gif:

https://media.giphy.com/media/fxw8WExg6yl62jpYfa/giphy.gif

    When I found the Special/Virtual launch strings/commands and #filecontents offered this capability I got super excited, but when I heard it was gonna get implemented as a new function I threw my hands up and screamed "yes!". I'll stay super tuned.

Nod5:
I will try to get this implemented this weekend, with a single command that will run a script/exe and grab its output as a list of results to show.
-mouser (February 04, 2019, 04:40 AM)
--- End quote ---

Nice! Though I think it would be more versatile if #filecontents was made compatible with ;;; and multiple virtual strings on a results line in the alias setup. That way we could do

--- ---example | dolaunch appcap C:\program.exe ;;; #filecontents C:\text.txtwhere FARR waits for the first command (run a program that outputs something to text.txt) to finish before processing the #filecontents command which imports each line in text.txt as a line to show in FARR's results window.

More versatile since the stdout from many tools isn't in a format compatible with FARR's #filecontents command. If the above method was added then we could work around that by inserting a step that first reformats the text.txt to be compatible with the #filecontents command.

--- ---example 2 | dolaunch appcap C:\program.exe ;;; appcap C:\script.ahk ;;; #filecontents C:\text.txt
BTW a small bug with #filecontents:
If a line in the text.txt file isn't an existing filepath, but instead some text string, it will erroneously reuse the icon from the previous results line. For example if text.txt contains

--- ---C:\image.jpg
some text message
C:\image2.jpgthen all three results lines will show the icon for jpg images. It would be better if the middle results line didn't show any icon at all.

ertwro:
Yeah, I've been reading and trying some stuff but as you told me there's no easy way to do what I want just with #filecontents and launch string/commands. Tried to circumvent this by using pipes but found out that Windows doesn't use fifo files per se and uses sockets in the form of \\.pipe\whatever. :(

mouser:
I am implementing both "appcapresults" function which will pull results directly from a script, but also Nod5's request for a separate command that says to pull results from a text file, in a way that can be chained together with other virtual launch strings.

Does anyone have a script/executable that I can use to test the new appcapresults function?
So I need an executable that produces results for FARR to display (in normal alias result format, with option icon and nice label, etc.). Nevermind I made one.


BTW a small bug with #filecontents:  If a line in the text.txt file isn't an existing filepath, but instead some text string, it will erroneously reuse the icon from the previous results line. For example if text.txt contains
--- End quote ---

let me try to fix that.

mouser:
BTW a small bug with #filecontents:  If a line in the text.txt file isn't an existing filepath, but instead some text string, it will erroneously reuse the icon from the previous results line. For example if text.txt contains
--- End quote ---
Ok, I've fixed this -- it was a more general problem with using previous icon when one shouldn't be used at all, and was probably the cause of an occasional report that a random icon was being used when there was only one result and it should not have an icon.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version