View previous topic :: View next topic |
Author |
Message |
!BEWARE! !BEWARE! Deletes post on answer
Reputation: 0
Joined: 26 Jun 2013 Posts: 57 Location: !BEWARE!
|
Posted: Sat Oct 24, 2015 8:35 am Post subject: Auto push button in CheatEngine ? |
|
|
Hi
Is a lot programs able to programe auto push buttons e.g "Auto hotkey" (like hit "L" button 1000 times in 15 sec)
But no one work in games, probably was locking by games.
Is able to programe auto pushing button in CheatEngine?
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Oct 24, 2015 8:39 am Post subject: |
|
|
Code: | function execute()
for i=1,1000 do
doKeyPress(VK_L)
end
end
createHotkey(execute, VK_F1) |
|
|
Back to top |
|
 |
!BEWARE! !BEWARE! Deletes post on answer
Reputation: 0
Joined: 26 Jun 2013 Posts: 57 Location: !BEWARE!
|
Posted: Sat Oct 24, 2015 9:33 am Post subject: |
|
|
Thanks for fast reply.
I'am amateur in CE, can you tell me where paste this script?
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Oct 24, 2015 9:35 am Post subject: |
|
|
Table > Show Cheat Table Lua Script (Ctrl+Alt+L)
|
|
Back to top |
|
 |
!BEWARE! !BEWARE! Deletes post on answer
Reputation: 0
Joined: 26 Jun 2013 Posts: 57 Location: !BEWARE!
|
Posted: Sat Oct 24, 2015 9:41 am Post subject: |
|
|
ok got it.
1,1000
this mean 1000 hits in one second ?
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Oct 24, 2015 9:50 am Post subject: |
|
|
This means start with i = 1 and execute the code while i <= 1000, adding +1 to i with each loop.
This is executed as fast as your CPU can manage. You can add a sleep(#) if you want the script to delay some.
That # is in milliseconds. So to wait 1 second between each key press, use sleep(1000).
|
|
Back to top |
|
 |
!BEWARE! !BEWARE! Deletes post on answer
Reputation: 0
Joined: 26 Jun 2013 Posts: 57 Location: !BEWARE!
|
Posted: Sat Oct 24, 2015 10:04 am Post subject: |
|
|
This script I need to the game as light flasher.
this 1000 hits in second i maked as example to know does is possible in CE.
Your script work, F1 turning light but is too faster for flashing and this part dont work.
So if i want now 10 hits in 10 sec, so how this should look?
|
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Oct 24, 2015 10:32 am Post subject: |
|
|
By using everything you now know from my previous posts...
So, for i=1,1000 do causes the code to loop 1,000 times as i starts at 1 and counts up to 1000.
If I only wanted that to loop 10 times, what values could I possibly change. A real stumper.
So, sleep(1000) causes the code to wait 1 second between each loop.
Oh wait, I want it to wait 1 second! I guess I don't have to change anything here.
But how do I combine these two concepts into the final script...
Code: | function execute()
for i=1,10 do
doKeyPress(VK_L)
sleep(1000)
end
end
createHotkey(execute, VK_F1) |
Well shit, that was easy. </sarcasm>
|
|
Back to top |
|
 |
!BEWARE! !BEWARE! Deletes post on answer
Reputation: 0
Joined: 26 Jun 2013 Posts: 57 Location: !BEWARE!
|
Posted: Sat Oct 24, 2015 10:51 am Post subject: |
|
|
oh Man... coding + my primary english = and everything looks like Einstein lecture
I going test it, wait for my new 1000 questions
+New msg.
works nice now, but needed off button
|
|
Back to top |
|
 |
|