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 


CEnhancer - Improvements for CE's inbuilt functions
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
Branimir
Advanced Cheater
Reputation: 0

Joined: 12 May 2015
Posts: 58

PostPosted: Mon Mar 22, 2021 3:56 pm    Post subject: Re: CEnhancer - Improvements for CE's inbuilt functions Reply with quote

predprey wrote:
No, I believe you, but I'm not sure which part of the code is triggering that error. The extension is kind of hacky so I need to replicate the environment and error in order to find out which part of the ASM code broke, so even a video wouldn't help with that. Did the extension work before CE7.2 for you? Like 6.8.3 and 7.0?


I haven't used your Batch Edit Hotkeys extension prior to 7.2.
Do you want me to install those older versions of CE and test?

Edit: Just saw your edited reply. I reset the settings, but the error is still there.


Last edited by Branimir on Mon Mar 22, 2021 4:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Mon Mar 22, 2021 4:06 pm    Post subject: Re: CEnhancer - Improvements for CE's inbuilt functions Reply with quote

Branimir wrote:
predprey wrote:
No, I believe you, but I'm not sure which part of the code is triggering that error. The extension is kind of hacky so I need to replicate the environment and error in order to find out which part of the ASM code broke, so even a video wouldn't help with that. Did the extension work before CE7.2 for you? Like 6.8.3 and 7.0?


I haven't used your Batch Edit Hotkeys extension prior to 7.2.
Do you want me to install those older versions of CE and test?


Yea, let's exhaust all easier options before moving onto other approaches. You could try resetting settings for CE7.2 before trying the older versions.
Back to top
View user's profile Send private message
Branimir
Advanced Cheater
Reputation: 0

Joined: 12 May 2015
Posts: 58

PostPosted: Mon Mar 22, 2021 4:10 pm    Post subject: Re: CEnhancer - Improvements for CE's inbuilt functions Reply with quote

predprey wrote:
Yea, let's exhaust all easier options before moving onto other approaches. You could try resetting settings for CE7.2 before trying the older versions.


I edited my earlier reply. I reset the settings...and still got the error.
I'll be downloading and installing 7.0 now. I'll edit this reply with the results.

Edit: Okay. I downloaded 7.0 from this github link:
https://github.com/cheat-engine/cheat-engine/releases/tag/7.0

Here are my findings:

Now cheatengine-x86_64.exe is giving me the "Failure determining what deleteHotkey_searchedAOB means" error.
But no Access violation error.

cheatengine-i386.exe doesn't give me any error...but the extension doesn't work.
It only changes the hotkey that is on the dark blue line instead of all selected ones.

For both executables:
1) I highlight multiple addresses without hotkeys
2) Right-click on the main/dark blue one
3) Left-click on "Set hotkeys"
4a) Left-click on "Create hotkey" -> Creates it normally
4b) Right-click on a hotkey and choose "Delete" -> Deletes it normally

But as mentioned above, it only modifies/creates that single hotkey.
It's as if the extension isn't in the autorun folder, even though it is.

YAWN... I'm getting rather sleepy now. If you need me, I'll reply tomorrow. snores
Back to top
View user's profile Send private message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Mon Mar 22, 2021 5:58 pm    Post subject: Re: CEnhancer - Improvements for CE's inbuilt functions Reply with quote

Branimir wrote:
Now cheatengine-x86_64.exe is giving me the "Failure determining what deleteHotkey_searchedAOB means" error.
But no Access violation error.


There's a 7.0 version of the extension in dropbox, can you try that version with CE7.0 instead?
Back to top
View user's profile Send private message
Branimir
Advanced Cheater
Reputation: 0

Joined: 12 May 2015
Posts: 58

PostPosted: Tue Mar 23, 2021 1:43 am    Post subject: Re: CEnhancer - Improvements for CE's inbuilt functions Reply with quote

predprey wrote:
There's a 7.0 version of the extension in dropbox, can you try that version with CE7.0 instead?


The 7.0 extension from dropbox works perfectly with CE 7.0.

Hopefully that helps you isolate the problem on 7.2.
Do note that I will be reinstalling CE 7.2 now.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Mar 23, 2021 2:33 am    Post subject: This post has 1 review(s) Reply with quote

Perhaps you can do what you need to do without AA scripts in 7.2

example:
Code:

function forEachAndFutureForm(classname, func)
  local i
  for i=0,getFormCount()-1 do
    local f
    f=getForm(i)
    if f.ClassName==classname then
      func(f)
    end
  end

  registerFormAddNotification(function(f)
    if classname==f.ClassName then
      f.registerFirstShowCallback(function()
        func(f)
      end)
    end
  end)
end

forEachAndFutureForm('THotKeyForm',function(f)
  printf('Hotkey form created. Name='..f.name)
  --check which memoryrecords are currently selected and store it or something...
  local oldOK=f.BitBtn1.OnClick
  f.BitBtn1.OnClick=function(s)
    print("Do stuff before ok click")
    oldOK(s)
    print("Do stuff after ok click")
  end

  --f.btnApply.OnClick is also a thing
end)

