topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday April 25, 2024, 7:58 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Nod5 [ switch to compact view ]

Pages: prev1 2 3 [4] 5 6 7 8 9 ... 47next
76
Find And Run Robot / Re: Farr strecthed idea, send key strokes
« on: November 18, 2020, 04:00 PM »
You can create alias actions that send keys to the window that was active before FARR started
example | sendkeys abc
https://www.donation...ulate_keypresses.htm
https://www.donation...l_launch_strings.htm

Note to mouser: I noticed that if we chain sleep and sendkeys commands then FARR sleeps, sends the keys and reopens and refocuses FARR. If we don't have the sleep command FARR doesn't reopen after sending the keys. Bug?
example | sleep 2000 ;;; sendkeys abc

77
Is it only one batchfile in a fixed location? In that case, how about an alias for that batchfile, with the path to another file as command line parameter. You type the start of the alias in FARR and then drag and drop the file you want as parameter in the FARR searchbox. Its path will then be added to the FARR searchbox. You next press enter to trigger to alias action. Would look something like this:

https://i.imgur.com/mJgfeP1.mp4

78
Nice 4wd! One idea is to search for artist name and use the first match as artist page URL input into the rest of your program.
The URL format is
https://www.discogs.com/search/?type=artist&title=ac+dc
Other URL parameters can be detected by playing around with options on https://www.discogs.com/search/advanced

This could be a little NANY 2021 app.

79
You could maybe achieve this with some combination of appcapresult and external scripts that returns preformatted results, leveraging the showfilehtml action modifier
I already do that - that's what the mp4 recording illustrates. But as noted there are sometimes slowdowns, from the roundtrip to the external script and back.

80
Please, is there any way to set the clock MANUALLY?

What Deozaan wrote. Or if you prefer the command line, open windows terminal and use the command "time".
https://ss64.com/nt/time.html

81
Nice tip, useful in some cases.

I now realize this minor request can be seen as part of the more general wish for ways to customize how search results look while searching in my other recent post.

82
Find And Run Robot / Re: FARR doesn't display icons for exes in path
« on: October 28, 2020, 02:40 PM »
I confirm this issue.

83
You can do this thing now, with this set of aliases

