New question #708704 on SikuliX:
https://answers.launchpad.net/sikuli/+question/708704

I’ve been trying to automate joining WhatsApp Beta on Apple TestFlight links 
via Sikulix and I’m rather new to python.

So far I’ve written this code below and it kind of works in a way but is 
happening very slowly.

After multiple attempts to click the link to check if there is a slot available 
on TestFlight, Apple will sometimes respond with Try again button or Refresh 
button(have not added to my script).

Please take a look at what I’ve written and would love if you could give me 
some advice:

Thank you so much!


running = True
def runHotkey(event):
    global running
    running = False

Env.addHotkey(Key.ESC,KeyModifier.CTRL, runHotkey)
Settings.MoveMouseDelay=0
Settings.DelayBeforeMouseDown=0

Region.observe(Region(888,28,1666,723))
if exists("acceptbutton.png”): #button that shows when its possible to join
    click("acceptbutton.png")

else:
    for step in range(10000000): #to repeat overnight
        Settings.MoveMouseDelay=0
        Settings.DelayBeforeMouseDown=0
        doubleClick("open testflight.png”) #url 
(https://testflight.apple.com/join/8sLvv90R))
        if exists(“okbutton.png",0.5): #button that shows when the beta is full 
and can’t be joined
            Settings.TypeDelay=0
        type(Key.ENTER)
        Settings.MoveMouseDelay=0
        Settings.DelayBeforeMouseDown=0
        if exists("tryagain.png",0.5): #apple TestFlight server randomly pops 
out this window upon too many tries
            click("tryagain.png")
        Settings.MoveMouseDelay=0
        Settings.DelayBeforeMouseDown=0
        if exists("tryagaingrey.png",0.5):
            click("tryagaingrey.png")

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to