Search found 506 matches

by trismarck
14 Mar 2015, 07:19
Forum: Ask for Help (v1)
Topic: get data stored in memory
Replies: 5
Views: 1821

Re: get data stored in memory

In the expression mode, Offset = 0 and Type = "Float" are comparisons, not assignments ( := ). The return value of a comparison is either true or false. When NumGet() gets an unrecognized type as the third parameter, NumGet() uses the default type UPtr instead. If a variable was not assigned a value...
by trismarck
14 Mar 2015, 06:37
Forum: Suggestions on Documentation Improvements
Topic: [Archived, Locked] Suggestions on documentation improvements
Replies: 688
Views: 289443

Re: Suggestions on documentation improvements

I think that the users will be thankful that the documentation isn't as rambling as your posts. To put this in perspective, I've once had the following situation. I was reading a thread on the forum and at some point I've encountered this post. After reading the beginning of it, I said to myself: "...
by trismarck
13 Mar 2015, 04:53
Forum: Suggestions on Documentation Improvements
Topic: [Archived, Locked] Suggestions on documentation improvements
Replies: 688
Views: 289443

Re: Suggestions on documentation improvements

Insert, Remove, GetAddress, GetCapacity, HasKey and _NewEnum operate on key-value pairs . The object's base is not a key-value pair and can only be accessed via the [] or . operators. Like properties implemented with __Set and __Get, the behaviour of .base can be overridden by storing a key-value p...
by trismarck
12 Mar 2015, 08:58
Forum: Suggestions on Documentation Improvements
Topic: [Archived, Locked] Suggestions on documentation improvements
Replies: 688
Views: 289443

Re: Suggestions on documentation improvements

Yes. Thanks. So perhaps there could be symmetry between the description of ObjInsert() and ObjRemove() in the context of how they work with object's base (or actually, how they don't work). //edit: after rethinking - there is a difference between setting the key to an empty value and removing the ke...
by trismarck
12 Mar 2015, 05:01
Forum: Suggestions on Documentation Improvements
Topic: [Archived, Locked] Suggestions on documentation improvements
Replies: 688
Views: 289443

Re: Suggestions on documentation improvements

Perhaps it could be documented that just like ObjInsert() bypasses the special behaviour of the base key, ObjRemove() does this also - i.e. doing ObjRemove(obj, "base") won't remove/return the base of the object.
by trismarck
11 Mar 2015, 07:14
Forum: Ask for Help (v1)
Topic: Pseudo-Properties Syntax Sugar Question
Replies: 10
Views: 3836

Re: Pseudo-Properties Syntax Sugar Question

var.int[var] := 3 That's even worse, in regard to readability and understanding what the heck the code is supposed to do. :facepalm: (this means: nothing what I think is correct) I assume this one is what you meant by "assign the value back to the variable".) Yes. There is also this, for reference:...
by trismarck
11 Mar 2015, 04:39
Forum: Ask for Help (v1)
Topic: Pseudo-Properties Syntax Sugar Question
Replies: 10
Views: 3836

Re: Pseudo-Properties Syntax Sugar Question

Even if you use a function (not inside a class) and define ByRef this , it only affects the variable used by the caller, not any other references to the object. This probably pertains to this: Passing this by value prevents the scenario in which assigning this an empty string also destroys the obje...
by trismarck
10 Mar 2015, 12:16
Forum: Ask for Help (v1)
Topic: Pseudo-Properties Syntax Sugar Question
Replies: 10
Views: 3836

Re: Pseudo-Properties Syntax Sugar Question

Thanks trismark! Very helpful. Let me try to re-state it slightly differently to make sure I've got it right and then ask a question... In order for the behavior to work as I'm intending, the underlying variable must be passed byref not byval. That part makes sense to me. I also think I understand ...
by trismarck
09 Mar 2015, 14:12
Forum: Ask for Help (v1)
Topic: Pseudo-Properties Syntax Sugar Question
Replies: 10
Views: 3836

Re: Pseudo-Properties Syntax Sugar Question

For the Default Base Object, in the context of this , Properties work like meta-functions, because Properties, like meta-functions, use this . I'm trying to extend out your byref/byval logic to understand then why it wouldn't work with the Property{ Get{} Set{} } syntax. In other words, I think you'...
by trismarck
09 Mar 2015, 05:02
Forum: Ask for Help (v1)
Topic: Pseudo-Properties Syntax Sugar Question
Replies: 10
Views: 3836

