I'm trying to create a macro that will open one of my desktop apps from within KM. I've tried the exec
command, but so far, the only command line that works is exec("explorer.exe");
Other EXEs don't open, even if I provide the exact path for them. What's especially important here, however, is that I need to launch the shortcut to the app, not the executable itself, because the app depends on the properties of the shortcut to run properly.
In Windows, the path to the shortcut would look like this:
Again in Windows, if I specify MemPad.exe instead, the app will start up, but it will look for a data file in the same folder as the app, which is not where I store it. I tried using that command line anyway in my macro, but there was no response at all.
I changed the backslashes in the command to forward slashes and finally got the app to come up, but only the executable file itself. The shortcut (MemPad.lnk) wouldn't open. Then I created a batch file that first changes to the data folder, then starts MemPad.exe through its full path to the app folder. It worked. For some reason, the exec
command will open batch files, but what a workaround: A macro calling a batch file! Think I could get the macro to change directories on its own?
Using KM 75.0 on Windows 7 (x86)
My personal Website. No ads, no scripts, no cookies -- no kidding!
Edited 2 time(s). Last edit at 04/24/2016 08:21AM by foliator.