Documentation ¶
Overview ¶
* @Author: wangjun haodreams@163.com * @Date: 2022-07-21 20:24:12 * @LastEditors: Wangjun * @LastEditTime: 2023-05-31 00:10:52 * @FilePath: \ai_tradee:\go\src\gitee.com\haodreams\golib\winextend\window.go * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
Index ¶
- Constants
- func CharCodeAt(s string, n int) rune
- func Click()
- func FindWindow(hwndParent win.HWND, hwndChildAfter win.HWND) win.HWND
- func FindWindowEx(hwndParent win.HWND, hwndChildAfter win.HWND, ...) win.HWND
- func FindWindowFromPidTitle(pid uint32, title string) (hwnd win.HWND, err error)
- func GetTopWinowd(hwnd win.HWND) win.HWND
- func GetWindowFromPID(pid uint32) (hwnd win.HWND)
- func GetWindowText(hwnd win.HWND) string
- func PressKey(vk uint16)
- func PressTowKey(vk1, vk2 uint16)
- func RightClick()
- func SetWindowText(hwnd win.HWND, text string)
- func TypeStr(str string)
- func UnicodeType(value uint16)
- func WindowFromPoint(x, y int) (hwnd win.HWND, err error)
Constants ¶
View Source
const (
//默认的文本长度
TextMaxLength = 1024
)
Variables ¶
This section is empty.
Functions ¶
func FindWindow ¶
*
- @description: FindWindowEx 的简化版,FindWindow 用于查找主窗体,不能查找窗体内的对话框按钮等资源,如果需要窗体内资源用EnumWindows
- @param {win.HWND} hwndParent
- @param {win.HWND} hwndChildAfter
- @return {*}
func FindWindowEx ¶
func FindWindowEx(hwndParent win.HWND, hwndChildAfter win.HWND, lpClassName, lpWindowName *uint16) win.HWND
*
- @description: 查找指定的窗体
- @param {win.HWND} hwndParent
- @param {win.HWND} hwndChildAfter
- @param {*} lpClassName
- @param {*uint16} lpWindowName
- @return {*}
func FindWindowFromPidTitle ¶
func GetWindowText ¶
*
- @description: 获取窗体的标题 不用GetWindowText()是在某些情况下不能获取到窗体
- @param {win.HWND} hwnd
- @return {*}
func PressTowKey ¶
func PressTowKey(vk1, vk2 uint16)
func RightClick ¶
func RightClick()
func SetWindowText ¶
*
- @description: 获取窗体的标题 不用GetWindowText()是在某些情况下不能获取到窗体
- @param {win.HWND} hwnd
- @return {*}
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
* @Author: Wangjun * @Date: 2022-07-22 15:27:01 * @LastEditTime: 2023-03-16 22:52:56 * @LastEditors: Wangjun * @Description: * @FilePath: \golib\winextend\c\main.go * hnxr
|
* @Author: Wangjun * @Date: 2022-07-22 15:27:01 * @LastEditTime: 2023-03-16 22:52:56 * @LastEditors: Wangjun * @Description: * @FilePath: \golib\winextend\c\main.go * hnxr |
Click to show internal directories.
Click to hide internal directories.