A script for sending messages in the background by pressing the key wizard

Source: Internet
Author: User

In the past, I used the press-key Wizard to write some scripts. At that time, I often used this script to hook up FB or something.

A netizen asked me that day, so he answered

It is nothing more than grasping the handle, and then positioning the coordinates or sending messages to a fixed form

The Code is as follows:

1 // capture the window handle ////////// //// // 2 3 dim hwnd 4 5 hwnd = plugin. window. mousepoint () 6 7 swindow = plugin. window. iswindow (hwnd) 8 9 If swindow =-1 then 10 11 hwnd = plugin. window. foreground () 12 13 end if14 15 srect = plugin. window. getclientrect (hwnd) 16 17 18 xyarray = Split (srect, "|") 19 20 dx = clng (xyarray (0) 21 22 DY = clng (xyarray (1 )) 23 24 /// // The End Of The Window handle ///////// /// // 25 // /// // The above is not understood, you can ignore // 26 ////////// //// // write the following code by yourself //////////////// /// // 27 call plugin. bkgnd. moveTo (hwnd, 830-dx, 247-dy) // move the mouse to the specified position 28 call plugin. bkgnd. rightclick (hwnd, 830-dx, 247-dy) // right-click 29 call plugin. bkgnd. keydown (hwnd, 112) // Press F1, and the other key values are Baidu 30 delay 20031 call plugin. bkgnd. keyup (hwnd, 112) // open f132 delay 43000

 

A script for sending messages in the background by pressing the key wizard

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.