Пример #1
0
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)
Пример #2
0
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)
Пример #3
0
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,
    )
Пример #4
0
def old():
    msg = session.pop('msg', None)
    return render_template(
        'index.html',
        host=HOST,
        port=PORT,
        status=msg,
        screen=utils.screen_size(),
        extensions=extensions,
    )
Пример #5
0
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,
            )
Пример #6
0
def old():
    msg = session.pop('msg', None)
    return render_template(
            'index.html',
            host=HOST,
            port=PORT,
            status=msg,
            screen=utils.screen_size(),
            extensions=extensions,
            )
Пример #7
0
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)
Пример #8
0
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)
Пример #9
0
def _fourod_pauseplay():
    if not utils.is_running("Safari"): return
    width, height = utils.screen_size()
    mouseclick(30, height-50)
    sleep(1)
    mousemove(300,100)