Python script is a simple way to open the default browser to log on to the user and Open QQ, python script

Source: Internet
Author: User

Python script is a simple way to open the default browser to log on to the user and Open QQ, python script

The example in this article describes how to simply enable the default browser logon and QQ through the Python script. We will share this with you for your reference. The details are as follows:

The first thing to do when you open your computer every day is to open everyone and click QQ. Every time this is very troublesome, so I wrote a script, and each time I double-click it, the two tasks will be automatically completed.

Note: You must select "next Automatic Logon" when logging on to everyone, and select "Automatic Logon" for QQ. In fact, it seems that these settings are unnecessary and can be completed using scripts. However, I am too lazy to check the information.

The Code is as follows:

Todo. pyw:

Import webbrowser import OS webbrowser. open ("http://www.renren.com/347466018") OS. popen (r '"C: \ Program Files \ Tencent \ QQ \ Bin \ QQ.exe "')

There are only four lines in total. Just save it as a *. pyw file. Every time you double-click it, You can automatically log on to my QQ and use the default browser to open everyone.

I also found that if it is *. py, a black window will pop up when you double-click the execution and save it as *. pyw. This black window will not appear.

Sometimes laziness is also the motivation for learning.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.