I'll be writing a macro to bind to the appropriate key to do this. I'm assuming that I've got to parse the line (or marked area) to find the filename myself, right? Any other ideas than that approach? How does Zeus do that parsing, and is it possible for me to see (in my macro) what it thinks is the file name?
Also, what does FileOpenAssociateInLine do? It doesn't seem to be in the help file, but I see it in the keyboard mapping dialog.
Zeus uses a whole bunch of regular expressions to try and find the filename.How does Zeus do that parsing
You could try using the Lua pattern matching. The Lua code would look something like this:is it possible for me to see (in my macro) what it thinks is the file name?
Code: Select all
current_line = get_line_text() local index, length, filebase = string.find(current_line, "COPY ([%w:]+)") if filebase ~= nil then file_name = filebase .. ".CPY" message("File found in current line: " .. file_name) --file_open(file_name) else message("No file found in current line.") end
Also, what does FileOpenAssociateInLine do?
It opens the file in the associated Windows application.
I will look for fix that.It doesn't seem to be in the help file, but I see it in the keyboard mapping dialog.