winextend

package
v0.0.0-...-212a885 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

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

View Source
const (
	//默认的文本长度
	TextMaxLength = 1024
)

Variables

This section is empty.

Functions

func CharCodeAt

func CharCodeAt(s string, n int) rune

CharCodeAt char code at utf-8

func Click

func Click()

func FindWindow

func FindWindow(hwndParent win.HWND, hwndChildAfter win.HWND) win.HWND

*

  • @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 FindWindowFromPidTitle(pid uint32, title string) (hwnd win.HWND, err error)

func GetTopWinowd

func GetTopWinowd(hwnd win.HWND) win.HWND

*

  • @description: 获取顶层的可见窗口
  • @param {win.HWND} hwnd
  • @return {*}

func GetWindowFromPID

func GetWindowFromPID(pid uint32) (hwnd win.HWND)

*

  • @description: 获取进程的主窗体
  • @param {uint32} pid
  • @return {*}

func GetWindowText

func GetWindowText(hwnd win.HWND) string

*

  • @description: 获取窗体的标题 不用GetWindowText()是在某些情况下不能获取到窗体
  • @param {win.HWND} hwnd
  • @return {*}

func PressKey

func PressKey(vk uint16)

func PressTowKey

func PressTowKey(vk1, vk2 uint16)

func RightClick

func RightClick()

func SetWindowText

func SetWindowText(hwnd win.HWND, text string)

*

  • @description: 获取窗体的标题 不用GetWindowText()是在某些情况下不能获取到窗体
  • @param {win.HWND} hwnd
  • @return {*}

func TypeStr

func TypeStr(str string)

自动键入数字

func UnicodeType

func UnicodeType(value uint16)

UnicodeType tap uint32 unicode

func WindowFromPoint

func WindowFromPoint(x, y int) (hwnd win.HWND, err error)

原生的有问题,y参数不能传递

Types

This section is empty.

Directories

Path Synopsis
c
* @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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL