function msgDialog(text,clsSec)
clsSec=tonumber(clsSec) * 5 -- newT.Interval x 5 = 1 sec
if newT then newT.Destroy() newT=nil end
newT=createTimer() newT.Interval=200 newT.Enabled=false
local clsIndex=0
local attrIndex1=250
local attrIndex2=10
if newDialog then newDialog.Destroy() newDialog=nil end
DP1=getScreenDPI()/96
newDialog=createForm(false)
newDialog.Position="poDesktopCenter"
newDialog.height=55*DP1 newDialog.width=410*DP1
newDialog.PopupMode=0 newDialog.BorderStyle="bsNone" newDialog.ShowInTaskBar="stAlways"
newDialog.setLayeredAttributes(0x000100, 10, LWA_COLORKEY | LWA_ALPHA )
newDialog.Color=0x000100
-------------------------
pnl1=createPanel(newDialog)
pnl1.height=45*DP1 pnl1.width=400*DP1 pnl1.left=5*DP1 pnl1.top=5*DP1
pnl1.BevelWidth=4 pnl1.BevelColor=0x0000FF pnl1.Color=0xE0E0E0
----------------------- msg.lbl1 -----
lbl1=createLabel(pnl1)
lbl1.AutoSize=false
lbl1.height=35*DP1 lbl1.width=390*DP1 lbl1.left=5*DP1 lbl1.top=5*DP1
lbl1.caption=text lbl1.Font.Color=0x0000FF lbl1.Font.Name="Lucida Fax"
lbl1.alignment="taCenter" lbl1.Font.Style="fsBold" lbl1.Font.Size=19*DP1
lbl1.OptimalFill=true
--------------------------------------
newT.OnTimer=function()
if clsIndex==clsSec then
newT.Interval=100
--print("clsIndex: "..clsIndex.."\nattrIndex1: "..attrIndex1)
newDialog.setLayeredAttributes(0x000100, attrIndex1, LWA_COLORKEY | LWA_ALPHA )
newDialog.Color=0x000100
if attrIndex1==0 then
if newDialog then newDialog.Destroy() newDialog=nil end
if newT then newT.Destroy() newT=nil end
else
attrIndex1=tonumber(attrIndex1) - 10
end
else
clsIndex=tonumber(clsIndex) + 1
if attrIndex2~=250 then
attrIndex2=tonumber(attrIndex2) + 30
--print("clsIndex: "..clsIndex.."\nattrIndex2: "..attrIndex2)
newDialog.setLayeredAttributes(0x000100, attrIndex2, LWA_COLORKEY | LWA_ALPHA )
newDialog.Color=0x000100
end
end
end
newDialog.Show()
newT.Enabled=true
end
-- use
--youTrainerName.CEButton1.OnClick=function()
--procesID = getProcessIDFromProcessName("youGame.exe")
-- if (procesID==nil) then
msgDialog("Hack not started Correctly!",8) -- 8 sec visible ..
-- else
-- msgDialog("Everything is fine",8)
-- openProcess(procesID)
-- end
--end
Posted: Sat Apr 08, 2023 12:46 am Post subject: Re: Closing messageDialog automatically
Bricked-Wall wrote:
Hello! I'm using the following function:
Code:
messageDialog("Hack started Correctly")
However, I want the dialog to close automatically, without user input.
Thanks
Just try run script below :
Code:
function customMB(title, texttoshow, time)
local mf = createForm(false)
mf.Caption = title
mf.BorderStyle = 'bsDialog'
mf.AutoSize = true
mf.Position = 'poScreenCenter'
local mlbl = createLabel(mf)
mlbl.Caption = texttoshow
mlbl.BorderSpacing.Around = 20
local t=createTimer(mf)
t.Interval = time
t.OnTimer = function () mf.destroy() end
mf.show()
end
customMB('Hack Checking', 'Hack started Correctly', 5000)
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum