I'm having trouble running a macro and passing a command line parameter. I have a script whocalls.lua in zScript. When I press F10 and type whocalls LUBIN, I get an error saying error loading script 'c:\Program Files\Zeus\zScript\whocalls.lua LUBIN'. It appears that the "command line" isn't being parsed correctly. The script runs fine with no attempt to pass a parameter - it's programmed to ask if it doesn't get one, but I'd like to cut out the extra step/keystroke.
Is this a bug or am I doing something wrong?
Bill
Macro arguments
The Macro, Execute Script menu does not have an option to supply arguments to the macro.
For example if you save this macro to the c:\temp\test.lua file:
and run the script using the the Macro, Execute Script menu you will see this output:
Menu Text: Macro Argument Testing
Macro Name: c:\temp\test.lua
Arguments: ArgOne ArgTwo
Now if you run the macro using the macro menu you will get this output:
For example if you save this macro to the c:\temp\test.lua file:
Code: Select all
--
-- A Simple Zeus Lua macro
--
function key_macro()
screen_update_disable()
FileNew()
print("Argument #0 " .. argv(0) .. "\n")
print("Argument #1 " .. argv(1) .. "\n")
screen_update_enable()
screen_update()
end
key_macro() -- run the macro
But if you bind the macro to the menu using the Macro, Options menu with the following details:Argument #0 <Unknown argument>
Argument #1 <Unknown argument>
Menu Text: Macro Argument Testing
Macro Name: c:\temp\test.lua
Arguments: ArgOne ArgTwo
Now if you run the macro using the macro menu you will get this output:
Cheers JussiArgument #0 ArgOne
Argument #1 ArgTwo