Thanks skajfes! I forgot about alias action keywords when I wrote the previous posts  :-[
I also now realize that I wasn't clearly separating two distinct goals  :-[

Goal 1. customization of how the results look while we type and FARR narrows down the search for files and folders
Goal 2. custom actions for search results once we press Enter (or another keyboard shortcut), e.g. show results as HTML in FARR.

My first post mixed goals 1 and 2 and my second post shifted only to only cover goal 2.
Your suggestion with alias action keywords is great for goal 2. Simpler and faster than my AutoHotkey script workarounds.

Here is my variant of the two alias method you describe to make Enter perform the action show result as HTML in FARR.

alias1: html_alias
regex: <nothing>
result: showfilehtml $$1

alias2: tldr
regex: ^tl (.*)
result: dosearch +html_modifier $$1 +html_alias -alias

In FARR options create a search folder with the location of the .html files and the keyword "html_modifier".
I added -alias in the regex above since otherwise the search also matched other aliases at the top of the results list.
I put the +html_modifier before the $$1 variable because otherwise dosearch triggered another alias I had whose regex reacts to a space at the start of a FARR search.


So far goal 1. Now let us talk about goal 2
Do you know any way for alias action keywords to customize how the search results list looks while we search for files in a folder? I can right now only think of this possibility: If we change the helper alias (my alias1 above) result to

regex: HTML: $$1 | showfilehtml $$1 /icon=C:\folder\icon.ico

then once we trigger alias2 and type enough characters to get a single unique match FARR will automatically (without Enter press) transform that single result line to show "HTML: C:\folder\uniquefile.html" and the custom icon.

But there are two limitations here:
  • The custom search result format shows only when we have typed enough to filter in a single result. Before that the results looks like in a regular FARR file search
  • We can only use the full file path variable $$1 in the custom format. There is no variable for e.g. filename, filename without extension or other filepath fragments we might want to use.

Compare with my animation from the first post: https://i.imgur.com/6LEOsFM.mp4 . There the live search results lines have the format
<filename without extension> | showfilehtml <full file path>
I could also have added custom icon(s), for example one that would signal that the action has switched to show the HTML file in FARR. I like that simpler look and think it would be nice to have that possibility built into FARR.

So, I think my now hopefully more clearly stated goal 2 is still something that FARR cannot currently do by itself. Or?


edit:
As a sidenote the FARR help page on Using Alias Action Keywords is a bit unclear (just like me then! ;D) in this sentence.
When an alias name is specified in this way, anywhere on the search string, it does not effect search, but it will cause the alias results to be displayed AFTER the result file is selected, with the selected file name as argument $$1 in the alias.
Does this rewrite more accurately describe FARR's current behaviour?
When an alias name is specified in this way, anywhere on the search string, it does not affect which file results are shown nor how each result line looks. With one exception: When the search string matches only one unique file then the action keyword alias determines how that result line looks.
However once you press Enter the action keyword alias comes into effect: FARR passes the selected result file path as variable $$1 to the action alias. The action you have set up in the action alias is then performed by FARR.

84
Thanks. Looks like someone did code it, here https://custom.simpl...s/index.php?mod=4131 . But that allows many different audio and video files. Might be possible to lock down? I guess a big downside with any local video embed is if people start uploading big files that autoplay and slow down page loads. On the other hand small, short and silent MP4 screencap clips can be a useful way to quickly show a feature or describe a bug.

85
I think he explicitly has html embeds turned off, and for good reason.
I Agree that makes sense, but I thought the link also said BBCode for local video could be specifically enabled, without allowing any and all html embeds. But I maybe misinterpreted that.

Anyway embedded mp4 animations isn't very important, I mostly wanted to check if worked already. Nice to have feature if easy to enable and no strong reasons against.

86
Found this at SMF on embedding MP4. But don't know what changes to DC would be needed to get something like that working.
https://www.simplema...sg3843100#msg3843100

87
It's a mystery I'll never understand, but for some reason the internet seems to always converge on using the least efficient means possible of transmitting information.
I don't get it - please post a 4K video livestream explainer of what you mean?!  :P

88
I thought of another way to accomplish similar effects via hotkeys. A quick brainstorm on that.

We can already create FARR hotkeys that takes the selected file result (or first file result if no selection) from the previous search and makes a new search. That can be combined with an alias that when triggered immediately shows a filepath as HTML in FARR.

For example in FARR set up the hotkey Ctrl+H with option "Set Search text ..." enabled and this string
html_alias %CURRENTRESULTNB%

Then create the alias
name: html_alias
regex: ^(html_alias) (.+)$
result: dolaunch showfilehtml $$2

Now Ctrl+H will try to show the currently selected (or first) FARR file search result as HTML inside FARR.

A problem with this, though, is that FARR creates global hotkeys so pressing Ctrl+H in other windows will open FARR.

That problem could be solved if FARR got an option to choose if a custom hotkey should be global or local. Another solution is to create the hotkey in AutoHotkey instead, and have it mimic what the FARR hotkey above does.

A more advanced idea along these hotkey lines is to let the effect of a hotkey be conditional on the contents of the FARR search box. For example if the search box starts with "tl " (my example alias in the first post) then Enter would open the selected file result as HTML in FARR. In other cases Enter would work like usual (open file in default application). This could be done by enhancing the FARR hotkeys features. Or again as an external AutoHotkey script.

edit:
We can skip the extra alias step by using FARR's command line options. Simple AutoHotkey example for a local hotkey to show the selected (or first) FARR result as HTML.

Code: Autohotkey [Select]
  1.  
  2. ; hotkey Control + H when FARR window is active to show selected (or first) FARR result file as HTML
  3. ; 2020-10-27
  4. ; note: using this hotkey on non-HTML files is unpredictable, may freeze/crash FARR
  5.  
  6. #IfWinActive, ahk_exe FindAndRunRobot.exe
  7. ^h:: RunWait "C:\Program Files (x86)\FindAndRunRobot\FindAndRunRobot.exe" -launch "showfilehtml `%CURRENTRESULTNB`%"
  8.  
  9. ; references:
  10. ; https://www.donationcoder.com/Software/Mouser/findrun/help/commnadline_options.htm
  11. ;   "-launch = start FARR (or invoke in a running copy) and launch a command (can use any normal FARR launch strings ..."
  12. ; https://www.donationcoder.com/Software/Mouser/findrun/help/virtual_launch_strings.htm
  13. ;   "showfilehtml FILENAME - show a file in html mode"
  14. ; https://www.donationcoder.com/Software/Mouser/findrun/help/virtual_folder_names.htm
  15. ;   "%CURRENTRESULT% - currently selected result; useful for creating hotkeys that use it, etc.; blank if nothing selected"
  16. ;   "%CURRENTRESULTNB% - same as above, but = first result if nothing selected"

This can also be expanded to use the command line to first read the FARR result to clipboard (-launch "copyclip %CURRENTRESULTNB%"), add code steps to verify that it is a .html (or do some other checks) and only the file passes those tests show it as HTML. But every roundtrip via the command line to FARR takes ~150ms in my tests.

@mouser: it would be neat if we could do anything the FARR CLI "-launch" syntax lets us do but through SendMessage, to save the time currently wasted by starting/closing the command line process.


89
Testing GIFs.

Source imgur mp4 is attached to my first post above (44 kB)

Imgur mp4 passed through https://imgur.com/vidgif  (107 kB)
imgur.gif

Imgur mp4 passed through https://cloudconvert.com/mp4-to-gif (166 kB)
cloudconvert.gif

Edit: yes that worked.

If you don't need audio - convert to GIF

I don't need audio, but mp4 file animations tend to have better quality and smaller filesize.

90
This post is to test if we can embed a short MP4 animation inline in DC forum posts. Here goes:

edit:

We can attach the .mp4 to the bottom of the post, but it then downloads rather than shows in the browser.

Attempts at embedding that did not work with an .mp4 file attachment
[attachment=1]
[attachthumb=1]
[attachimg=1]

Also not working: embed animation from imgur server
[img]https://i.imgur.com/0SE2wDQ.mp4[/img]

 test

91
The FARR command dosearch lets an alias perform a new search and display the results. We can use search folder modifier keys and trigger long search patterns from a short alias. Great! But dosearch has no options to adjust the results line for each search match.

This request is an enhanced dosearch command, call it dosearchformatresults, that lets us format the search result lines.

One idea for the syntax is to put result formatting at the end after a frontslash and keyword, like for the FARR window options and /icon=... instructions. Like this
dosearchformatresults <regular dosearch syntax here> /result=<result formatting here>

The result formatting part would have the syntax we can use for results in aliases plus special variables related to each search match file. Example:
%filename% | showfilehtml %filepath%
In this example FARR would perform a dosearch for .html files and then for each match show a result line that when triggered shows the .html files inside FARR, rather than open it in the default .html application (external browser).

Probably some more complex escaping of characters and other ways to avoid weird conflicts/loops would be needed (recursive dosearchformatresults might cause weird issues for example  :D).

We can already achieve something like what I'm requesting via external scripts and appcapresults. But that is complex and FARR could probably do it quicker. The external workflow steps goes like this:
- FARR alias that passes a regex match from the typed string in FARR to an external script via dolaunch and appcapresult
dolaunch appcapresult C:\externalscript.exe $$2
- external script that searches some folder for e.g. .html files with filenames that match the passed string(s)
- for each match prepare a result line with the showfilehtml command
- result lines are passed back to FARR via stdout when the script exits
- FARR's appcapresult reads the results and displays them
- the user selects a result and presses Enter to view the HTML page inside FARR
In this external workflow FARR starts an external process and waits for it to finish for each typed character, which I've seen can cause some slowdowns.

This animation illustrates how it looks.
https://i.imgur.com/6LEOsFM.mp4

The .html files in the illustration are derived from the TLDR project - a neat collection of short usage examples for CLI commands in Linux/Windows -  that I've converted from Markdown (previous post related to that).

92
How is it a surprise that the RIAA are taking down a streaming app they have not specifically allowed?
I wouldn't describe youtube-dl as a streaming app. It also does not circumvent DRM. AFAIK it merely makes it more convenient to do what anyone can already do manually.

This short twitter thread explains how this is not a DMCA takedown, which means Microsoft/GitHub could have acted differently.
https://twitter.com/.../1319755776043384838

Some are playfully protesting via git at the GitHub DMCA repo
https://github.com/g...2e44f7fe71b1e3a4701f

93
Background: I'm using FARR to show HTML files generated by Pandoc from Markdown source files with CSS similar to that of GitHub.

I ran into some CSS issues which got me searching for details on the browser engine/mode used by FARR. The forum posts I find on that are quite old and I'm not sure if they reflect the current state of FARR. Thus questions:

1. What browser engine/mode (not sure what the correct term is here) does FARR by default use on a fresh install of Windows 10 with latest updates? Edit: answered in edits below.
2. Are some FARR settings available to adjust what browser is used or some details on how it is used?

The help page https://www.donation...p/html_view_mode.htm says
Html view mode is currently rendered using the IE activex dll as an embedded web browser.  This means that it will use the version of the Internet Explorer engine installed on the user's pc, and can support displaying anything that can be displayed in a normal browser.
It is not so clear if that means IE11.

One of my CSS issues was that FARR did not show the background color of inline code blocks in the HTML I tested with.

How it looks in Firefox/Chrome/Edge
firefox chrome edge.png

How it looks in FARR
FARR.png

I tracked this down to the CSS using the color function RGBA which IE seems to not support
edit: My mistake. The correct RBGA() compatibility page says IE9+ is supported, IE6-8 is not.

Adding this line to the HTML
<head>
<meta http-equiv="x-ua-compatible" content="IE=edge" />
makes FARR show the code element background color just like in the external browsers.
I found that on https://stackoverflow.com/a/22964400 , with much more background on https://stackoverflow.com/a/6771584 .

So, workaround achieved, I suppose. But I'm unsure what other changes in how FARR renders HTML that line causes. Does it make FARR use Edge? Or adjust the IE1 version/mode used? I hope for feedback from mouser or others on this topic.

edit: Answering myself. We can check browser document mode by adding this line to the HTML document, which shows a popup when FARR renders it
<script>alert(document.documentMode);</script>
Findings: Before adding the "<meta ..." line my FARR used document mode IE7. After adding the line FARR uses IE11.

That explains why the CSS RGBA() function, which required IE9+, only worked after adding the line. Note also that the "IE=edge" part does not mean that the browser Edge is used, it instead means that the newest available Internet Explorer document mode will be used. Which is IE11 on a fully updated Windows 10 PC today.


To reproduce my exact steps do this:

- download cmd.md from the tldr project GitHub.
- download this style.css that mimics GitHub's looks.
- download Pandoc
- run this to output the file cmd.html
pandoc -c style.css -s cmd.md --self-contained -o cmd.html

- edit cmd.html and remove these lines (otherwise FARR will freeze and not show the HTML)
  <!--[if lt IE 9]>
    <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
  <![endif]-->

- create a FARR alias with this as result
showfilehtml C:\path\to\cmd.html

- trigger the alias and notice that the code elements lack background color
- edit cmd.html again and add this below the <head> line
<meta http-equiv="x-ua-compatible" content="IE=edge" />
- trigger the alias again - now the background color should show.

BTW I'm reworking some of my FARR stuff which explains my many recent FARR posts. Bear with me mouser :)


94
Reading https://forum.obsidi...rom-the-terminal/860 I stumbled on https://imdone.io/ , a kanban app that reads todo lines from plaintext files.

Have any of you tried using it with Obsidian (or Roam or some other markdown text system)? I like the general idea of adding todos quickly and with relatively little structure along the way when in just-get-text-out writing mode and then use some such tool later to help overview and act on tasks orderly, via kanban or some other method.

95
Minor UI request: option to hide the alias name string that in large icon mode shows under each non-filepath result.
alias_name.png
FARR display options lets us uncheck the "Location" report column. But that hides both alias name strings and filepaths. I'd prefer to only hide the alias name strings and keep filepaths visible.
options.png

Edit:

Alternatively, an option to customize what that smaller line of text contains, through commands in results lines. Perhaps something similar to the "/hint=..." syntax?

I've also noticed that if we use appcapresults to generate a list of results then in some cases FARR shows the string "alias" on this smaller line also in cases where it would have shown e.g. "showfilehtml C:\file.html" if the result was defined in the regular FARR alias settings.

96
Find And Run Robot / Re: Location of settings for FARR?
« on: October 18, 2020, 05:31 AM »
Is there any way I can permanently change the location of these settings? I have some folders I use for settings used in multiple apps

You could make a hard link. That way you can backup/edit the settings in one file location while FARR reads/writes/uses settings in another file location.
https://docs.microso...dows-commands/mklink
https://www.howtogee...on-windows-or-linux/

Like wraith808 wrote, FARR and Everything only partly overlap in features. Everything finds any file on NTFS drives instantly. Raw power! But Everything lacks the kind of custom filters and actions that the FARR aliases feature offers. I think both programs are great.

97
Yeah you're thinking of Settings > Keyboard > Delay search start
delay search option.png
I've tried it and it seems there is a small delay in showing the result also when an alias regex is matched with that option on, which I don't want. (Though that might be an illusion on my part - mouser can you say if that delay happens also when an alias regex match is detected?)

98
In FindAndRunRobot version 2.234.01 mouser added a useful alias command called appcapresults

appcapresults runs an external program, waits for it to output to stdout and then display that output (if correctly formatted) as FARR results lines.

This post shows examples on how to use it together with AutoHotkey to generate a results list in FARR.

Code: Autohotkey [Select]
  1. SetWorkingDir %A_ScriptDir%
  2.  
  3. ; example AutoHotkey script for use with FARR appcapresults
  4.  
  5. ; prepare a results list
  6. ; each line adheres to FARR's format for lines in alias results
  7. ; note: must have a blank line at the end, otherwise the last text line won't show in FARR
  8. Results =
  9. (
  10. Notepad | C:\Windows\System32\notepad.exe
  11. Paint | C:\Windows\System32\mspaint.exe
  12.  
  13. )
  14. ; use fileappend with * to write the list to stdout
  15. FileAppend, % Results , *

1. Save the above script as C:\folder\example.ahk and compile to C:\folder\example.exe

2. Next create a FARR alias
alias name: appcapresults example
alias regex: ^appcap$
alias results:
example | appcapresults C:\folder\example.exe

After that you can type "appcap" in FARR and press enter to get something like this

appcap.png

To make the alias trigger automatically, without Enter, you can change the alias to
example | dolaunch appcapresults C:\folder\example.exe

That's the basics. But this opens up the possibility of complex, conditional aliases. Some possibilities:
- Have the script present different results lists based on the current day/time
- Pass the %lasthwnd% parameter from FARR to the script and have script present different results depending on what window was active before FARR. For example we could make the alias "help" and have it show our own customized help hints based on what application is active. Related earlier post.
- Another example is to have the script search Everything via its SDK and display the search results in FARR, in effect creating an alternative Everything plugin for FARR. This works, though I don't have the code cleaned up enough to post it yet.


edit:

More complex example: alias results conditional on the active window

Code: Autohotkey [Select]
  1. SetWorkingDir %A_ScriptDir%
  2.  
  3. ; complex example conditional AutoHotkey script for use with FARR appcapresults
  4.  
  5. ; window id for active window as parameter sent from FARR
  6. LastHwnd := A_Args[1]
  7.  
  8. ; if active window is Firefox
  9. If LastHwnd and WinExist("ahk_exe Firefox.exe ahk_id " LastHwnd)
  10. {
  11.   Results =
  12.   (LTrim
  13.   Google | https://www.google.com/
  14.   Wiki | https://en.wikipedia.org/
  15.  
  16.   )
  17. }
  18.  
  19. ; if active window is MS Paint
  20. If LastHwnd and WinExist("ahk_exe mspaint.exe ahk_id " LastHwnd)
  21. {
  22.   Results =
  23.   (LTrim
  24.   // use FARR sendkeys command to send action shortcuts to MS Paint
  25.   Resize | sendkeys ^w
  26.   Crop selection | sendkeys ^(+x)
  27.  
  28.   )
  29.  
  30. }
  31.  
  32. ; use fileappend with * to write the list to stdout
  33. FileAppend, % Results , *

1. Save the above script as C:\folder\example2.ahk and compile to C:\folder\example2.exe

2. Next create/edit a FARR alias
alias name: appcapresults example2
alias regex: ^appcap$
alias results:
example | appcapresults C:\folder\example2.exe %lasthwnd%

Type "appcap" and press enter over MS Paint and Firefox to get different results

mspaint2.png

firefox.png

GIF of sending the action shortcuts to MS Paint from FARR
https://i.imgur.com/0SE2wDQ.mp4

edit2: improved complex example

99
Find And Run Robot / Re: regex default value if nothing entered
« on: October 12, 2020, 03:24 AM »
Discussion in another thread https://www.donation...ex.php?topic=50563.0 got me thinking...

An alternative way to do what OP here wants withouth using an external AutoHotkey script is to set up multiple aliases, one for each possible use case.

case 1 would be your original example where all four parameters are typed. Let us call that alias 1. We could there use the regex wjamoe suggested which requires all four parameters to be typed.
regex: slicevideo\s+"([^"]+)"\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)
results:
shellexec /k "source file"=$$1 - cut time=$$2 - duration=$$3 - output name=$$4 | ffmpeg.exe -i "$$1" -ss $$2 -c copy -t $$3 -vf "\ffmpeg output\$$4.mp4"