Re: Pseudo-Properties Syntax Sugar Question

If I remember correctly, the implicit this parameter is not passed ByRef. So if __Set is inside of a class, this is just a local variable inside of the meta-function (vs a ByRef variable that points to the actual variable x , whose contents we want to overwrite). Which would actually mean that this ...
by trismarck
09 Mar 2015, 04:37
Forum: Ask for Help (v1)
Topic: How do I insert number counter 01 02 03...
Replies: 9
Views: 3979

Re: How do I insert number counter 01 02 03...

Loop w/o any argument is an infinite loop. But it's still a loop. In non-expression mode, %%'s have to be used around A_Index to actually use the value of A_Index variable. Here is how to send multiple counters with a Loop: Loop, 10 Send, % Format("{:02d} ", A_Index) ; The example uses the expressi...
by trismarck
08 Mar 2015, 14:24
Forum: Ask for Help (v1)
Topic: How do I insert number counter 01 02 03...
Replies: 9
Views: 3979

Re: How do I insert number counter 01 02 03...

To make this somewhat reliable, you could insert a sleep between each keystroke (or set the same delay for all keystrokes with SetKeyDelay ). To make it more reliable, there are ways for waiting for the clipboard to contain data / waiting for activation or existence of windows and so on. Loop, 10 { ...
by trismarck
08 Mar 2015, 10:30
Forum: Ask for Help (v1)
Topic: Get an error when calling a method that does not exist?
Replies: 17
Views: 6986

Re: Get an error when calling a method that does not exist?

Using Functors would change the target of the invocation, which (preserving the target) is needed to detect the existence of the method in the inheritance chain the target is part of. Huh? The target of invocation is this , which is passed as an additional parameter to the functor in place of the m...
by trismarck
08 Mar 2015, 05:17
Forum: Bug Reports
Topic: [Fixed] Wrong line number when throwing out of meta-function
Replies: 4
Views: 2196

Re: Wrong line number when throwing out of meta-function

Tested, works. Thanks for fixing this Lexikos.
by trismarck
07 Mar 2015, 08:33
Forum: Bug Reports
Topic: [Fixed] Wrong line number when throwing out of meta-function
Replies: 4
Views: 2196

Re: Wrong line number when throwing out of meta-function

So what happens is that because the last line executed before entering the upper __Call was the last line of the lower __Call , .line of Exception("", -1) points to the last line of lower __Call . For example, a value of -1 sets Exception.What to the current function or subroutine and Exception.Line...
by trismarck
06 Mar 2015, 15:07
Forum: Ask for Help (v1)
Topic: How should bad method names be handled?
Replies: 7
Views: 2294

Re: How should bad method names be handled?

Note also that by doing myClass := new MyClass(), the variable that originally held the class object gets overwritten.
by trismarck
06 Mar 2015, 06:24
Forum: Bug Reports
Topic: [Fixed] Wrong line number when throwing out of meta-function
Replies: 4
Views: 2196

[Fixed] Wrong line number when throwing out of meta-function

Seems that e.line in Exception thrown in dx contains to the wrong line number. After removing __Call from cx , the line number is correct. class dx { __Call() { throw, Exception("Property can't be called." , -1) } } Class cx extends dx { __Call() { } ; e.line contains this line number } x := new cx(...
by trismarck
06 Mar 2015, 06:11
Forum: Ask for Help (v1)
Topic: How to modify color temperature of screen
Replies: 15
Views: 5684

Re: How to modify color temperature of screen

Unrelated, but to save eyes, there was also the invert colors script. For >WinXP, there is a custom software for this: NegativeScreen. I don't use those (I just adjust settings of the monitor manually), but perhaps sb will find them useful.
by trismarck
06 Mar 2015, 05:26
Forum: Ask for Help (v1)
Topic: Get an error when calling a method that does not exist?
Replies: 17
Views: 6986

Re: Get an error when calling a method that does not exist?

Unless required by functionality, a well-designed __Get should not tamper with or override the result when the caller tries to access a key which happens to be a method(declared in the class) or a Property . Coco, I agree with that (~well-designed meta-functions / classes should work in every case,...

Go to advanced search