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 


Script is spamming keys, can't figure out why.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
deadlywasher
How do I cheat?
Reputation: 0

Joined: 22 Sep 2020
Posts: 1

PostPosted: Tue Sep 22, 2020 5:15 pm    Post subject: Script is spamming keys, can't figure out why. Reply with quote

Code:

if syntaxcheck then return end
addressList = getAddressList()

setGlobalKeyPollInterval(1)
setGlobalDelayBetweenHotkeyActivation(33)

timer = createTimer(getMainForm())
timer.Enabled = true
timer.Interval = 33
timer.OnTimer = function(timer)
              P1Move = addressList.getMemoryRecordByDescription('P1Move').value
                     if P1Move == "90" then
P1 = "00"
keyDown(80)
keyDown(76)
sleep(725)
keyUp(80)
keyUp(76)
                     end
end


Script should be doing just a couple of keypresses, is spamming many more. Not sure why after a few hours of try.

****Figured out the code is fine. App just responds badly to virtual keypresses. Any suggestions?
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