lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I am trying to set a MessageBox to ask a question.  If the question 
is "no" then it goes to the dofile, but it does not work. Help.

function DoOnTestEvent(option)
	--	Called by Touch 1 with the following options:
	--		option = 1: start of run
	--		option = 2: LV Test Starts 
	--		option = 3: End of all tests 
	--				
if option == 1 then
sMessageText = "Is this a New Cable?"
sButtonNum1 = "Yes"
sButtonNum2 = "No"
local sButtonNum = MessageBox(sMessageText,sButtonNum1,sButtonNum2)
if sButtonNum == 2 then dofile(M:\Badrpt.lua)
end
return GoodCableReport
return BadCableReport
end
end