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

appcap and appcapresults not working for .ahk files

(1/1)

Nod5:
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 ---FileAppend, C:\Windows\System32\mspaint.exe, * ;StdOut2. right click .ahk and compile, to get a.exe
2. Create new FARR alias
alias name: appcaptest
alias results:

--- Code: Text ---.ahk test | appcapresults C:\folder\a.ahk.exe test | appcapresults C:\folder\a.exe3. 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?

nitrix-ud:
Hello Nod5,

Have u tried something like :
appcapresults "C:\Program Files\AutoHotkey\AutoHotkey.exe" C:\folder\a.ahk

Nod5:
appcapresults "C:\Program Files\AutoHotkey\AutoHotkey.exe" C:\folder\a.ahk
-nitrix-ud (September 28, 2022, 08:32 AM)
--- End quote ---
Thank you, that indeed works! For repeat use we can shorten it by adding a user variable to FARR settings

--- ---ahk=C:\Program Files\AutoHotkey\AutoHotkey.exeand then use this alias result line

--- ---appcapresult "%uservar.ahk%" C:\folder\a.ahk

Nod5:
BTW @mouser it seems chaining setfocus after the appcapresults or fileresults commands doesn't work. For example neither of these

--- ---appcapresults "C:\Program Files\AutoHotkey\AutoHotkey.exe" C:\folder\a.ahk ;;; setfocus mainpanel
fileresults C:\folder\a.txt ;;; sleep 1000 ;;; setfocus mainpanelgets focus to the imported results list.
It would be useful to have focus at the first results list item in this case.

Navigation

[0] Message Index

Go to full version