View previous topic :: View next topic |
Author |
Message |
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
Posted: Sat Sep 02, 2017 4:46 am Post subject: Hotkey customization in custom created form. |
|
|
Can anyone here help me with hotkeys customization in custom form?
I viewed some other forum posts and found a start that to assign hotkeys by right clicking the address/script then click on set/change hotkeys.
And then after that I have to click on generate generic lua table from table.then I should change the trainer output format to script only.I did upto that and I got myself a lua scripts.
And the trainer works
But I want to change it color when the cheat is activated
I used label to show which key activates what cheat.
Let's assume I have 2 cheats and I have 2 label.
1.c1
2.c2
Both label (c1,c2 ) have something already written in black color
And when the cheats activates through hotkeys I want to change the color of labels.
Can anyone help me what to write in lua script code
Code: |
function onPostHotKey(Hotkey)
...........
.....
....
end
|
To change color?
Thanks for reading to the last.
Regards 7
_________________
"If you are good at something,never do it for free"-The Joker
I know you are looking at this post, Hitler |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Sep 03, 2017 7:24 am Post subject: |
|
|
In autogenerated forms, there are TCHEAT components (TCHEAT is a combination of few objects: hotkeylabel, descriptionlabel; and optional: tcheckbox and tedit)
You can change three properties with FormDesigner: Color, Textcolor and Activationcolor
(background color, text color, text color when active)
If you are using Labels instead of TCHEAT, you can change the color like this:
Code: | CETrainer.CELabel1.Color = 0x00ffff -- background color (yellow)
CETrainer.CELabel1.Font.Color = 0xff0000 -- text color (blue) |
_________________
|
|
Back to top |
|
|
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
Posted: Sun Sep 03, 2017 10:43 am Post subject: |
|
|
Thanks.I don't know how to use tcheat .can you explain
_________________
"If you are good at something,never do it for free"-The Joker
I know you are looking at this post, Hitler |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Sep 04, 2017 9:53 am Post subject: |
|
|
TCHEAT objects are generated when you use "trainer generator" and "form designer". Look into "object inspector".
there you can change Activationcolor (text color when active), Color (background color), Textcolor (text color when not active)
_________________
|
|
Back to top |
|
|
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
Posted: Mon Sep 04, 2017 12:41 pm Post subject: |
|
|
I know it comes there when I generate generic trainer but I can't use it in custom trainer. HELP?
_________________
"If you are good at something,never do it for free"-The Joker
I know you are looking at this post, Hitler |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Sep 04, 2017 3:25 pm Post subject: |
|
|
CheatComponent (it's class is 'tcheat', it is used in Cheat Engine 5.x trainers, newer CE still can use it), if you make everything from the scratch, there's no icon in toolbox.
So, open second CE instance, add one entry with hotkey to addresslist. Generate "generic trainer", then open form designer, select tcheat object and copy it clipboard. Close second CE. Paste it in first CE to your custom Form, do it while this form is in "designing" state (you clicked menu Table->UDF1->Edit and FormDesigner toolbox is visible)
Or copy/paste this one:
Code: | object CHEAT0: tcheat
Left = 0
Height = 28
Top = 0
Width = 200
CheatNr = 0
Textcolor = clDefault
Editwidth = 100
Hotkey = 'no hotkey'
Description = 'some description'
Hotkeyleft = 0
Descriptionleft = 90
Activationcolor = clRed
ShowHotkey = True
HasEditBox = False
HasCheckbox = False
end |
_________________
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Mon Sep 04, 2017 4:56 pm Post subject: |
|
|
or maybe something like this ?.
Code: | red="0x000000FF"
black="0x00999999"
f = createForm()
f.Show()
label = createLabel(f)
label.Top = 40
label.Left = 30
label.Caption = 'Press F to activating hack'
label.Font.Size = 14
label1 = createLabel(f)
label1.Top = label.top + label.height + 10
label1.Left = 30
label1.Caption = 'Hack Not Active...'
label1.Font.Color = black
chg = true
function onPostHotKey()
if chg then
chg = false
label1.Caption = 'Hack Not Active...'
label1.Font.Color = black
else
chg = true
label1.Caption = 'Hack activated...'
label1.Font.Color = red
end
end
if key1 then key1.destroy(); key1=nil end
key1 = createHotkey(onPostHotKey, VK_F)
key1.DelayBetweenActivate = 200 |
Just press F button. Again and again....
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Tue Sep 05, 2017 3:26 am Post subject: |
|
|
Quote: | @Corroder
For first I had also used label but Its long and I don't want to type again and again :😮 |
I just follow what explained on the topic.
and not sure understand what is mean "...Its long and I don't want to type again and again.."
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Tue Sep 05, 2017 4:39 am Post subject: |
|
|
LOKEN 7 (Death GOD 7) wrote: | And also Can we copy the object from one form to another? |
Yes we can. When you highlight object in first form just press CTRL+C (sometimes you have to press it twice, don't know why).
_________________
|
|
Back to top |
|
|
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Sep 06, 2017 10:59 am Post subject: |
|
|
Unfortunately tcheat component doesn't work that way...
_________________
|
|
Back to top |
|
|
Death GOD 7 Expert Cheater Reputation: 0
Joined: 21 Jan 2017 Posts: 105 Location: Heaven and Hell
|
Posted: Wed Sep 06, 2017 12:45 pm Post subject: |
|
|
And in custom check box how to activate cheat manually by just checking
_________________
"If you are good at something,never do it for free"-The Joker
I know you are looking at this post, Hitler |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Sep 06, 2017 2:42 pm Post subject: |
|
|
Add OnClick event to the checkbox (while in "Form Designer", look into "Object Inspector", "Events" tab). Then change it into this:
Code: | function CECheckbox1Click(sender)
memrec0.Active = sender.Checked
end |
_________________
|
|
Back to top |
|
|
|