Search found 647 matches

by arcticir
18 Jul 2020, 23:41
Forum: AutoHotkey v2 Development
Topic: Smarter dllcall()
Replies: 3
Views: 1879

Smarter dllcall()

The recent progress of V2 is surprising :bravo:
I found that PY calls DLL without specifying the parameter type. This is very convenient, using DLL becomes very simple. So can we achieve the same effect in V2?
by arcticir
11 Jul 2020, 04:30
Forum: AutoHotkey v2 Development
Topic: Conflicts caused by V2
Replies: 10
Views: 4751

Re: Conflicts caused by V2

Yes, I agree with you. If I am using V1, I will not be confused. But when you start using V2 and feel that it corrects countless shortcomings of V1, it is difficult for you to return to V1. The problem with V2 is that as the main version of the AHK language, its development is disordered and unpredi...
by arcticir
11 Jul 2020, 00:07
Forum: AutoHotkey v2 Development
Topic: Conflicts caused by V2
Replies: 10
Views: 4751

Conflicts caused by V2

I used V2 many years ago, but recently when I needed to write new code, I fell into conflict. I am using A-104, which is obviously old. I will not consider it when I write new code. So use the latest version A-115? It is also not an ideal candidate. Back V1? Not under consideration. After a month of...
by arcticir
27 May 2020, 08:57
Forum: AutoHotkey v2 Help
Topic: How is SoundSetVolume called correctly and simply?
Replies: 3
Views: 422

Re: How is SoundSetVolume called correctly and simply?

@Ragnar
Thank you. Looking forward to the new version.
by arcticir
26 May 2020, 07:48
Forum: AutoHotkey v2 Help
Topic: How is SoundSetVolume called correctly and simply?
Replies: 3
Views: 422

How is SoundSetVolume called correctly and simply?

In the old version of V2, its use was very simple: SoundSetVolume -55

However, in the latest version, I tried all the methods and couldn't make it work:

Code: Select all

loop 20
{
	i:=a_index
	loop 20
	SoundSetVolume -55,a_index,i
}
How is SoundSetVolume called correctly and simply?
by arcticir
24 Apr 2020, 07:39
Forum: AutoHotkey v2 Development
Topic: Do we need to return multiple variables?
Replies: 14
Views: 3012

Re: Do we need to return multiple variables?

Helgef When I get used to this feature in other languages, I think it is very important. You deny its necessity, have you really used it? If you don't really use it, you can't understand its importance. Just like ahk's support for objects, even if there is no object, ahk can also achieve the functi...
by arcticir
23 Apr 2020, 08:19
Forum: Scripts and Functions
Topic: NotStr() : Switch between multiple states
Replies: 43
Views: 3772

Re: NotStr() : Switch between multiple states

Here is a similar scheme.

Code: Select all

MsgBox str_skip("a","a/b/c")

str_skip(t,s,k:="/") => (RegExMatch(k s k, "(" k "([^" k "]+))?.*" k t k "(([^" k "]+)" k ")?", t),t.value(4) or t.value(2))
by arcticir
23 Apr 2020, 07:56
Forum: AutoHotkey v2 Development
Topic: Do we need to return multiple variables?
Replies: 14
Views: 3012

Do we need to return multiple variables?

Many modern languages ​​support this feature, and I find it very convenient and necessary.
Do you think AHK needs this feature?

x,y := MouseGetPos()
color := PixelGetColor(MouseGetPos(),"Alt")
var, err := iniread("test.ini","default","test")
by arcticir
25 Mar 2020, 09:59
Forum: 脚本函数
Topic: [v2] 简繁转换
Replies: 0
Views: 1200

[v2] 简繁转换

