Search found 187 matches

by WKen
22 May 2024, 07:13
Forum: Ask for Help (v2)
Topic: Where to find CLSID, IID
Replies: 8
Views: 403

Re: Where to find CLSID, IID

CLSID
Additional CLSIDs may be found in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID.
by WKen
19 May 2024, 03:13
Forum: Scripts and Functions (v2)
Topic: CSVtoDict v2
Replies: 12
Views: 1391

Re: CSVtoDict v2

I tried this script a few days ago and I ended up using Python's csv library. It would be great if someone could write a csv library similar to Python.
by WKen
15 May 2024, 16:28
Forum: Ask for Help (v2)
Topic: Moving a window
Replies: 1
Views: 155

Re: Moving a window

This was created when I was just learning AutoHotkey, not sure if it will be helpful to you. #Requires AutoHotkey v2 CoordMode "Mouse" ^m:: ; Ctrl+M { MouseGetPos , , &id WinGetPos , , &WW, &WH, 'ahk_id ' id while getKeyState("m", "P") { MouseGetPos &x, &y winMove x-(WW/2), y-(WH/2), , , 'ahk_id ' i...
by WKen
02 May 2024, 12:38
Forum: 请求帮助
Topic: 大量游戏只有a::b这种单行映射有效,send无效
Replies: 2
Views: 783

Re: 大量游戏只有a::b这种单行映射有效,send无效

DllCall #Requires AutoHotkey >=2.0 #Warn #SingleInstance ID := WinGetID("A") a::SendKey("b", ID) ; a::b s::SendKey("d", ID) ; s::d SendKey(Key, hWnd){ VK := GetKeyVK(Key),SC := GetKeySC(Key) DllCall("keybd_event", "UChar", VK, "UChar", SC, "UInt", 0, "UPtr", 0) Sleep 100 DllCall("keybd_event", "UCh...
by WKen
24 Apr 2024, 02:39
Forum: Scripts and Functions (v2)
Topic: CreateImageButton() - 2024-01-01
Replies: 50
Views: 13284

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: 297

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

我曾经询问过,可能需要库才能做到,悬停高亮和获取文本演示 #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 (vWinClass = "CabinetWClass" || vWi...
by WKen
26 Feb 2024, 14:55
Forum: 请求帮助
Topic: listview 换行问题 Topic is solved
Replies: 1
Views: 356

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: 463

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

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

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: 3446

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: 3446

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: 695

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: 440

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: 50
Views: 13284

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: 1006

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: 2090

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: 309

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: 5071

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: 329

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

Go to advanced search