21
N.A.N.Y. 2019 / Re: NANY 2019: Shorthand 3_2
« on: January 06, 2019, 09:20 AM »I downloaded the 3.2.0.27 version and tried to execute it. That experience warranted the following suggestions:
- the content of the 'start.bat' file contains / as folder separator. That didn't fly on this version of Windows (10.0.16299 Enterprise edition), had to be \.
- the content of the 'start.bat' file could be improved upon:
@ECHO OFF
SET ShortHandFolder=%~dp0
START %ShortHandFolder%app\AHKv2_x32.exe %ShortHandFolder%shorthand3_ahk2.ahk
SET ShortHandFolder=
- Now the folder you executed the script in, is captured and there is no way for Windows to get confused about where to look for files. The last line is there to clean up the content of the variable and emptying variables causes them to be removed from memory.
- Do not use quotes |(in the START line) if AHK has never been installed on the system. Windows 10 will ask you which application it needs to use to execute the ahk script (even though that is clearly specified).
(caveat: I never use folder names with spaces in it. Not in file names either if I can help it.)
- All my portable applications are stored in a separate folder not located on the C:\ partition. Same as my data. I'm weird that way. So I had to add these partitions to the ini file myself. Maybe I overlooked things, but I didn't find an option to add those partitions in the GUI. Not that big of a deal though.
After these changes it did work as expected. So thanks for a nice piece of software.-Shades (January 06, 2019, 09:04 AM)
Thank you, I will investigate and fix it where I can. Comments and feedback are much appreciated!
update
For testing purposes, I made sure my folder has spaces in it. Your batch file suggestion therefore did not work as it was stated. I've replaced it with the following:
@echo OFF
SET ShortHandFolder=%~dp0
START "" "%ShortHandFolder%app\AHKv2_x32.exe" "%ShortHandFolder%shorthand3_ahk2.ahk"
SET ShortHandFolder=
SET ShortHandFolder=%~dp0
START "" "%ShortHandFolder%app\AHKv2_x32.exe" "%ShortHandFolder%shorthand3_ahk2.ahk"
SET ShortHandFolder=
I've tried renaming the extension to one that has no associated programs (.ahk3), and the batch-script worked. Maybe I misunderstood your remark regarding the use of quotes in the start line?
My OS is on a separate partition, as are my programs and my files/scripts.
Can you elaborate what you mean when you had to "add those partitions to the ini file"?