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 , How make Calculator? (Trainer)

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

Joined: 24 Dec 2017
Posts: 41

PostPosted: Thu Feb 22, 2018 5:34 am    Post subject: []HELP , How make Calculator? (Trainer) Reply with quote

How i make calculator with
IF I CLICK CEPANEL WITH CAPTION ( + ) THEN IT WILL
Get EEDIT1 AND CEEDIT2 CAPTION VALUES IT WILL LIKE THIS
CEEDIT1 + CEEDIT2 = WILL SHOW THE ANSWER ON CEEDIT 3
PLEASE GIVE SCRIPT WITH : + -
:V

_________________
MateeJr Gaming
MASTERCHEATER
:v
subs MateeJr Gaming
Lynxz Gaming
Back to top
View user's profile Send private message
movss
Cheater
Reputation: 0

Joined: 10 Feb 2018
Posts: 40

PostPosted: Thu Feb 22, 2018 5:51 am    Post subject: Reply with quote

this is simple with lua
useing control.getCaption(ID) and control.setCaption(ID)

_________________
A wild programmer
Back to top
View user's profile Send private message
MateeJr Gaming
Cheater
Reputation: 0

Joined: 24 Dec 2017
Posts: 41

PostPosted: Thu Feb 22, 2018 6:05 am    Post subject: Reply with quote

movss wrote:
this is simple with lua
useing control.getCaption(ID) and control.setCaption(ID)


I not understand . Please give A Some Logic

_________________
MateeJr Gaming
MASTERCHEATER
:v
subs MateeJr Gaming
Lynxz Gaming
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater
Reputation: 17

Joined: 10 Apr 2015
Posts: 619

PostPosted: Thu Feb 22, 2018 7:30 am    Post subject: Reply with quote

try :

Code:
function calc()
 input1 = UDF1.CEEdit1.Text
 input2 = UDF1.CEEdit2.Text
 if tonumber(input1) == nil or tonumber(input2) == nil then
  showMessage('Invalid Input. Only accepting NUMBERS')
 else
 result = tonumber(input1) + tonumber(input2)
  UDF1.CELabel3.Visible = true
  UDF1.CELabel3.Caption = 'Result is '..tostring(result)
 end
end

UDF1.CEPanel1.onClick = calc
UDF1.Show()

_________________
Singapore Sling + Johnnie Walker + Some Peanuts....
Back to top
View user's profile Send private message
Lynxz Gaming
Advanced Cheater
Reputation: 1

Joined: 01 Jul 2017
Posts: 67

PostPosted: Thu Feb 22, 2018 9:24 am    Post subject: Re: []HELP , How make Calculator? (Trainer) Reply with quote

?
function btnresultplus(sender)
UDF1.CEEdit3.Text = UDF1.CEEdit1.Text + UDF1.CEEdit2.Text
end
function btnresultminus(sender)
UDF1.CEEdit3.Text = UDF1.CEEdit1.Text - UDF1.CEEdit2.Text
end
function btnresulttimes(sender)
UDF1.CEEdit3.Text = UDF1.CEEdit1.Text * UDF1.CEEdit2.Text
end
function btnresultdiv(sender)
UDF1.CEEdit3.Text = UDF1.CEEdit1.Text / UDF1.CEEdit2.Text
end
can?
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater
Reputation: 17

Joined: 10 Apr 2015
Posts: 619

PostPosted: Thu Feb 22, 2018 11:52 am    Post subject: This post has 1 review(s) Reply with quote

Why not learn ? Rolling Eyes

Code:
function Butt_Add()
 input1 = UDF1.CEEdit1.Text
 input2 = UDF1.CEEdit2.Text
 if tonumber(input1) == nil or tonumber(input2) == nil then
  showMessage('Invalid Input. Only accepting NUMBERS')
 else
  result = tonumber(input1) + tonumber(input2)
  UDF1.CEEdit3.Text = tostring(result)
 end
end

function Butt_Min()
 input1 = UDF1.CEEdit1.Text
 input2 = UDF1.CEEdit2.Text
 if tonumber(input1) == nil or tonumber(input2) == nil then
  showMessage('Invalid Input. Only accepting NUMBERS')
 else
  result = tonumber(input1) - tonumber(input2)
  UDF1.CEEdit3.Text = tostring(result)
 end
end

function Butt_Mtply()
 input1 = UDF1.CEEdit1.Text
 input2 = UDF1.CEEdit2.Text
 if tonumber(input1) == nil or tonumber(input2) == nil then
  showMessage('Invalid Input. Only accepting NUMBERS')
 else
  result = tonumber(input1) * tonumber(input2)
  UDF1.CEEdit3.Text = tostring(result)
 end
end

function Butt_Div()
 input1 = UDF1.CEEdit1.Text
 input2 = UDF1.CEEdit2.Text
 if tonumber(input1) == nil or tonumber(input2) == nil then
  showMessage('Invalid Input. Only accepting NUMBERS')
 else
  result = tonumber(input1) / tonumber(input2)
  UDF1.CEEdit3.Text = tostring(result)
 end
end

function Butt_Clear()
 UDF1.CEEdit1.Text = '0'
 UDF1.CEEdit2.Text = '0'
 UDF1.CEEdit3.Text = ' '
end

UDF1.CEPanel1.onClick = Butt_Add
UDF1.CEPanel2.onClick = Butt_Min
UDF1.CEPanel3.onClick = Butt_Mtply
UDF1.CEPanel4.onClick = Butt_Div
UDF1.CEPanel5.onClick = Butt_Clear
UDF1.Show()



Capture.JPG
 Description:
LOL KID CALCULATOR
 Filesize:  18.68 KB
 Viewed:  1927 Time(s)

Capture.JPG



_________________
Singapore Sling + Johnnie Walker + Some Peanuts....
Back to top
View user's profile Send private message
MateeJr Gaming
Cheater
Reputation: 0

Joined: 24 Dec 2017
Posts: 41

PostPosted: Sat Feb 24, 2018 5:49 am    Post subject: Reply with quote

Thanks you all!
_________________
MateeJr Gaming
MASTERCHEATER
:v
subs MateeJr Gaming
Lynxz Gaming
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