Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help please
#1
Question 
hello, i need help with this code.
this code is little bit of another code. the code do clicks around moving images that are then static.
my problem is the clicks are soy very fast, i need to put a sleep() between each click , but i have no idea where to put it.

for i, j in zip(range(0, 18, + 2), range(1, 19, + 2)):
            if self.Button == 'right':
                self.SendToClient.RightClick(self.PLACEs[i], self.PLACEs[j])
            elif self.LootButton == 'left':
                self.SendToClient.LeftClick(self.PLACEs[i], self.PLACEs[j])
sorry for bad english.
buran write Jan-06-2021, 05:09 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Reply
#2
for i, j in zip(range(0, 18, + 2), range(1, 19, + 2)):
  if self.Button == 'right':
    self.SendToClient.RightClick(self.PLACEs[i], self.PLACEs[j])
    time.sleep(sec)
  elif self.LootButton == 'left':
    self.SendToClient.LeftClick(self.PLACEs[i], self.PLACEs[j])
    time.sleep(sec)
Does this work for you?
Larz60+ write Jan-05-2021, 05:08 PM:
Please fix indentation
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020