|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Ludwig Advanced Cheater Reputation: 0
Joined: 10 Jan 2016 Posts: 68
|
Posted: Wed Sep 14, 2016 3:18 pm Post subject: Using setMethodProperty to return input values from user |
|
|
Gooda day...
im trying a piece from another users script to see how it works...but cant seem to get it to return data that the user is iputting,,,
it starts like...
Code: | self.editu = createEdit(self.form);
self.editu.Caption = '';
self.editu.Top = 67;
self.editu.Left = 95;
self.editu.Width = 305;
self.editu.Height = 20;
self.editp = createEdit(self.form);
self.editp.Caption = '';
self.editp.Top = 118;
self.editp.Left = 95;
self.editp.Width = 305;
self.editp.Height = 20;
setProperty(self.editp,"PasswordChar", "*");
setProperty(self.editp,'EchoMode','emPassword'); |
where the username and pasw should be entered...then...he used
Code: | setMethodProperty(self.editu, "OnKeyPress", function (sender,key) key_hex = string.byte(key); if key_hex==13 then key = nil; self:login(); return key; end; return key; end);
setMethodProperty(self.editp, "OnKeyPress", function (sender,key) key_hex = string.byte(key); if key_hex==13 then key = nil; self:login(); return key; end; return key; end);
print('='..self.editu.Caption..'='..self.editp.Caption..'=')
|
but i cant get it to return the data
all i get on the print is "==="
it looks like a petty neat method...but i cant figure out why its not returning anything...
i have used
Code: | uname = inputQuery("Player name to search :", " ",nil);
control_setCaption(self.update_name,uname);
|
before, but would like this method aswell
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Wed Sep 14, 2016 3:41 pm Post subject: |
|
|
edit controls don't have a Caption field, they have a Text field so self.editu.Text and self.editp.Text
also, you can just do:
Code: |
self.editu.OnKeyPress=function (sender,key) key_hex = string.byte(key); if key_hex==13 then key = nil; self:login(); return key; end; return key; end);
|
(of course, instead of looking for the enter key, you can just add a Login button on the form, and set it's Default property to true. Enter keypresses then press that button instead)
_________________
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 |
|
|
Ludwig Advanced Cheater Reputation: 0
Joined: 10 Jan 2016 Posts: 68
|
Posted: Wed Sep 14, 2016 4:38 pm Post subject: |
|
|
thnx DB...
this will hlp...
|
|
Back to top |
|
|
|
|
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
|
|