Python Forum

Full Version: help please
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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?