View previous topic :: View next topic |
Author |
Message |
Dr.Disrespect Grandmaster Cheater
Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Thu Feb 25, 2016 10:17 am Post subject: How to close a messagebox in Lua? |
|
|
I would like to close a messagebox in Lua, something like this:
Code: |
showMessage("test")
sleep(1000)
closeMessagebox <-----------something like that, which closes the "test" message box
|
I couldn't find anything related in the main.lua.
Thanks in advance.
Edit: Does showMessage return a form? I dont think so, but im not sure.
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Dark Byte Site Admin
Reputation: 460
Joined: 09 May 2003 Posts: 25363 Location: The netherlands
|
Posted: Thu Feb 25, 2016 10:42 am Post subject: |
|
|
the showMessage function does not return (won't execute the following code) until the dialog is closed.
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Dr.Disrespect Grandmaster Cheater
Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Thu Feb 25, 2016 10:44 am Post subject: |
|
|
Dark Byte wrote: | the showMessage function does not return (won't execute the following code) until the dialog is closed. |
Thanks for the reply. So, are there other ways to make a message just show up for a limited amount of time?
BTW, where can I find the newest syntax for cheat engine lua? Is it in the main.lua? Thank you.
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
mgr.inz.Player I post too much
Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Feb 25, 2016 11:06 am Post subject: |
|
|
Code: | function myShowMessage(title, texttoshow, time)
local myform = createForm(false)
myform.Caption = title
myform.BorderStyle = 'bsDialog'
myform.AutoSize = true
myform.Position = 'poScreenCenter'
local mylabel = createLabel(myform)
mylabel.Caption = texttoshow
mylabel.BorderSpacing.Around = 20
local t=createTimer(myform)
t.Interval = time
t.OnTimer = function () myform.destroy() end
myform.show()
end
myShowMessage('Warning', 'Something something, lorem ipsum dolor sit amet', 5000) |
_________________
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Dr.Disrespect Grandmaster Cheater
Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Thu Feb 25, 2016 11:09 am Post subject: |
|
|
mgr.inz.Player wrote: | Code: | function myShowMessage(title, texttoshow, time)
local myform = createForm(false)
myform.Caption = title
myform.BorderStyle = 'bsDialog'
myform.AutoSize = true
myform.Position = 'poScreenCenter'
local mylabel = createLabel(myform)
mylabel.Caption = texttoshow
mylabel.BorderSpacing.Around = 20
local t=createTimer(myform)
t.Interval = time
t.OnTimer = function () myform.destroy() end
myform.show()
end
myShowMessage('Warning', 'Something something, lorem ipsum dolor sit amet', 5000) |
|
OMG, you are so great! Thanks a lot!
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|