Page 1 of 1
Cancel in "user_input"
Posted: Thu Dec 14, 2006 7:29 am
by dmaon
How do I check in a mcro if the user pressed Cancel in a dialog created by "user_input"?
By the way - did you succeed to recreate the bug were the program returned a wrong left marked column - as I described in response to you?
Posted: Thu Dec 14, 2006 11:25 pm
by jussij
How do I check in a mcro if the user pressed Cancel in a dialog created by "user_input"?
Code: Select all
function key_macro()
-- the initial value
local nill = ""
-- ask for a user supplied decimal number
local value = user_input("Some Value:", nill)
if string.len(value) > 0 then
message("User value was '" .. value .. "'.")
else
message("Operation cancelled by user!")
end
end
key_macro() -- run the macro
By the way - did you succeed to recreate the bug were the program returned a wrong left marked column - as I described in response to you?
Unfortunately I could not replicate the bug at this end
Cheers Jussi