注意 简繁并不完全对应。 繁转简,采用富集策略,存在 一对多 、多通假等状况。 简转繁,则追求简洁无错。 kanji(byref s,t:=""){ ; r= 1-简繁 ""-繁简 static fj,jf if t { if !jf jf:=kanji_jf() to:=jf } else { if !fj fj:=kanji_fj() to:=fj } Loop Parse,s st.=ObjRawGet(to,A_Loopfield) or A_Loopfield Return st } kanji_fj(){ t:={} loop parse,"丟丢並并乹乾亁乾亂乱亙亘亞亚佇伫併并來来...
by arcticir
05 Mar 2020, 07:47
Forum: AutoHotkey v2 Scripts and Functions
Topic: [H2] sci() - SciLexer Class
Replies: 0
Views: 1846

[H2] sci() - SciLexer Class

Note: It applies to AHK_H V2 You need to specify the absolute path of dll. It inverts the A/B parameter, so from sci.settext(0,"test") to sci.settext("test") It lacks an error correction mechanism. Reference Forum Existing Lib gui:=GuiCreate("+Border -DPIScale",a_name) sci:=sci(gui.hwnd,w:=A_ScreenW...
by arcticir
05 Mar 2020, 07:13
Forum: AutoHotkey v2 Scripts and Functions
Topic: [H2] sq() - SQLite Class
Replies: 0
Views: 1633

[H2] sq() - SQLite Class

Note: It applies to AHK_H V2(106+) You need to specify the absolute path of sqlite3. The sqlite3 function is called like this: sq.close[] Code from @HotKeyIt Simple example: sq:=sq(a_ahkdir "\test.db") sq.set("create table if not exists test (a,b,c);") sq.set("INSERT INTO test (a,b,c) VALUES(1,2,3);...
by arcticir
21 Feb 2020, 05:22
Forum: AutoHotkey_H
Topic: How to distinguish between many types of object?
Replies: 12
Views: 3098

Re: How to distinguish between many types of object?

It does not help judge the two:
obj.__Enum or obj.OwnProps()
by arcticir
18 Feb 2020, 10:15
Forum: AutoHotkey_H
Topic: How to distinguish between many types of object?
Replies: 12
Views: 3098

Re: How to distinguish between many types of object?

Struct does not have hasMethod, hasMethod("__Enum ") does not seem to be the perfect solution.
by arcticir
16 Feb 2020, 15:49
Forum: AutoHotkey_H
Topic: How to distinguish between many types of object?
Replies: 12
Views: 3098

Re: How to distinguish between many types of object?

Thank you. We should consider that the source of many classes is unknown.
by arcticir
16 Feb 2020, 12:20
Forum: AutoHotkey_H
Topic: How to distinguish between many types of object?
Replies: 12
Views: 3098

Re: How to distinguish between many types of object?

Code: Select all

MsgBox [].base.base.__Class ;Object
So you have no characteristics.

In fact, there is only one place I need to judge its exact type:
for k,v in obj ;--->> obj? or obj.OwnProps()?
by arcticir
16 Feb 2020, 09:40
Forum: AutoHotkey_H
Topic: function return Multiple values
Replies: 4
Views: 2171

Re: function return Multiple values

Thanks. I think "do not break the current" is a pseudo-proposition, because most rules of V1 have been broken by V2.
v2 existing rules are subject to much criticism, are constantly changing, and there is no need to be conservative.
by arcticir
16 Feb 2020, 09:12
Forum: AutoHotkey_H
Topic: How to distinguish between many types of object?
Replies: 12
Views: 3098

Re: How to distinguish between many types of object?

such?

Code: Select all

Class test{
}
t:=test.new()
MsgBox Type(t) ;Class
MsgBox t.prototype.__Class ;test
by arcticir
16 Feb 2020, 08:16
Forum: AutoHotkey_H
Topic: How to distinguish between many types of object?
Replies: 12
Views: 3098

How to distinguish between many types of object?

Type () can be used to distinguish obj-map_arr, but I don't know how to classify some special objects, such as class. Does the class object have any characteristics that can be used to judge? for i,n in type(t)="object"?t.OwnProps():t The current solution is to create a list of all possible occurren...
by arcticir
16 Feb 2020, 08:05
Forum: AutoHotkey_H
Topic: function return Multiple values
Replies: 4
Views: 2171

Re: function return Multiple values

Yes, it must be read and written multiple times. r:=t(),x:=t[1],y:=t[2] If you ask why t[1]t[2] is not used directly, obviously what is discussed here is how to return multiple values. ;) V2 has undergone tremendous changes, has many advantages, and is somewhat unacceptable. If the function supports...

Go to advanced search