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 


The New CE Project

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

Joined: 07 Jan 2013
Posts: 12

PostPosted: Sun Jul 26, 2015 10:13 am    Post subject: The New CE Project Reply with quote

I am working on a project that you will really love to see i'm sure... However i lack a few lines of code knowledge...

How to unstruct a UDF form to base it's size based on the desktop resolution?

And how to add a full lenght button that has to follow the same purpose but that one must follow the resolution of the UDF Form it's self...?

Please Help as this is urgent to finish the project...

What i am doing is that i am creating a lite explorer.exe kinda app that will be CE 6.4 based Smile

Replacing the Original Explorer.exe that little app will avoid a lot of crap...

and if you would please give me a hint how to print time and date on my form that can help even further to make it look even more complete Smile

_________________
Hey Hitler so do you think that being lazy will get you anything in life ?
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Sun Jul 26, 2015 10:34 am    Post subject: Reply with quote

Code:
f = createForm();
f.WindowState = "wsMaximized"
sw,sh = f.width, f.height
--f.WindowState = "wsNormal" --> if you want to revert
print(sw,sh) --> width,height of your desktop, pay attention that the height is height - window_top_bar
b = createButton(f)
b.width = sw*0.1 --> 10% width of the form width
b.left = math.floor((sw - b.width)/2)
b.top = math.floor((sh - b.height)/2)
b.caption = "Do something"
b.onClick = function () return showMessage("Something"); end

_________________
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
panraven
Grandmaster Cheater
Reputation: 55

Joined: 01 Oct 2008
Posts: 942

PostPosted: Sun Jul 26, 2015 12:43 pm    Post subject: Reply with quote

my try:
Code:
function getScreenSize()
  local param = cheatEngineIs64Bit() and 'mov rcx,' or 'push '
  local r = {string.format([[
alloc(_api,$100)
_api:
dd 0
_api+10:
push rcx
push rax
%s1
call GetSystemMetrics
mov [_api+04],eax
%s10
call GetSystemMetrics
mov [_api+08],eax
%s11
call GetSystemMetrics
mov [_api+0c],eax
%s0
call GetSystemMetrics
mov [_api+00],eax
pop rax
pop rcx
ret
registersymbol(_api)
]],param,param,param,param),"createThread(_api+10)",[[
dealloc(_api)
unregistersymbol(_api)
]]}
  local w = {}
  if autoAssemble(r[1],true) then
    if autoAssemble(r[2],true) then
      for i=1,100 do
        if readIntegerLocal('_api') ~= 0 then break end
        sleep(10) -- needed for the thread actually done and finished
      end
      local fmt = "_api+%x"
      for i=1,4 do w[i] = readIntegerLocal(fmt:format((i-1)*4))  end
    end
    autoAssemble(r[3],true)
  end
  return unpack(w) -- screen x,y with taskbar & x,y w/o taskbar
end

local sx,sy,wx,wy = getScreenSize()
print(sx,sy,wx,wy)

_________________
- Retarded.
Back to top
View user's profile Send private message
___obmib___
How do I cheat?
Reputation: 0

Joined: 03 Aug 2015
Posts: 5
Location: qatar

PostPosted: Tue Aug 25, 2015 11:15 am    Post subject: trainer image Reply with quote

hey dolce,maybe u can help me.ive already made my trainer only the image i cant put in it.please help..thank you in advance


1.jpg
 Description:
 Filesize:  72.13 KB
 Viewed:  4890 Time(s)

1.jpg


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