Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


What code lines to create a continuation box

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Fri Mar 27, 2015 8:15 pm    Post subject: What code lines to create a continuation box Reply with quote

I don't know if this can be down in LUA, but here goes.
I have a table entry that I want to for loop with increasing values, IE
Code:

al= addresslist_GetAddressList()
memrec1 = addresslist_getMemoryRecord(al, 0)--Only item in table currently
for x = 0, 255 do--May need to increase to higher values but that isn't what I need
memoryrecord_setValue(memrec1, x)

bring up a dialog box that pauses the loop until a button is pushed
I can then go into the game, get some info and proceed to the next number

end


Last edited by bknight2602 on Fri Mar 27, 2015 8:43 pm; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25295
Location: The netherlands

PostPosted: Fri Mar 27, 2015 8:41 pm    Post subject: Reply with quote

instead of pausing the loop, you may instead want a dialog with a button, that when pressed execute a function that handles the next iteration of the loop and store the state of the loop in a global variable
_________________
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
View user's profile Send private message MSN Messenger
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Fri Mar 27, 2015 8:45 pm    Post subject: Reply with quote

That probably would work, what code steps would be required, please.
I edited the first post to add the end of code, sorry.
Back to top
View user's profile Send private message Yahoo Messenger
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25295
Location: The netherlands

PostPosted: Fri Mar 27, 2015 9:00 pm    Post subject: Reply with quote

something like this:
Code:

function HandleLoopIteration()
  if x<=255 then
    --do something with memrec1 and x e.g:
    memrec1.Value=x
    x=x+1
  else
    showMessage("End of the loop reached")
    --pauseDialog.hide() or pauseDialog.destroy() pauseDialog=nil
  end
end


memrec1=getAddressList()[0] --Only item in table currently
x=0

pauseDialog=createForm()
pauseDialog.caption="Something"
pauseDialog.Width=150
pauseDialog.Height=50
pauseDialog.position=poScreenCenter


resumeButton=createButton(pauseDialog)
resumeButton.OnClick=HandleLoopIteration
resumeButton.Caption="Resume"


resumeButton.Left=pauseDialog.ClientWidth / 2 - resumeButton.Width / 2
resumeButton.Top=pauseDialog.ClientHeight / 2 - resumeButton.Height / 2

HandleLoopIteration() --do the first iteration

_________________
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
View user's profile Send private message MSN Messenger
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Fri Mar 27, 2015 9:34 pm    Post subject: Reply with quote

Thanks, I was thinking of something totally different.
Back to top
View user's profile Send private message Yahoo Messenger
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Sun Mar 29, 2015 11:37 am    Post subject: Reply with quote

Code:

pauseDialog=createForm()
 pauseDialog.caption="Something"
 pauseDialog.Width=150
 pauseDialog.Height=50
 pauseDialog.position=poScreenCenter


One other question what code line to increase the font of .caption?
I tried several ie:
pauseDialog.caption.Font = 18
pauseDialog.caption.TFont = 18
pauseDialog.TFont = 18
Nothing has changed the original font size.
Back to top
View user's profile Send private message Yahoo Messenger
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Sun Mar 29, 2015 6:06 pm    Post subject: Reply with quote

try
Code:
pauseDialog.Font.Size=20


and this will similarily affect the font size/height
Code:
pauseDialog.Font.Height=20

but setting one will affect another,
I don't know their relationship and their real meaning.

set them zero for default.


UPDATED: oops, it's caption of a form. yes, these won't work as DB said.


Last edited by panraven on Sun Mar 29, 2015 6:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25295
Location: The netherlands

PostPosted: Sun Mar 29, 2015 6:36 pm    Post subject: Reply with quote

i don't think the window title can change it's size.
perhaps you may wish to create a borderless window with no title and place an image at top drawing your custom header

_________________
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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites