Search found 3307 matches

by Helgef
15 Nov 2018, 18:26
Forum: Ask For Help
Topic: [DllCall / NumGet] How to read the value of a pointer to pointer?
Replies: 9
Views: 294

Re: [DllCall / NumGet] How to read the value of a pointer to pointer?

var := 123 MsgBox % ptr_var := &var ; prints something resembling an address MsgBox % NumGet(ptr_var, 0, "Int") ; prints something else MsgBox % NumGet(ptr_var+0, 0, "Int") ; prints something else entirely Please see, var := 123 ptr_var := &var ; ptr_var stores the address of var as a string, simil...
by Helgef
15 Nov 2018, 04:40
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 1782

Re: Regression In ObjGetBase(Object) and ObjSetBase(Object, BaseObject)

Indeed, the undesirable behavior is documented. I never said it was not. You posted in bug reports, so you suggest there is a problem (as in not working) with documented behaviour. There clearly isn't, you need to post in the wish list or ask for help. If you pay close attention you can see that th...
by Helgef
15 Nov 2018, 04:18
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 1782

Re: Regression In ObjGetBase(Object) and ObjSetBase(Object, BaseObject)

This is about knowing whether a type can be made to work with an operation at all, and how.
v1,

Code: Select all

can_set_base(value){
	return objgetcapacity(value) != ""
}
:cry:

Cheers.
by Helgef
15 Nov 2018, 04:09
Forum: Ask For Help
Topic: How to write this shorter?
Replies: 8
Views: 256

Re: How to write this shorter?

Very good kczx3 :thumbup:

Cheers.
by Helgef
15 Nov 2018, 04:08
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 1782

Re: Regression In ObjGetBase(Object) and ObjSetBase(Object, BaseObject)

ObjGetBase(Object) and ObjSetBase(Object, BaseObject) used to return an empty string when they failed. When? An exception is thrown if Object is of an incorrect type. src: ObjGetBase It is clearly documented behaviour. The code above confirms that the function object Func("Hello") is indeed an obje...
by Helgef
10 Nov 2018, 11:35
Forum: Ask For Help
Topic: How to write this shorter?
Replies: 8
Views: 256

Re: How to write this shorter?

An other approach would be to use properties for your object, consider this example, class commandTypeObj { a { set { this._b := this._c := !value return this._a := value } get { return this._a } } b { set { this._a := this._c := !value return this._b := value } get { return this._b } } c { set { th...
by Helgef
10 Nov 2018, 07:46
Forum: Ask For Help
Topic: How to write this shorter?
Replies: 8
Views: 256

Re: How to write this shorter?

You only copy reference, if that is what worries you. You can do, f(it) { it.is_multiline_rr && it.is_r := false } f(commandTypeObj) to avoid extra references / variables. in v2 you can do, f(it) => it.is_multiline_rr && it.is_r := false. f commandTypeObj and f can be nested in an other function too...
by Helgef
10 Nov 2018, 07:23
Forum: Ask For Help
Topic: How to write this shorter?
Replies: 8
Views: 256

Re: How to write this shorter?

Another, (it := commandTypeObj).is_multiline_rr && it.is_r := false.

Cheers.
by Helgef
10 Nov 2018, 06:05
Forum: Scripts and Functions
Topic: [AHK v2] Evaluate Function
Replies: 2
Views: 335

Re: [AHK v2] Evaluate Function

A few simple tests works fine, nice work. Thanks for sharing.

Cheers :wave:.
by Helgef
10 Nov 2018, 05:25
Forum: Scripts and Functions
Topic: [AHK v2] Simple RegExMatch Tester (GUI) with RichEdit
Replies: 3
Views: 321

Re: [AHK v2] Simple RegExMatch Tester (GUI) with RichEdit

Looks good, thanks for sharing :thumbup:.

Cheers.
by Helgef
08 Nov 2018, 10:02
Forum: Ask For Help
Topic: How to get Thread Id?
Replies: 6
Views: 293

Re: How to get Thread Id?

@ jeeswg, threads and GetCurrentThreadId refer to different things.
by Helgef
06 Nov 2018, 02:52
Forum: Ask For Help
Topic: generate a 'random' number Topic is solved
Replies: 10
Views: 444

Re: generate a 'random' number Topic is solved

if I set the seed, and do Random, and do Random again, and reload the script and do the same thing again, why don't I get exactly the same numbers.
That would be a bug, more likely though, you are mistaken or I do not understand what you are trying to do.

Cheers.
by Helgef
05 Nov 2018, 13:39
Forum: Ask For Help
Topic: AHK2: Send[Mode]Play and Click
Replies: 3
Views: 100

Re: AHK2: Send[Mode]Play and Click

I guess enabled on any modern system. I never saw sendplay produce any output on any system.
by Helgef
05 Nov 2018, 13:24
Forum: Ask For Help
Topic: AHK2: Send[Mode]Play and Click
Replies: 3
Views: 100

Re: AHK2: Send[Mode]Play and Click

Does it work for you in v1? Note,
sendplay wrote:Warning: SendPlay may have no effect at all if UAC is enabled, even if the script is running as an administrator. For more information, refer to the FAQ.
Src
Cheers.
by Helgef
05 Nov 2018, 13:20
Forum: Ask For Help
Topic: AHK2: #p::Pause Topic is solved
Replies: 2
Views: 89

Re: AHK2: #p::Pause Topic is solved

See :arrow: this.

Cheers.
by Helgef
01 Nov 2018, 06:39
Forum: AutoHotkey v2 Development
Topic: [a100] ControlGetHwnd issue
Replies: 21
Views: 1019

Re: [a100] ControlGetHwnd issue

I kept my OP short and sweet, stating no assumptions, hoping for clarification It took you two days to give a hint about what the "" in your code was supposed to mean. I can only assume you didn't read the documentation at all, because surely, you know that optional parameters are marked by being e...
by Helgef
31 Oct 2018, 06:10
Forum: AutoHotkey v2 Development
Topic: [a100] ControlGetHwnd issue
Replies: 21
Views: 1019

Re: [a100] ControlGetHwnd issue

Besides, occasionally you want to refer a control within a control within a window, necessitating a control hWnd to be used in the WinTitle parameter. No one said a control's hwnd can't be used in the wintitle parameter, the point is that the traget window / control is not considered in the search,...
by Helgef
29 Oct 2018, 11:18
Forum: AutoHotkey v2 Development
Topic: [a100] ControlGetHwnd issue
Replies: 21
Views: 1019

Re: [a100] ControlGetHwnd issue

it was simply unthinkable for me that the text option was available directly like this.
I guess it is done this way because the ambiguity is empirically known to be insignificant. :eh:
by Helgef
29 Oct 2018, 07:21
Forum: AutoHotkey v2 Development
Topic: [a100] ControlGetHwnd issue
Replies: 21
Views: 1019

Re: [a100] ControlGetHwnd issue

Sure, although type('') is String, '' isn't Text, I can agree. I do not know if searching for controls with no text is a thing. In any case, it should be an exception if it is not valid.

Go to advanced search