Search found 32 matches

by hyaray
07 Jul 2020, 11:03
Forum: 脚本函数
Topic: AHK源代码加密器 v3.0
Replies: 75
Views: 36711

Re: AHK源代码加密器 v3.0

好东西,可惜不支持v2语法。。。叹惜
by hyaray
07 Feb 2020, 00:09
Forum: AutoHotkey v2 Help
Topic: BUG?msgbox(func()) is ok, msgbox(res := func()) changed
Replies: 4
Views: 2156

Re: BUG?msgbox(func()) is ok, msgbox(res := func()) changed

Thanks very much!
maybe the buffer error? But I still don't know how to deal this.
My own code only 30 lines(start with F9::)
v2 has few users, will this problem be solved :wtf: :wtf:
by hyaray
06 Feb 2020, 03:00
Forum: 请求帮助
Topic: 有人用v2吗?a104开始不断修改了语法,又不兼容了
Replies: 0
Views: 2349

有人用v2吗?a104开始不断修改了语法,又不兼容了

ObjSetCapacity改成2个参数了,导致原来的clip.ahk库都失效了,
这些修改不知道如何应对。
还遇到个BUG,把函数返回值赋给变量再msgbox就出错了,直接msgbox函数就正常,见
https://www.autohotkey.com/boards/viewtopic.php?f=37&t=72279
v2现在又被抛弃了,心凉凉 :sick: :sick:
by hyaray
06 Feb 2020, 02:07
Forum: 请求帮助
Topic: 求助各位大佬两个键如何互换, Topic is solved
Replies: 2
Views: 7247

Re: 求助各位大佬两个键如何互换, Topic is solved

注册表修改按键.txt
(3.35 KiB) Downloaded 87 times
LWin和LAlt互换.txt
(195 Bytes) Downloaded 84 times
第2个文件改成reg能直接使用,macbook键盘用的
by hyaray
05 Feb 2020, 12:04
Forum: AutoHotkey v2 Help
Topic: BUG?msgbox(func()) is ok, msgbox(res := func()) changed
Replies: 4
Views: 2156

BUG?msgbox(func()) is ok, msgbox(res := func()) changed

RemoteTreeView_v2.ahk msgbox(MyTV.GetText(hItem)) ;✓ msgbox(txt := MyTV.GetText(hItem)) ;╳ I use class RemoteTreeView to get items in SysTreeView321, set value to var, the value changed, this puzzled me a lot :headwall: :headwall: I use v2 a102, attachments is gif and ahk scripts(hotkey is F9), use...
by hyaray
03 Jan 2020, 20:50
Forum: AutoHotkey v2 Development
Topic: Goodbye, v2!
Replies: 5
Views: 2942

Re: Goodbye, v2!

v2 a104 changes something, my script can't work.
so a103 is the finally version for me.
I love v2 indeed, unfortunately v1 is still the major version,
I am truly grateful to you for what you have done, thanks!!
by hyaray
07 Dec 2019, 10:09
Forum: Ask For Help
Topic: how to user "Last Found" Window" in function? Topic is solved
Replies: 4
Views: 1858

Re: how to user "Last Found" Window" in function? Topic is solved

worked now!! :bravo: :bravo:

Code: Select all

    ;send by WM_CHAR
    sendP(str, winTitle:="")
    {
        ctl := (ControlGetFocus(winTitle) || WinGetID(winTitle))
        loop parse, str
            PostMessage(0x102, ord(A_LoopField),, ctl, winTitle)
    }
by hyaray
07 Dec 2019, 03:58
Forum: Ask For Help
Topic: how to user "Last Found" Window" in function? Topic is solved
Replies: 4
Views: 1858

Re: how to user "Last Found" Window" in function? Topic is solved

while can't get ctl, it failed. :facepalm: ;NOTE send by WM_CHAR sendP(str, winTitle:="") { ctl := ControlGetFocus(winTitle) loop parse, str PostMessage(0x102, ord(A_LoopField),, [ctl, winTitle]*) } use if else can work well ;NOTE send by WM_CHAR sendP(str, winTitle:="") { ctl := ControlGetFocus(win...
by hyaray
06 Dec 2019, 20:09
Forum: Ask For Help
Topic: how to user "Last Found" Window" in function? Topic is solved
Replies: 4
Views: 1858

how to user "Last Found" Window" in function? Topic is solved

