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 make trainer Screen Shot

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

Joined: 24 Dec 2017
Posts: 66

PostPosted: Sat May 12, 2018 1:09 am    Post subject: How make trainer Screen Shot Reply with quote

how make a trainer that if i click button it will Sjow on CEIMAGE
CEIMAGE.Picture = Screen Shot Results
i think the works Is like this
Click button then screen shot then get image from CLIPBOARD

_________________
Hi Lynxz Gaming
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: Sat May 12, 2018 1:27 am    Post subject: Reply with quote

example code:
Code:

w=getScreenWidth()
h=getScreenHeight()
sc=getScreenCanvas()
UDF1.CEImage1.Stretch=true
UDF1.CEImage1.Picture.Bitmap.Width=w
UDF1.CEImage1.Picture.Bitmap.Height=h

UDF1.CEImage1.canvas.copyRect(0,0,w,h,sc,0,0,w,h)


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

Joined: 24 Dec 2017
Posts: 66

PostPosted: Sat May 12, 2018 1:40 am    Post subject: Reply with quote

hello darkbyte . why the results like this?


20180512_143917.jpg
 Description:
 Filesize:  86.38 KB
 Viewed:  2778 Time(s)

20180512_143917.jpg



_________________
Hi Lynxz Gaming
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: Sat May 12, 2018 2:04 am    Post subject: Reply with quote

probably because the window containing the image is smaller than your screen so it's shown cropped
_________________
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
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 189

PostPosted: Thu Jun 06, 2019 2:36 am    Post subject: Reply with quote

Dark Byte wrote:
example code:
Code:

w=getScreenWidth()
h=getScreenHeight()
sc=getScreenCanvas()
UDF1.CEImage1.Stretch=true
UDF1.CEImage1.Picture.Bitmap.Width=w
UDF1.CEImage1.Picture.Bitmap.Height=h
UDF1.CEImage1.canvas.copyRect(0,0,w,h,sc,0,0,w,h)
Code:
w=getScreenWidth()
h=getScreenHeight()
sc=getScreenCanvas()
--[[UDF1.CEImage1.Stretch=true
UDF1.CEImage1.Picture.Bitmap.Width=w
UDF1.CEImage1.Picture.Bitmap.Height=h
UDF1.CEImage1.canvas.copyRect(0,0,w,h,sc,0,0,w,h)]]
function jt()
  if f then f.Destroy() end
  f=createForm(fasle)
  f.BorderStyle='bsNone'
  f.Color=0x00
  f.font.size=30
  f.setSize(w,h)
  p=createPanel(f)
  p.setSize(0,0)
  p.Color=0xBB
  p.BevelWidth=2
  p.BevelInner=1
  label=createLabel(p)
  label.caption='Save'
  label.color=0xff
  f.OnMouseDown=function() p.tag=1 p.left,p.top=getMousePos() end
  f.OnMouseUp=function() p.tag=0 end
  f.OnMouseMove=function() if p.tag==1 then p.setSize(getMousePos()) end end
  p.OnMouseDown=function(sender,button) if button==1 then f.destroy() end end
  --label.OnClick=
  f.setLayeredAttributes(0xBB,100,3,3) f.show()
end
jt()
--if keyC then keyC.destroy(); keyC=nil end  keyC =  createHotkey(jt,81) keyC.DelayBetweenActivate = 300
if keyA then keyA.destroy(); keyA=nil end  keyA =  createHotkey(f.destroy,27) keyA.DelayBetweenActivate = 300
Can I intercept an image of an area? I want to intercept an image from any area.
I think the image can be obtained according to the position and size of the panel.
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