Spy + + Use guide _spy++ guide

Source: Internet
Author: User
A lot of friends are confused about the window handle, this essay is mainly about Spy + + software, introduction of the following form handle and the use of key plug-ins
, if you send a message to this handle, that is, the so-called background hanging machine.
Spy + + This software from VC + +, installed a good VC, you can see in the tool.

Let's take "notepad" for example and see if you send a key message to Notepad.
Start Notepad first

Then start Spy + +

Using Spy + + lookup features

The effect after the point is opened

We'll drag the Black star onto the Notepad form.

Then click OK to see that Spy + + has shown the following figure red content.

These three handles are from top to bottom:
Main handle of Notepad
Handle of text input box
Handle to status bar
We want to send a key message to Notepad, we need to select the right to send the object (handle), here obviously, we want to send to the "Text input box." We double-click the "Text input box" Here, you can see "window title", "Window Size", "window position" and other information. Click on the "Class" tab to see what the next class name is, the code needs the class name to do parameters

Well, the basic data is available, the following code:

[Plain] View plain copy print? Open Notepad Vbscall runapp ("notepad.exe")/wait for Notepad to completely open Delay 100//Get current Window Handle Dim hwnd Plugin hwnd=window.foreground ()/check Find the clause handle under the current window Dim editHWnd Plugin Edithwnd=window.findex (hwnd,0, "Edit", 0)//Send string message Plugin window.sendstring (editHWnd, "see I send a string message ")//Send carriage return Plugin window.sendkeydown (edithwnd,13)//Send keyboard message Plugin window.sendkeydown (" 1 ")

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.