I have to write 4 kind of PostMessage if ctl or winTitle is omitted f(winTitle:="") { ctl := ControlGetFocus(winTitle) if ctl { if strlen(winTitle) PostMessage(**, **,, ctl, winTitle) else PostMessage(**, **,, ctl) } else { if strlen(winTitle) PostMessage(**, **,,, winTitle) else PostMessage(**, **)...
by hyaray
19 Nov 2019, 21:29
Forum: Ask For Help
Topic: Problem getting Photoshop tool panel WM_COMMAND
Replies: 14
Views: 3724

Re: Problem getting Photoshop tool panel WM_COMMAND

there's a simple way to get/set currentTool ComObjActive("Photoshop.application").currentTool ComObjActive("Photoshop.application").currentTool := "moveTool" I don't know how to operate Photoshop by command with ahk. user plugin "ScriptingListener" can record js code, but it's heavy and hard to conv...
by hyaray
28 Sep 2019, 11:03
Forum: Ask For Help
Topic: how to add method to [], ex: [1,2,3].join(",") Topic is solved
Replies: 4
Views: 599

Re: how to add method to [], ex: [1,2,3].join(",") Topic is solved

Thanks very much for you answer!!
I found it's not perfect.
StrSplit("abc") is not fit for this :yawn: :yawn:
by hyaray
22 Sep 2019, 23:03
Forum: Ask For Help
Topic: how to add method to [], ex: [1,2,3].join(",") Topic is solved
Replies: 4
Views: 599

how to add method to [], ex: [1,2,3].join(",") Topic is solved

[1,2,3].length() is mainly used,
I want to add user method, like "join" and so on...

String can use code below to specify class,
so I can write any method in class _String.
and use method in class "abc".toArray()

Code: Select all

"".base.base := _String ;user class
by hyaray
07 Aug 2019, 03:03
Forum: Ask For Help
Topic: get info from vim by ComObjActive, encoding help
Replies: 0
Views: 283

get info from vim by ComObjActive, encoding help

Vim provide a ole interface for other script to get information, get more help by ':help ole.txt' in Vim. my problem is if buffer string if chinese, encoding error, I don't know how to get current chinese string. :headwall: this is a demo of get expand('<cword>') oVim := ComObjActive("Vim.applicatio...
by hyaray
27 Jul 2019, 20:09
Forum: Ask For Help
Topic: how to get the document path of excel.exe like resmon.exe?
Replies: 3
Views: 518

Re: how to get the document path of excel.exe like resmon.exe?

Thanks, I tried, this only get the path of "Excel.exe",I want the path of "*.xlsx" :yawn: :yawn:
by hyaray
27 Jul 2019, 12:10
Forum: Ask For Help
Topic: how to get the document path of excel.exe like resmon.exe?
Replies: 3
Views: 518

how to get the document path of excel.exe like resmon.exe?

run "resmon.exe" and select "Excel.exe", in the "CPU" Tab, we can find document path with the type "file",
so what's the function used? winapi can do this, it sounds great :xmas: :xmas:

Best Regards!!
by hyaray
17 Jul 2019, 19:58
Forum: AutoHotkey v2 Help
Topic: has anyone wrote snippets for AutoHotkey v2
Replies: 1
Views: 828

has anyone wrote snippets for AutoHotkey v2

[Moderator's note: Topic moved from AutoHotkey v2 Development.]

I'm learning snippets for vim, it's great, but I don't have snippet for AutoHotkey v2.
this is a hard work for me:yawn:
by hyaray
28 May 2019, 18:36
Forum: Ask For Help
Topic: example #2 of "DriveEject" in help is not perfect
Replies: 1
Views: 301

example #2 of "DriveEject" in help is not perfect

DriveLetter := "I:" ; Set this to the drive letter you wish to eject. hVolume := DllCall("CreateFile" , "Str", "\\.\" . DriveLetter , "UInt", 0x80000000 | 0x40000000 ; GENERIC_READ | GENERIC_WRITE , "UInt", 0x1 | 0x2 ; FILE_SHARE_READ | FILE_SHARE_WRITE , "UInt", 0 , "UInt", 0x3 ; OPEN_EXISTING , "...
by hyaray
25 May 2019, 02:01
Forum: AutoHotkey v2 Help
Topic: bug? obj.GetCapacity() != result in ahk v1
Replies: 1
Views: 761

bug? obj.GetCapacity() != result in ahk v1

Code: Select all

o := {"a":"aa","b":"bb",2:"c","c":"d","e":"f"}
MsgBox(o.GetCapacity() . " " . o.Length() . " " . o.Count()) ;5 2 5
in ahk v1, return 8 2 5 :headwall: :headwall:

by the way, is there a build-in method to know a var([1,2] or {"a":"aa",2:"bb"}) is object or a array??
thanks a lot!!! :xmas:
by hyaray
07 May 2019, 02:12
Forum: Ask For Help
Topic: judge var isArray or isObject?
Replies: 6
Views: 918

judge var isArray or isObject?

I want a function "getType", Thanks!! :wtf: :wtf:

Code: Select all

getType([1,2]) ;return "Array"

Code: Select all

getType({"a":"aa", "b","bb"}) ;return "Object"

Go to advanced search