_________________
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


Last edited by Dark Byte on Wed Mar 24, 2021 2:01 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Branimir
Advanced Cheater
Reputation: 0

Joined: 12 May 2015
Posts: 58

PostPosted: Tue Mar 23, 2021 3:43 am    Post subject: Reply with quote

Dark Byte wrote:
Perhaps you can do what you need to do without AA scripts in 7.2


Dark Byte?! Shocked

H-Hello there. I get this error after using your code:
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Tue Mar 23, 2021 4:46 am    Post subject: Reply with quote

Honestly the problem lies within the aobscanmodule that it targets, in my case,
Quote:
cheatengine-x86_64.exe
instead of
Quote:
cheatengine-x86_64-SSE4-AVX2.exe
.
edit: And in the main script, the nearby module allocation.

Open the script in notepad do search and replace and save it.
It works perfectly fine (with exception of a small bug? that causes nothing)

The bug I'm speaking of is at line 491.
Code:
machineCode = readIntegerLocal(searchedAddr+0x1E)

should be
Code:
machineCode = readBytesLocal(searchedAddr+0x1E,1)


examined your code, checking the targeted offset shown as a single byte (50h in CE 7.2), but it fetches as well some of the instruction bytes.
thus you end up with
Code:
mov rax,[rax+558B4850]

instead of
Code:
mov rax,[rax+50]



But did not notice any 'bugs' or problems with your code, works flawlessly, will try to port to a 32bit version.
[/code]

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Tue Mar 23, 2021 1:28 pm    Post subject: Reply with quote

Branimir wrote:
The 7.0 extension from dropbox works perfectly with CE 7.0.

Hopefully that helps you isolate the problem on 7.2.
Do note that I will be reinstalling CE 7.2 now.


Sorry, that I can't help you this time. I suspect it may have to do with your specific environment, can you post your PC specifications and OS again and I'll see if I can setup a VM to test if it can replicate your error, when I am less busy? Meanwhile I'll look into the source and see what changed between then I now and see if I can pinpoint the error through there.

Dark Byte wrote:
Perhaps you can do what you need to do without AA scripts in 7.2


Thanks for your help as always, very much appreciated. I'll see if I can apply this and make the mechanism to be less hacky. Is there anyway to create, edit and delete the MemoryRecordHotkey class? I can probably use your callback to monitor for changes for the main selected record but I still need to perform those functions for the entire selection of memory records in the OnClick function part.

DaSpamer wrote:
Honestly the problem lies within the aobscanmodule that it targets, in my case,
Quote:
cheatengine-x86_64.exe
instead of
Quote:
cheatengine-x86_64-SSE4-AVX2.exe
.
edit: And in the main script, the nearby module allocation.


Sorry for the trouble, I'll fix those when I have the time. Embarassingly, this hacky extension requires a lot of effort for maintenance everytime there's an update, but I don't have a lot of spare time to maintain my stuff nowadays, so thanks for offering to port to 32bit. That wasn't even in my sights as I reckoned no one uses 32bit nowadays and is just additional effort to maintain.

Actually I only meant for it to work on "cheatengine-x86_64.exe" instead of "cheatengine-x86_64-SSE4-AVX2.exe" since I don't have a SSE4 AVX2 capable computer. But I'm glad it works fine for that too based on your report with minor edits. I could probably add a check in to dynamically change the aobscanmodule target.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Mar 23, 2021 4:11 pm    Post subject: This post has 1 review(s) Reply with quote

Sorry, in 7.2 and earlier it's f.BitBtn1.OnClick . in 7.3 it's btnOK. ( but BitBtn1 will keep working as well in 7.3)

Quote:

thanks for your help as always, very much appreciated. I'll see if I can apply this and make the mechanism to be less hacky. Is there anyway to create, edit and delete the MemoryRecordHotkey class? I can probably use your callback to monitor for changes for the main selected record but I still need to perform those functions for the entire selection of memory records in the OnClick function part.


Code:

memoryrecord class:
method
  createHotkey({keys}, action, value OPTIONAL, description OPTIONAL): Returns a hotkey object

action can be
mrhToggleActivation(0): Toggles between active/deactive
      mrhToggleActivationAllowIncrease(1): Toggles between active/deactive. Allows increase when active
      mrhToggleActivationAllowDecrease(2): Toggles between active/deactive. Allows decrease when active
      mrhActivate(3): Sets the state to active
      mrhDeactivate(4):  Sets the state to deactive
      mrhSetValue(5):  Sets a specific value to the value properyy (see value)
      mrhIncreaseValue(6):  Increases the current value with the value property (see value)
      mrhDecreaseValue(7):  Decreases the current value with the value property (see value)


destroy the hotkey to delete it, and you can use the properties of the MemoryRecordHotkey class to modify (check out celua.txt)

_________________
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
Branimir
Advanced Cheater
Reputation: 0

Joined: 12 May 2015
Posts: 58

PostPosted: Tue Mar 23, 2021 9:22 pm    Post subject: Reply with quote