case2 
Say I wanted to sometimes omit the last value "$$4", and if I omitted it then "$$4" would go to the default value of "untitled" so i'd end up spitting out a file "untitled.mp4"
covered by alias 2:
regex: slicevideo\s+"([^"]+)"\s+([^\s]+)\s+([^\s]+)
results:
shellexec /k "source file"=$$1 - cut time=$$2 - duration=$$3 - output name=untitled | ffmpeg.exe -i "$$1" -ss $$2 -c copy -t $$3 -vf "\ffmpeg output\untitled.mp4"

You can create additional sibling aliases for the other cases you want to cover.
The drawback with this approach is that it is unwieldy to overview and if you want to later on e.g. change the ffmpeg path you need to edit multiple aliases.

100
Find And Run Robot / Re: Openstreetmap alias(es)?
« on: October 11, 2020, 06:58 AM »
If you use plus characters "+" instead of spaces then it works as is. For example try searching
dir yonkers+ny long+island+ny
That's because FARR will detect the two parts as whole strings and the website will treat + in the URL as spaces.

Alternatively you can tweak the regex pattern in FARR to require quotes around the to and from strings
alias regex:
^dir "(.*)" "(.*)"$
alias results:
To: $$1 From: $$2 | https://www.openstreetmap.org/directions?to="$$1"&from="$$2"

To use that you would type in the FARR searchbox
dir "yonkers ny" "long island ny"

Note that you can keep both aliases, the one which requires quote marks and the one without, active at the same time. Because only one will trigger depending on if you type the quotemarks or not.

That would look something like this
1.png

and

2.png




Pages: prev1 2 3 [4] 5 6 7 8 9 ... 47next