Sorry, I searched but found nothing.
I know that internal association is for double click or enter-key use.
But I would like to use a application, once defined in internal association, for use as button command and icon too.
[Associations]
Filter6=*.ahk
Filter6_open=%COMMANDER_PATH%\TOOLs\AHK\AutoHotkey.exe "%1"
Command: <ahk> "%COMMANDER_PATH%\TOOLs\AHK\script.ahk"
Parameter:
Start path:
Icon file: <ahk>
Tooltip: Execute script with application defined in internal association for AHK extension
Note: I think I know other ways, but it have to be a button, since the called script may depend on line position or selection.
Also I already use different ways like
Command: "%COMMANDER_PATH%\AutoHotkey.exe" "%COMMANDER_PATH%\TOOLs\AHK\script.ahk"
or do copy&paste existing buttons, but this is cumbersome to use, and I have to do this for every script again.
If there is no solution yet, I will make a suggestion post.
How to use "internal association" for a button command?
Moderators: white, Hacker, petermad, Stefan2
Re: How to use "internal association" for a button command?
I don't understand, why you do not create an extended command for the script you want to execute?
Re: How to use "internal association" for a button command?
Would be fine too.
How would that work?
[em_A]
cmd=ahk.exe
para=%1
Button
cmd=em_A "D:\rive\path to\script.ext"
Can you help me please?
I want to execute every script with a specific application, without the need to insert the path to that app every single time.
The app I had already specified as internal association and works on double clicking, but I can't use that IA as button command right now.
Spoiler
usercmd.ini
---------------------------
[em_A]
cmd=%Commander_Path%\TOOLs\AHK\AutoHotkey.exe
param=%1
button=%Commander_Path%\TOOLs\AHK\AutoHotkey.exe
---------------------------
X.ahk
---------------------------
msgbox huhu
---------------------------
Button code (load the em command via magnifying glass button!!!)
-------------------------------------------
TOTALCMD#BAR#DATA
em_A c:\temp\X.ahk
%Commander_Path%\TOOLs\AHK\AutoHotkey.exe
Test with em_A and c:\temp\X.ahk
-1
-------------------------------------------
Message
---------------------------
Total Commander
---------------------------
File not found!
em_A c:\temp\X.ahk
"Das System kann die angegebene Datei nicht finden."
---------------------------
OK
---------------------------
---------------------------
[em_A]
cmd=%Commander_Path%\TOOLs\AHK\AutoHotkey.exe
param=%1
button=%Commander_Path%\TOOLs\AHK\AutoHotkey.exe
---------------------------
X.ahk
---------------------------
msgbox huhu
---------------------------
Button code (load the em command via magnifying glass button!!!)
-------------------------------------------
TOTALCMD#BAR#DATA
em_A c:\temp\X.ahk
%Commander_Path%\TOOLs\AHK\AutoHotkey.exe
Test with em_A and c:\temp\X.ahk
-1
-------------------------------------------
Message
---------------------------
Total Commander
---------------------------
File not found!
em_A c:\temp\X.ahk
"Das System kann die angegebene Datei nicht finden."
---------------------------
OK
---------------------------
Re: How to use "internal association" for a button command?
You have to replace %1 with %P%N
More over i think you don't need to create Ex command, e.g.
create another button for other programs
Code: Select all
[em_A]
cmd=%Commander_Path%\TOOLs\AHK\AutoHotkey.exe
param=%P%N
button=%Commander_Path%\TOOLs\AHK\AutoHotkey.exe
More over i think you don't need to create Ex command, e.g.
Code: Select all
TOTALCMD#BAR#DATA
%Commander_Path%\TOOLs\AHK\AutoHotkey.exe
%P%N
%Commander_Path%\TOOLs\AHK\AutoHotkey.exe
AutoHotkey
0
-1
Re: How to use "internal association" for a button command?
Thanks for the help ts4242.
As it seams I couldn't explain my issue clear enough to make myself understandable.
As it seams I couldn't explain my issue clear enough to make myself understandable.