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 


Auto push button in CheatEngine ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
!BEWARE!
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 26 Jun 2013
Posts: 57
Location: !BEWARE!

PostPosted: Sat Oct 24, 2015 8:35 am    Post subject: Auto push button in CheatEngine ? Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Oct 24, 2015 8:39 am    Post subject: Reply with quote

Code:
function execute()
  for i=1,1000 do
    doKeyPress(VK_L)
  end
end
createHotkey(execute, VK_F1)
Back to top
View user's profile Send private message
!BEWARE!
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 26 Jun 2013
Posts: 57
Location: !BEWARE!

PostPosted: Sat Oct 24, 2015 9:33 am    Post subject: Reply with quote

Thanks for fast reply.
I'am amateur in CE, can you tell me where paste this script?
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Oct 24, 2015 9:35 am    Post subject: Reply with quote

Table > Show Cheat Table Lua Script (Ctrl+Alt+L)
Back to top
View user's profile Send private message
!BEWARE!
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 26 Jun 2013
Posts: 57
Location: !BEWARE!

PostPosted: Sat Oct 24, 2015 9:41 am    Post subject: Reply with quote

ok got it.
1,1000
this mean 1000 hits in one second ?
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Oct 24, 2015 9:50 am    Post subject: Reply with quote

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
View user's profile Send private message
!BEWARE!
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 26 Jun 2013
Posts: 57
Location: !BEWARE!

PostPosted: Sat Oct 24, 2015 10:04 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Oct 24, 2015 10:32 am    Post subject: Reply with quote

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
View user's profile Send private message
!BEWARE!
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 26 Jun 2013
Posts: 57
Location: !BEWARE!

PostPosted: Sat Oct 24, 2015 10:51 am    Post subject: Reply with quote

oh Man... coding + my primary english = and everything looks like Einstein lecture Shocked
I going test it, wait for my new 1000 questions

+New msg.

works nice now, but needed off button Confused
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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