Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
function key_macro()
-- macro only works for read/write documents.
if (is_read_only() == 1) or (is_document() == 0) then
message("This macro can only be used with a writable document.")
beep()
return
end
-- I am not sure it this is the behaviour you are after
if (is_marked() == 1) then
message("This macro would delete that marked area.")
beep()
return
end
screen_update_disable()
-- save the current cursor
cursor_save()
-- write out the current cursor (column) value
write(string.format("%d", get_cursor_pos()))
-- restore cursor
cursor_restore()
screen_update_enable()
end
key_macro() -- run the macro
You will just need to save this to the cursor.lua file in the zScript folder and then bind that macro to the keyboard.