Search found 183 matches

by WKen
24 Apr 2024, 02:39
Forum: Scripts and Functions (v2)
Topic: CreateImageButton() - 2024-01-01
Replies: 46
Views: 12112

Re: CreateImageButton() - 2024-01-01

Your question is not related to this thread and should be posted here: Ask for Help (v2)

Code: Select all

Btn11 := MyGui.AddButton("xm ym w80 h24", "Info").OnEvent("Click", ButtonClick)

ButtonClick(*)
{
	MsgBox(MyGui.FocusedCtrl.text)
}
by WKen
20 Mar 2024, 14:16
Forum: 请求帮助
Topic: 如何通过文件名选中相应的文件,比如windows的direcUIHWND中的某一个item
Replies: 1
Views: 170

Re: 如何通过文件名选中相应的文件,比如windows的direcUIHWND中的某一个item

我曾经询问过,可能需要库才能做到,我看到Acc库有Select()但不知道怎么使用,下面是悬停高亮和获取文本演示 #Include <Acc> f3:: { MouseGetPos(, , &hWnd) oAcc := Acc.ObjectFromPoint(hwnd) oAcc.Highlight() oAcc := "" return } f6:: { MouseGetPos(, , &hWnd) oAcc := Acc.ObjectFromPoint(hwnd) vWinClass := WinGetClass("ahk_id " hWnd) vText := "" if (vWinCl...
by WKen
26 Feb 2024, 14:55
Forum: 请求帮助
Topic: listview 换行问题 Topic is solved
Replies: 1
Views: 203

Re: listview 换行问题 Topic is solved

#Requires AutoHotkey v2 F3:: { MyGui := Gui() MyGui.Opt("+Resize") ;UniqueID :=WinGetControls("A") Controls := WinGetControlsHwnd("A") GuiCtrl := MyGui.Add("ListView", "Checked r600 w700", ["hwnd"]) if (!Controls.length) return ToolTip("The active window has no controls.") for ClassNN in Controls G...
by WKen
26 Feb 2024, 14:12
Forum: 请求帮助
Topic: 热键不生效求助 Topic is solved
Replies: 3
Views: 241

Re: 热键不生效求助 Topic is solved

这里没有出现你说的情况
by WKen
23 Feb 2024, 09:54
Forum: 请求帮助
Topic: 热键不生效求助 Topic is solved
Replies: 3
Views: 241

Re: 热键不生效求助 Topic is solved

需要以管理员身份运行

Code: Select all

#Requires AutoHotkey v2.0
#SingleInstance Force

#e::
{
   msgbox "有权限"
}
by WKen
22 Jan 2024, 08:42
Forum: Ask for Help (v2)
Topic: Create new empty.docx (or copy empty.docx saved somewhere on my computer) in(to) current folder with shortcut? Topic is solved
Replies: 10
Views: 3381

Re: Create new empty.docx (or copy empty.docx saved somewhere on my computer) in(to) current folder with shortcut? Topic is solved

Try: #Requires AutoHotkey v2 ; Create new document ------------------- new_docx(path) { flnm := "comments" filePath := path "\" flnm ".docx" if fileExist(filePath) { loop { filePath := path "\" flnm "-0" A_Index ".docx" if !fileExist(filePath) break } } oWord := ComObject("word.application") oWord.D...
by WKen
21 Jan 2024, 13:29
Forum: Ask for Help (v2)
Topic: Create new empty.docx (or copy empty.docx saved somewhere on my computer) in(to) current folder with shortcut? Topic is solved
Replies: 10
Views: 3381

Re: Create new empty.docx (or copy empty.docx saved somewhere on my computer) in(to) current folder with shortcut? Topic is solved

#Requires AutoHotkey v2 ; Explorer ------------------------------ ^+n:: { flnm := "comments.docx" if !(path := getpath()) or (fileexist(path "\" flnm)) return oWord := ComObject("word.application") oWord.Documents.Add oWord.Visible := True oword.activeDocument.SaveAs(path "\" flnm) return } getpath...
by WKen
14 Dec 2023, 08:10
Forum: 请求帮助
Topic: 我的ahk能够运行但是没有任何反应 Topic is solved
Replies: 1
Views: 553

Re: 我的ahk能够运行但是没有任何反应 Topic is solved

卸载rewasd后是否尝试过重装自动热键?
by WKen
03 Dec 2023, 05:47
Forum: Scripts and Functions (v2)
Topic: Find file in all disks with given name and extension
Replies: 2
Views: 378

