Re: lua script for documents manger
Posted: Sun Jan 16, 2022 12:24 pm
Thank you so much. 

I know slightly less than diddly squat about what AHK can do ... but ... is it possible for AHK to run moho and open the files?synthsin75 wrote: ↑Sat Jan 15, 2022 8:51 pm
1. Have the Lua script open all the files in Moho and launch the AHK script.
Yes, AHK could open Moho and all the files. Then you'd just have it send the shortcut for the Lua script that adds the comp, saves, and closes the active tab for each file.hayasidist wrote: ↑Sun Jan 16, 2022 12:27 pmI know slightly less than diddly squat about what AHK can do ... but ... is it possible for AHK to run moho and open the files?synthsin75 wrote: ↑Sat Jan 15, 2022 8:51 pm
1. Have the Lua script open all the files in Moho and launch the AHK script.
one "advantage" of Moho is that it opens a new tab (and doesn't start a new instance in a new window) when run many times from (e.g.) CMD>
so a loop in AHK of "run moho file<n>" will open tabs
===
or just an AHK loop of
(runwait) open the next file, run the LUA script, save the file, quit moho ??
Can AHK call another AHK script?synthsin75 wrote: ↑Sun Jan 16, 2022 8:23 pm
Yes, AHK could open Moho and all the files. Then you'd just have it send the shortcut for the Lua script that adds the comp, saves, and closes the active tab for each file.
You'd either have to add enough wait time, between AHK sending the next Lua shortcut to account for the CPU being slow or busy, or you just have the Lua script invoke the AHK script again, once it's done with each file.
And to be fair, you could probably do the same with Python as you can with AHK.
Yeah, AHK can call another AHK script, even passing arguments. You can even invoke an AHK script from Lua, passing arguments.hayasidist wrote: ↑Mon Jan 17, 2022 1:56 pm Can AHK call another AHK script?
If so, could it use a "run and wait" to fire off the LUA?
Or maybe the LUA can set a "Done" flag that the AHK script can poll?