Machsupport Forum

Mach Discussion => Mach4 General Discussion => Mach4 Toolbox => Topic started by: BR549 on June 02, 2014, 04:11:33 PM

Title: ASK user for Password SCRIPT
Post by: BR549 on June 02, 2014, 04:11:33 PM
Here is a sample of a script that ASKS the user for a password and processes the answer. IT uses the WxLUA call    wx.wxGetPasswordFromUser()

local Pword = "FrogLog"
local Pnum = 0

while Pnum <3 do
local Panswer = wx.wxGetPasswordFromUser("What is the Password ? ")
if Panswer == Pword then
            wx.wxMessageBox("The Password is " ..Panswer)
else
            wx.wxMessageBox("Wrong Password")
            Pnum =(Pnum+1)
    end

 end
wx.wxMessageBox(" Call YOUR Supervisor for HELP! ")