Topics - Nod5 [ switch to compact view ]

Pages: [1] 2 3 4 5 6 ... 22next
1
DC Website Help and Extras / cert warning dcmembers
« on: December 07, 2022, 01:45 AM »
I noticed a cert warning when accessing the dcmembers site in Chrome now. Expired 1 december.
warning.png

2
Find And Run Robot / appcap and appcapresults not working for .ahk files
« on: September 12, 2022, 06:11 AM »
appcap and appcapresults do not work for AutoHotkey .ahk files, but they work if we compile the same script to .exe

To reproduce this issue:
1. Save this script as C:\folder\a.ahk
Code: Text [Select]
  1. FileAppend, C:\Windows\System32\mspaint.exe, * ;StdOut
2. right click .ahk and compile, to get a.exe
2. Create new FARR alias
alias name: appcaptest
alias results:
Code: Text [Select]
  1. .ahk test | appcapresults C:\folder\a.ahk
  2. .exe test | appcapresults C:\folder\a.exe
3. try both alias results

Expected effect: both alias results should transform the result list to a link to Paint
Actual effect: ".ahk test" does nothing

This issue has existed for a long time (maybe since appcap was first introduced?) but would be nice to see it fixed (if possible and easy) or to see if anyone knows a workaround on the AutoHotkey side, without compiling the script that is. Mouser, does appcap try to use any file passed to it (and the issue is rather something in Windows) or is there a whitelist in FARR based on extensions or something else?

3
N.A.N.Y. 2021 / NANY 2021: MoveFileHere
« on: December 30, 2020, 10:09 AM »
Application Name MoveFileHere
Version 2022-01-09
Short Description AutoHotkey tool to quickly move newest file from Downloads to the active File Explorer folder in Windows 10.
Supported OSes Windows 10
Web Page https://github.com/nod5/MoveFileHere
Download Link Standalone EXE file  https://github.com/nod5/MoveFileHere/releases
AHK source file   https://github.com/nod5/MoveFileHere/blob/main/MoveFileHere.ahk

MoveFileHere1.png

Description
A very small hotkey tool that I use all the time, now released for NANY in case other people also often move files soon after downloading them and find the sequence Right click, Click "Show in folder", Ctrl+X, Alt+Tab Tab Tab, Ctrl+V way too long :). With MoveFileHere you press F7 to move the latest downloaded file to the active Explorer folder. The hotkey and folder can be changed in settings. Copy and rename MoveFileHere.exe to e.g. MoveFileHere2.exe to set up multiple hotkeys and folders.
See GitHub README for more details.

Note: antivirus tools may incorrectly flag the AutoHotkey compiled .exe file. You can always install AutoHotkey and then compile MoveFileHere yourself from the .ahk source file or simply run the .ahk source directly.

MoveFileHere helps a workflow where we make the browser always download to a fixed Downloads folder and then quickly move the file elsewhere afterwards. Compare that to the workflow of quickly picking a custom download/save folder for each download using Listary or the small SaveAsPathHelper script I quickly made to mimic some Listary features.

After pressing F7 the user accepts the move with Enter, Space or Left Click. To instead cancel the move press Esc, F7 again or wait 2 seconds.

4
This may have been solved before but I didn't find it with search just now.

In FARR settings the search folders page has a field for restricting what to search in the folder.
How do we restrict the search to not show any folders? That is, the search results should show files in the specified folder and in its subfolders, but should not show the subfolders themselves.

search_folders.png

We can include file extensions with "txt;pdf;md" and exclude file extensions with "-mp4;mkv;avi".

But the on screen help text says nothing about folders. Nor does the help page https://www.donationcoder.com/Software/Mouser/findrun/help/searchfolders.htm Is there a syntax for that field to exclude folders? ( 2009 thread requested such syntax. )

I tried "-\" and "-\\" but neither worked.

If the search folder modifier keyword is used in an alias together with dosearch then one workaround is to add "-\" in the alias result line (or manually in the searchbox) to exclude folders. Or alternatively "+." to only include files. Helpfile page on that.

That workaround excludes folders, with one exception it seems: the base folder for the search folder settings is still included. For example in the screenshot above the base folder would be "C:\FARR\farr-tldr". But I noticed that if we in the alias instead add "-\\" (two slashes instead of one) then the base folder is also excluded. Though that seems undocumented behaviour.

5
Find And Run Robot / FARR mini weather report from wttr.in
« on: November 19, 2020, 11:55 AM »
Wttr is a fun and fast URL based command line weather report tool.
Background and syntax here https://github.com/chubin/wttr.in

This post describes how to show wttr weather as text directly in the FARR searchbox.

wttr.gif

Step 1. create a FARR alias
name: weather
regex: ^(weath|weat|wea)$
result: weather | appcap "C:\folder\FARR_weather_helper.exe"

Step 2. prepare helper AutoHotkey script
- Save code to C:\folder\FARR_weather_helper.ahk
- Modify the wttr URL in the code: which location? what data to show? language? extra text?
- Compile the script to an .exe file (necessary since FARR's appcap doesn't work if we run .ahk scripts uncompiled, it seems)
Code: Autohotkey [Select]
  1.  
  2. ; FARR_weather_helper.ahk
  3. ; 2020-11-19 by Nod5
  4. ; helper script to show weather from wttr.in in FARR searchbox
  5. ; wttr details and syntax at https://github.com/chubin/wttr.in
  6.  
  7. ; prepare wttr URL (must escape each % character with `)
  8. vUrl := "https://wttr.in/london?format=`%c+`%t+`%C"
  9. ; example output: ☀️ +9°C Sunny
  10.  
  11. ; download weather page to variable
  12. vString := urlDownloadToVar(vUrl)
  13.  
  14. ; replace FARR searchbox string with weather string via clipboard paste
  15. ; clipboard pastes all at once so won't trigger other aliases
  16. vBackup := ClipboardAll
  17. Clipboard := vString
  18. Send ^a^v
  19. sleep 500
  20. Clipboard := vBackup
  21. vBackup := ""
  22.  
  23.  
  24. ; function: dowload URL and return it as variable
  25. UrlDownloadToVar(url, raw :=0)
  26. {
  27.   ; prefix https:// if not found
  28.   if( !regExMatch(url,"i)https?://") )
  29.     url := "https://" url
  30.   try
  31.   {
  32.     hObject:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
  33.     hObject.Open("GET",url)
  34.     hObject.Send()
  35.     return raw ? hObject.ResponseBody : hObject.ResponseText
  36.   }catch err{
  37.       MsgBox % err.message
  38.   }
  39.   return 0
  40. }

Alternatives
Here are some alternative ways to use wttr in FARR
  • Load the wttr URL as embedded webpage in FARR
  • Run a script to get the URL weather text and show as a FARR results line via appcapresults
  • Run a script to get the URL weather text and show it in FARR searchbox via FARR's command line parameter -search
But in all these three cases FARR does not show the unicode weather emoji correctly.
However wttr also has options for richer output formats such as multiline or even mapped weather reports as .png images, and that could probably look quite nice in FARR's HTML view.

Pages: [1] 2 3 4 5 6 ... 22next
Go to full version