Skip to content

Instantly share code, notes, and snippets.

@HQMIS
Created December 18, 2012 01:23
Show Gist options
  • Save HQMIS/4324135 to your computer and use it in GitHub Desktop.
Save HQMIS/4324135 to your computer and use it in GitHub Desktop.
【Python】【Library】【webbrowser】
FUNCTIONS
get(using=None)
Return a browser launcher instance appropriate for the environment.
open(url, new=0, autoraise=True)
open_new(url)
open_new_tab(url)
register(name, klass, instance=None, update_tryorder=1)
Register a browser connector and, optionally, connection.
@HQMIS
Copy link
Author

HQMIS commented Dec 18, 2012

// 浏览器在新Tab页打开网页,然后按F11全屏显示

import webbrowser
import win32api
import win32con
import time

// 在新Tab页打开play.html
webbrowser.open_new_tab('play.html')

time.sleep(5)

// 按下F11
win32api.keybd_event(122,0,0,0)
// 释放F11
win32api.keybd_event(122,0,win32con.KEYEVENTF_KEYUP,0)

@HQMIS
Copy link
Author

HQMIS commented Dec 18, 2012

@HQMIS
Copy link
Author

HQMIS commented Dec 18, 2012

@HQMIS
Copy link
Author

HQMIS commented Dec 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment