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 


Help | Get Number value from TextBox to ASM code

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

Joined: 29 May 2019
Posts: 36

PostPosted: Tue Jun 13, 2023 4:08 am    Post subject: Help | Get Number value from TextBox to ASM code Reply with quote

Trying to take a number value from a TextBox, and put it into ASM Code, it doesn't work, I believe there might be another way,

Can someone please help me fix the code?

Code:
      SkillID = getProperty(UDF1_CEEdit3, "Text")
      autoAssemble([[
        alloc(skill_id_hook,128)
        label(skill_id_return)
        alloc(delay,1)

        delay:
        dw 0
        013CACBC:
        db 90 90 90 90 90 90
        013CACC8:
        db 90 90 90 90 90 90
        013CACE5:
        db 90 E9
        013CADFA:
        jmp skill_id_hook
        nop
        skill_id_return:
        skill_id_hook:
        inc [delay]
        cmp dword ptr [delay], #30 // Set your delay (optional till you don't d/c)
        jne skill_id_return
        mov [delay], 0
        mov ecx,SkillID
        jmp skill_id_return
        013CAE9A:
        db 90 90 90 90 90 90
        013CAEA7:
        jmp 013CAF0C
        dw 9090
      ]])


This is the line where I want to get a number value from a TextBox
Code:
mov ecx,SkillID
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1516

PostPosted: Tue Jun 13, 2023 7:31 am    Post subject: Reply with quote

I have no idea how this will work in ASM.
But there is a test you can try in lua.

Code:
      SkillID = getProperty(UDF1_CEEdit3, "Text")
-- number or string? SkillID = tonumber(UDF1.CEEdit3.Text)
print("SkillID: "..SkillID)
      autoAssemble([[
        alloc(skill_id_hook,128)
        label(skill_id_return)
        alloc(delay,1)

        delay:
        dw 0
        013CACBC:
        db 90 90 90 90 90 90
        013CACC8:
        db 90 90 90 90 90 90
        013CACE5:
        db 90 E9
        013CADFA:
        jmp skill_id_hook
        nop
        skill_id_return:
        skill_id_hook:
        inc [delay]
        cmp dword ptr [delay], #30 // Set your delay (optional till you don't d/c)
        jne skill_id_return
        mov [delay], 0
        mov ecx,]]..SkillID..[[
        jmp skill_id_return
        013CAE9A:
        db 90 90 90 90 90 90
        013CAEA7:
        jmp 013CAF0C
        dw 9090
      ]])

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
gavrielsinvani
Cheater
Reputation: 0

Joined: 29 May 2019
Posts: 36

PostPosted: Tue Jun 13, 2023 11:18 am    Post subject: Reply with quote

AylinCE wrote:
I have no idea how this will work in ASM.
But there is a test you can try in lua.

Code:
      SkillID = getProperty(UDF1_CEEdit3, "Text")
-- number or string? SkillID = tonumber(UDF1.CEEdit3.Text)
print("SkillID: "..SkillID)
      autoAssemble([[
        alloc(skill_id_hook,128)
        label(skill_id_return)
        alloc(delay,1)

        delay:
        dw 0
        013CACBC:
        db 90 90 90 90 90 90
        013CACC8:
        db 90 90 90 90 90 90
        013CACE5:
        db 90 E9
        013CADFA:
        jmp skill_id_hook
        nop
        skill_id_return:
        skill_id_hook:
        inc [delay]
        cmp dword ptr [delay], #30 // Set your delay (optional till you don't d/c)
        jne skill_id_return
        mov [delay], 0
        mov ecx,]]..SkillID..[[
        jmp skill_id_return
        013CAE9A:
        db 90 90 90 90 90 90
        013CAEA7:
        jmp 013CAF0C
        dw 9090
      ]])

I checked and it doesn't work.

This causes ASM Code not to run,

It doesn't change anything in the game's memory

Sad , I didn't think something so basic could be difficult,

Do you have an idea how to fix this? Sad



ללא שם.png
 Description:
 Filesize:  28.18 KB
 Viewed:  1591 Time(s)

ללא שם.png


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

Joined: 16 Feb 2017
Posts: 1516

PostPosted: Tue Jun 13, 2023 3:09 pm    Post subject: Reply with quote

Code:
-- (Activate only one for "SkillID".)
--SkillID = getProperty(UDF1.CEEdit3.Text)
-- number or string?
--SkillID = tonumber(UDF1.CEEdit3.Text)
print("SkillID: "..SkillID)
      autoAssemble([[
        alloc(skill_id_hook,128)
        label(skill_id_return)
        alloc(delay,1)

        delay:
        dw 0
        013CACBC:
        db 90 90 90 90 90 90
        013CACC8:
        db 90 90 90 90 90 90
        013CACE5:
        db 90 E9
        013CADFA:
        jmp skill_id_hook
        nop
        skill_id_return:
        skill_id_hook:
        inc [delay]
        cmp dword ptr [delay], #30 // Set your delay (optional till you don't d/c)
        jne skill_id_return
        mov [delay], 0
        mov ecx,]]..SkillID..[[
        jmp skill_id_return
        013CAE9A:
        db 90 90 90 90 90 90
        013CAEA7:
        jmp 013CAF0C
        dw 9090
      ]])


And check for errors in other aspects of the code:

Code:
function UDF1_CECheckbox1Change(sender)

  if UDF1.CEEdit3.Text=="" then
   showMessage("Please write a value in the corresponding box!")
   UDF1.CECheckbox1.Checked=false
  else
   if UDF1.CECheckbox1.Checked==true then
     SkillID = tonumber(UDF1.CEEdit3.Text)
     print("SkillID: "..SkillID)
      autoAssemble([[
        alloc(skill_id_hook,128)
        label(skill_id_return)
        alloc(delay,1)

        delay:
        dw 0
        013CACBC:
        db 90 90 90 90 90 90
        013CACC8:
        db 90 90 90 90 90 90
        013CACE5:
        db 90 E9
        013CADFA:
        jmp skill_id_hook
        nop
        skill_id_return:
        skill_id_hook:
        inc [delay]
        cmp dword ptr [delay], #30 // Set your delay (optional till you don't d/c)
        jne skill_id_return
        mov [delay], 0
        mov ecx,]]..SkillID..[[
        jmp skill_id_return
        013CAE9A:
        db 90 90 90 90 90 90
        013CAEA7:
        jmp 013CAF0C
        dw 9090
      ]])
  else
  -- use ..
  end
 end
end

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Tue Jun 13, 2023 8:20 pm    Post subject: Re: Help | Get Number value from TextBox to ASM code Reply with quote

gavrielsinvani wrote:
Trying to take a number value from a TextBox, and put it into ASM Code, it doesn't work, I believe there might be another way,

Can someone please help me fix the code?

Code:
      SkillID = getProperty(UDF1_CEEdit3, "Text")


This is the line where I want to get a number value from a TextBox
Code:
mov ecx,SkillID


What value type of skillID?. You need convert the CEEdit1 text value to the correct value type for skillID.

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
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 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