predprey wrote:
Sorry, that I can't help you this time. I suspect it may have to do with your specific environment, can you post your PC specifications and OS again and I'll see if I can setup a VM to test if it can replicate your error, when I am less busy?


Sure. Here you go:
OS - Windows 7 Ultimate SP1 64-bit
CPU - Intel Core i7 4790K
GPU - Msi GeForce GTX 760
RAM - Kingston HyperX Savage DDR3 16GB (2x8)
PSU - EVGA Supernova 750
HDD1 - Samsung 850 EVO 120GB (System)
HDD2 - WD Blue 500GB (12 years old. Still works.)
HDD3 - WD Blue 1TB (Games 'n' stuff)
MOBO - ASRock Z97 Anniversary

It is a rather old PC, I know. But it works fine. Cool

PS:
I do not know how much information you need for that "VM" of yours, so I added everything except the fans, the CPU cooler and the CD/DVD drive.
If you need those as well, I'll edit this post.


Dark Byte wrote:
Sorry, in 7.2 and earlier it's f.BitBtn1.OnClick . in 7.3 it's btnOK. ( but BitBtn1 will keep working as well in 7.3)


I changed it to f.BitBtn1.OnClick per your reply, and I no longer get any errors.
However, your code still doesn't work. Only the main/dark blue address gets the hotkey, instead of all highlighted (blue) ones.
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Wed Mar 24, 2021 9:32 am    Post subject: This post has 1 review(s) Reply with quote

@Branimir mind testing the script attached? either place in auto run or execute it in Lua script window.

You need to select the addresses (highlight them), and then add/remove/update hotkeys.

predprey wrote:

Sorry for the trouble, I'll fix those when I have the time. Embarassingly, this hacky extension requires a lot of effort for maintenance everytime there's an update, but I don't have a lot of spare time to maintain my stuff nowadays, so thanks for offering to port to 32bit. That wasn't even in my sights as I reckoned no one uses 32bit nowadays and is just additional effort to maintain.

Actually I only meant for it to work on "cheatengine-x86_64.exe" instead of "cheatengine-x86_64-SSE4-AVX2.exe" since I don't have a SSE4 AVX2 capable computer. But I'm glad it works fine for that too based on your report with minor edits. I could probably add a check in to dynamically change the aobscanmodule target.

I've made the 32 bits version, might be handy for some people, analyzed your code.
I've added a getAddress if/else for x86-64 and the SSE4-AVX2, or the i386 version, if not found script will not proceed. then I've added a different initialization script (for the 32bit).

Overall I've tested it on on i386,x86-64 and SSE4-AVX2 and everything works great.

I could see that making it was quite of a pain, as mimicking (without re-creating the wheel) was also a bit of pain Smile.

I've attached here the new script, you can update main post.



Batch Edit Hotkeys [32_64 bits].lua
 Description:

Download
 Filename:  Batch Edit Hotkeys [32_64 bits].lua
 Filesize:  28.21 KB
 Downloaded:  528 Time(s)


_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Oxijen
Expert Cheater
Reputation: 0

Joined: 07 May 2020
Posts: 163
Location: On The Moon

PostPosted: Wed Mar 24, 2021 9:36 am    Post subject: Reply with quote

post from 2016 weeeeeeeeeeeeee
_________________
I can see you Hitler
Especially When I am On the Moon!!
You are Right now in cheat engine forum Wink
Back to top
View user's profile Send private message
Branimir
Advanced Cheater
Reputation: 0

Joined: 12 May 2015
Posts: 58

PostPosted: Wed Mar 24, 2021 10:52 am    Post subject: Reply with quote

DaSpamer wrote:
@Branimir mind testing the script attached? either place in auto run or execute it in Lua script window.

You need to select the addresses (highlight them), and then add/remove/update hotkeys.


Placed the file in the autorun folder of Cheat Engine 7.2.

Results:

cheatengine-x86_64.exe - Access violation
cheatengine-x86_64-SSE4-AVX2.exe - Access violation
cheatengine-i386.exe - works perfectly

Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Wed Mar 24, 2021 1:05 pm    Post subject: Reply with quote

That's unfortunate.
Can you try the following:
First remove the file from autorun.

open a CE, add 2 memory records, and assign to each a hotkey.
Copy&paste&execute the script.

Now try first to modify (change key combinations) an existing hotkey of single memory record.
If it goes fine, try now with both of the memory records.

Now try to delete the hotkeys while both memory records are highlighted.

At last, try to add again a hotkey to a single memory record, afterwards try to add to both.


Let me know if access violation went off on any of these.

I'm not quite sure what could cause it in the case of adding a hotkey.
Could be getSelectedRecords accessing wrong offsets.
In the x86-64 script, I've noticed that @predprey has found a single offset (F50h),
In my opinion it is quite large, I've had to go through 4 offsets in the i386 version.
But it also could be different registers from what expected (RCX/RBX/RSI), for instance I had to push and set EDI registers in one procedure as getListViewSelectedIndex was called from two different locations but in one instance EDI contained the memory record address and in other place it is EBX.

So yeah, let me know if any part of the script works.

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 5 of 6

 
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