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 


any simple Code to hook my form to Game top-right?

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

Joined: 03 Jan 2017
Posts: 12

PostPosted: Wed Jan 18, 2017 4:00 am    Post subject: any simple Code to hook my form to Game top-right? Reply with quote

I mean i already read d3d hook thread , I might have to admit a bit confuse, but somehow i able to draw some thing on Game Screen

But anyway to hook the form i already made in it? I mean I already create form and design it already and just want to hook the whole form to the game screen

Example: I have made UDF1 form

and I just want to d3d hook UDF1 form to the game, is it possible?
Or I have to draw everything again from scratch? but think about it my form also have some image attach too etc so, i want to know is there simple code to hook the entire UDF1 form to game Screen

Thank you for understanding

Embarassed Embarassed Embarassed Embarassed Embarassed
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: Wed Jan 18, 2017 4:39 am    Post subject: Reply with quote

form.printToRasterImage(rasterimage) is the closest of what you want.

set it to a bitmap or png of your choice, put it in a picture, and then create a texture from it.
BUT be aware that it will NOT take any input. (and at times it can look bad)

_________________
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
Alexandrite
Newbie cheater
Reputation: 0

Joined: 03 Jan 2017
Posts: 12

PostPosted: Wed Jan 18, 2017 4:47 am    Post subject: Reply with quote

Dark Byte wrote:
form.printToRasterImage(rasterimage) is the closest of what you want.

set it to a bitmap or png of your choice, put it in a picture, and then create a texture from it.
BUT be aware that it will NOT take any input. (and at times it can look bad)


can i have a bit of example code please ? ><

and about input, i have no worry, actually i just want to make the hud or something like that to show current information of the game that not showing :3
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: Wed Jan 18, 2017 4:56 am    Post subject: Reply with quote

i recommend just taking a screenshot yourself, store it in the table and use that as a texture

but as an example
Code:
 
bm=createBitmap()
yourform.printToRasterImage(bm)

p=createPicture()
p.Bitmap=bm

mytexture=ad3dhook.createTexture(p)
mysprite=ad3dhook.createSprite(mytexture)
mysprite.x=ad3dhook.Width-mytexture.Width
mysprite.y=0

_________________
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
Alexandrite
Newbie cheater
Reputation: 0

Joined: 03 Jan 2017
Posts: 12

PostPosted: Wed Jan 18, 2017 5:10 am    Post subject: Reply with quote

Dark Byte wrote:
i recommend just taking a screenshot yourself, store it in the table and use that as a texture

but as an example
Code:
 
bm=createBitmap()
yourform.printToRasterImage(bm)

p=createPicture()
p.Bitmap=bm

mytexture=ad3dhook.createTexture(p)
mysprite=ad3dhook.createSprite(mytexture)
mysprite.x=ad3dhook.Width-mytexture.Width
mysprite.y=0


Umm I tried this code already but it show nothing but hook only blackscreen width-height equal to my form :V
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: Wed Jan 18, 2017 5:13 am    Post subject: Reply with quote

is your form visible next to the game? It can be it only gets a proper picture if the form is visible.

but yeah, i do recommend pressing alt+printscreen on the form and then paste in mspaint and save that

_________________
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
Alexandrite
Newbie cheater
Reputation: 0

Joined: 03 Jan 2017
Posts: 12

PostPosted: Wed Jan 18, 2017 5:24 am    Post subject: Reply with quote

Dark Byte wrote:
is your form visible next to the game? It can be it only gets a proper picture if the form is visible.

but yeah, i do recommend pressing alt+printscreen on the form and then paste in mspaint and save that


well i just test with blank UDF1 Form with some little label and panel
Back to top
View user's profile Send private message
Alexandrite
Newbie cheater
Reputation: 0

Joined: 03 Jan 2017
Posts: 12

PostPosted: Fri Jan 20, 2017 5:23 am    Post subject: Reply with quote

I try to direct Hook Image but still not work
and it instant freeze CE and force to close
not sure my code correct

please correct me if my code wrong...

Code:
image = string.format( "jill.png" );
bm = findTableFile( image ).stream;

p=createPicture()
p.Bitmap=bm

mytexture=ad3dhook.createTexture(p)
mysprite=ad3dhook.createSprite(mytexture)
mysprite.x=ad3dhook.Width-mytexture.Width
mysprite.y=0
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: Fri Jan 20, 2017 6:05 am    Post subject: Reply with quote

Code:

bms = findTableFile('jill.png').stream;

p=createPicture()
p.loadFromStream(bms)

mytexture=ad3dhook.createTexture(p)
mysprite=ad3dhook.createSprite(mytexture)
mysprite.x=ad3dhook.Width-mytexture.Width
mysprite.y=0

_________________
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