Re: Find file in all disks with given name and extension

For folder with more than one million files, the recursive loop script may crash. I only use recursion on third-level folders, hoping for a better solution. Loop Files, path1 "\*.*", "FD" ; Read items in a first-level source folder { if (!dirExist(A_LoopFilePath)) { destFile := strReplace(A_LoopFile...
by WKen
24 Nov 2023, 14:49
Forum: Scripts and Functions (v2)
Topic: CreateImageButton() - 2024-01-01
Replies: 46
Views: 12112

Re: CreateImageButton() - 2023-07-10

This combination will cause Opt2 to lose its gradient color, any chance of making it work? Thanks!

Code: Select all

Opt1 := ["A.png", , 0xE9E9E9]
by WKen
24 Oct 2023, 06:52
Forum: 请求帮助
Topic: Win11,使用Run target,,, &target_pid无法获得正确进程ID Topic is solved
Replies: 1
Views: 944

Re: Win11,使用Run target,,, &target_pid无法获得正确进程ID Topic is solved

https://www.autohotkey.com/boards/viewtopic.php?p=541162#p541162 或者 CaptureProgram(true) Run "notepad.exe" SetTimer CaptureProgram.Bind(false), -2000 _WinActivate(hwnd) { Critical try if (winGetTitle("ahk_id " hwnd) = "Notepad") { WinActivate hwnd WinMove 0, 0, A_ScreenWidth/4, A_ScreenHeight/2, hwn...
by WKen
22 Oct 2023, 06:09
Forum: Ask for Help (v2)
Topic: Using ClassNN
Replies: 20
Views: 1927

Re: Using ClassNN

ControlGetClassNN is not available for chromium-based programs. Maybe you need UIA, or determine whether it is an edit control by getting the cursor position: GetCaretPos(&editX, &editY) if !editX return GetCaretPos(&x?, &y?) { static OBJID_CARET := 0xFFFFFFF8 AccObject := AccObjectFromWindow(WinExi...
by WKen
15 Oct 2023, 16:01
Forum: Ask for Help (v2)
Topic: Detect current folder in Windows "Select Folder"-Dialog Topic is solved
Replies: 2
Views: 269

Re: Detect current folder in Windows "Select Folder"-Dialog Topic is solved

Get the text of a control? Usually 324, may be 323.

Code: Select all

F3::ToolTip strSplit(ControlGetText("ToolbarWindow324", "ahk_class #32770"), ": ")[2]
by WKen
15 Oct 2023, 08:53
Forum: 请求帮助
Topic: 如何在不使用剪贴板的情况下,获取当前选中的文本呢?
Replies: 5
Views: 4912

Re: 如何在不使用剪贴板的情况下,获取当前选中的文本呢?

或者使用EditGetSelectedText,可以使用ControlGetFocus或者MouseGetPos等获得聚焦的控件名称

Code: Select all

#Requires AutoHotkey v2.0
F3::
{
    ToolTip EditGetSelectedText("RichEditD2DPT1" , "A")
}
by WKen
14 Oct 2023, 14:23
Forum: Ask for Help (v2)
Topic: Help for convert in v2 Topic is solved
Replies: 2
Views: 292

Re: Help for convert in v2 Topic is solved

?
viewtopic.php?f=82&t=122123
For converting simple scripts, use the converter: v1 -> v2 Script Converter
by WKen
14 Oct 2023, 09:08
Forum: 请求帮助
Topic: Windows输入法 驯服 - 提示词上屏
Replies: 1
Views: 582

Re: Windows输入法 驯服 - 提示词上屏

不知道,也许检查组合键和输入法

Code: Select all

~Shift::send "{Shift down}"
Shift Up::
{    
	if subStr(A_PriorKey, 2) != "Shift"
	   ToolTip "组合键"
}
by WKen
11 Oct 2023, 09:05
Forum: Scripts and Functions (v2)
Topic: UIA v2
Replies: 364
Views: 49873

Re: UIA v2

Yes. I'm having trouble downloading file in my Edge browser, I use the button to copy, but it's not copied completely maybe because the text is too long. Thanks.
image.png
image.png (3.76 KiB) Viewed 1766 times
by WKen
11 Oct 2023, 07:57
Forum: Scripts and Functions (v2)
Topic: UIA v2
Replies: 364
Views: 49873

Re: UIA v2

Newbie here, using the example, getting the error.
image.png
image.png (66.94 KiB) Viewed 1800 times

Go to advanced search