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 


A Bit Of Problem With EditBox (TextBox)

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

Joined: 04 Jan 2015
Posts: 136

PostPosted: Tue May 26, 2015 6:59 pm    Post subject: A Bit Of Problem With EditBox (TextBox) Reply with quote

Code:
Form = createForm(true)
control_setCaption(Form,"Attach Test")
control_setSize(Form,200,50)
Attach = createButton(Form)
control_setCaption(Attach,"Attach")
control_onClick(Attach,Attach)
control_setPosition(Attach,0,25)
control_setSize(Attach,200,25)
ProcessID = createEdit(Form)
control_setPosition(ProcessID,0,0)
control_setCaption(ProcessID,"Type ProcessID Here [Decimal]")
control_setSize(ProcessID,200,50)
function Attach()
openProcess(control_getCaption(ProcessID))
end

The Script is Not Working For Some Reason CE Never Gets Attached To The PID i Wrote in The Textbox

Edit:
Found An Alternative Solution But Still Hope Someone Helps With This Script
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 May 27, 2015 3:17 am    Post subject: Reply with quote

it won't work because you assign the button and not the function to the onclick event of Attach
_________________
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
Alamer99
Expert Cheater
Reputation: 1

Joined: 04 Jan 2015
Posts: 136

PostPosted: Wed May 27, 2015 5:34 am    Post subject: Reply with quote

Code:
f = createForm(true)
control_setCaption(f,"Test")
control_setSize(f,200,50)
Edit = createEdit(f)
control_setSize(Edit,200,0)
control_setPosition(Edit,0,0)
control_setCaption(Edit,"Type ProcessID Here [Decimal]")
btnAttach = createButton(f)
control_setPosition(btnAttach,60,25)
control_setCaption(btnAttach,"Attach")
control_onClick(btnAttach,function()
openProcess(control_getCaption(Edit)) --CE Will Not Attach
end
)

by the way i tried
Code:
print(control_getCaption(Edit))

and
Code:
openProcess(####) --#### is PID Directly (1234)

and both worked
a problem with openProcess?!
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 May 27, 2015 6:06 am    Post subject: This post has 1 review(s) Reply with quote

try tonumber(Edit.Text)
abd the processid is given as a decimal or hexadecimal ?

_________________
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
Alamer99
Expert Cheater
Reputation: 1

Joined: 04 Jan 2015
Posts: 136

PostPosted: Wed May 27, 2015 6:50 am    Post subject: Reply with quote

The User Will Write The ProcessID as Decimal

Code:
openProcess(tonumber(Edit.Text))

Working Perfect Thank You DB Very Happy

edit:
just tried hex, it works too
just add "0x" (no qoutes) for example 0x7dc in front of the hex number so tonumber function converts it from hex to decimal
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