problem with autohotkey when I pass a filename to the script compiled HK006L

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
MVS92
Posts: 6
Joined: 12 Nov 2017, 09:56

problem with autohotkey when I pass a filename to the script compiled HK006L

06 May 2021, 07:18

Hello
I have a problem with autohotkey when I pass a filename to the script compiled HK006L .
If Path + filename > 92 characters , the filename is truncated and AHK can't open the file,
If Path + filename < 93 characters AHK opens the file ( .mp4, .jpg .pdf ......... )
The display at point 2 shows the correct entire filename in the variable F
Can you help me
Thanks for your help

--------------------------------------------------

Point 1 - With a line command, I list all the files in the folder and subfolders and create an XLS file

Code: Select all

dir /s /b>$$.xls
Point 2 - In the XLS file a double clik on one line and the XLM associated macro passes the filename with the complete path to HK06L in the variable F

Code: Select all

 =EXEC("W:\$\$0\$JFCD-W\AHK\HK06L.exe  "&F)
 =MESSAGE(TRUE,"F="&F )
Point 3 - HK06L opens the file

Code: Select all

;===============================================================================================
;        HK06L   
;=============================================================================================
SetTitleMatchMode, 2

    MsgBox  %1%
    Run ,       %1%

Return
User avatar
Smile_
Posts: 858
Joined: 03 May 2020, 00:51

Re: problem with autohotkey when I pass a filename to the script compiled HK006L

06 May 2021, 09:37

For me this works
Msgbox % A_Args.1 or Msgbox % A_Args[1] for first argument, Msgbox % A_Args.2 or Msgbox % A_Args[2] for the second one and so on ...
MVS92
Posts: 6
Joined: 12 Nov 2017, 09:56

Re: problem with autohotkey when I pass a filename to the script compiled HK006L

07 May 2021, 03:08

I have tryed your answer but it is the same. It does'nt work if A_Args.1 or A_Args[1] is longer than 92 Characters
User avatar
Smile_
Posts: 858
Joined: 03 May 2020, 00:51

Re: problem with autohotkey when I pass a filename to the script compiled HK006L

07 May 2021, 03:46

Another option is to append the file path to an external file (not sure how to do with that macro), then load it with FileRead.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, jameswrightesq and 278 guests