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 


How Does Memscan.OnGuiUpdate Work

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Wed Apr 19, 2017 1:49 pm    Post subject: How Does Memscan.OnGuiUpdate Work Reply with quote

Code:


function MemScanDone()


 Results.initialize()
 print(Results.Count)
 T.Destroy()


end

 MyForm=createForm()
 MyForm.Width = 800

 MyScanProgressBar = createProgressBar(MyForm)  --- THis is not working like the mainform scan
 MyScanProgressBar.Width = 600

 MemCheck = createMemScan(MyScanProgressBar)
 MemCheck.firstScan(soExactValue, vtString, rtRounded, '@Bubbles', 'Second Value' ,0 ,0x7fffffffffffffff ,protectionflags ,fsmAligned ,alignmentparam ,false,false, false, true);
 MemCheck.OnScanDone = MemScanDone

 ---a,b,c = MemCheck.getProgress()  -- NOPE

--OnGuiUpdate: function(memscan, TotalAddressesToScan, CurrentlyScanned, ResultsFound) - Called during the scan so you can update the interface if needed --- HOW?????????


function OK(memscan, TotalAddressesToScan, CurrentlyScanned, ResultsFound) -- Well IDFK

 print(memscan)
 print(TotalAddressesToScan)
 print(CurrentlyScanned)
 print(ResultsFound)

end

MemCheck.OnGuiUpdate = OK


function JA()
 print(a,b,c) --- Nope
 --OK()
 OK(MemCheck,0x7fffffffffffffff)  --- LOL NOPE
end


Results = createFoundList(MemCheck)
Results.deinitialize()
MemCheck.FoundList = Results


T = createTimer(MyForm)
T.Interval = 100
T.OnTimer = JA







OK short explanation. Progressbar for Created scan does not behave like MainForm Progress Bar? A Search is called then the progressbar remains at full for a long periodof time
waiting on results. Can Someone show me how to get


MemCheck.getProgress()

MemCheck.OnGuiUpdate



Working. I am at a complete loss.

Thank You.

_________________
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 342

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

PostPosted: Wed Apr 19, 2017 2:08 pm    Post subject: Reply with quote

set MyScanProgressBar.Max to 100 before the scan
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
akumakuja28
Master Cheater
Reputation: 16

Joined: 28 Jun 2015
Posts: 432

PostPosted: Wed Apr 19, 2017 3:03 pm    Post subject: Reply with quote

Code:
 print(MyScanProgressBar.Max)  ----> 100
 MyScanProgressBar.Max = 100

Defaulted to 100


Code:
 local P = getMainForm().ProgressBar1
 print(P.Max)   ---->      100

Its 100 for MainForm

Code:
 MyScanProgressBar.Max = 2000


STOPS Halfway when scan is returned. Implying the math in "createMemScan('PROGRESSBAR')" is calculating on a max 1000????



Thank you for the fast reply DB. Fixed the issue.


May I ask for an example of how to use MemCheck.getProgress() and MemCheck.OnGuiUpdate. Just for the sake of my sainity

Smile.

_________________
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 342

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

PostPosted: Wed Apr 19, 2017 3:42 pm    Post subject: This post has 1 review(s) Reply with quote

as documented and as you expected, but only works on github/beta builds. (not in 6.6) so if you use 6.6, you'll go insane anyhow
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
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