def _open_url_in_safari(url): width, height = utils.screen_size() cmd = """ tell application "Safari" open location "%(url)s" activate end tell """ % locals() utils.execute_as(cmd)
def index(): msg = session.pop('msg', None) return render_template( 'jqm.html', host=HOST.split('.')[0], port=PORT, status=msg, screen=utils.screen_size(), extensions=extensions, )
def old(): msg = session.pop('msg', None) return render_template( 'index.html', host=HOST, port=PORT, status=msg, screen=utils.screen_size(), extensions=extensions, )
def _fourod_fullscreen(): if not utils.is_running("Safari"): return width, height = utils.screen_size() cmd = """ tell application "Safari" activate set bounds of window 1 to {0, 22, 1000, 8000} end tell """ % locals() # These need to be done synchronously utils.execute_as_async(cmd) sleep(0.5) mouseclick(850, 700)
def _fourod_pg_accept(): if not utils.is_running("Safari"): return width, height = utils.screen_size() #cmd = """ #tell application "Safari" #activate #set bounds of window 1 to {0, 22, 1000, 8000} #end tell #""" % locals() ## These need to be done synchronously #utils.execute_as_async(cmd) #sleep(0.5) mouseclick(width * 0.40, height * 0.59)
def _fourod_pauseplay(): if not utils.is_running("Safari"): return width, height = utils.screen_size() mouseclick(30, height-50) sleep(1) mousemove(300,100)