Search found 177 matches

by jethrow
18 Feb 2015, 15:11
Forum: Ask For Help
Topic: Ie issue in IEGET
Replies: 10
Views: 3390

Re: Ie issue in IEGET

Do have multiple tabs in the same window?
by jethrow
15 Feb 2015, 01:26
Forum: Tutorials
Topic: Classes in AHK, a Dissection (Advanced)
Replies: 50
Views: 43008

Re: Classes in AHK, a Dissection (Advanced)

Concerning class semantics, here is a related conversation: Keyword Prototype instead of Class

I generally agree with Lexikos' semantics viewpoint - I just think it may lead to confusion with folks who are coming from or going to a Class-based programming language.
by jethrow
11 Feb 2015, 19:30
Forum: Ask For Help
Topic: COM, use existing Internet Explorer?
Replies: 3
Views: 2912

Re: COM, use existing Internet Explorer?

WARNING - off topic ... kinda I experimented a bit with this a couple of years ago. In case it serves as example/inspiration ... Though your code that is relevant to the OP can be found in the link provided by kon, you do provide a nice example of using jQuery: ; Set Vars IID := "{332C4427-26CB-11D...
by jethrow
10 Feb 2015, 18:19
Forum: Ask For Help
Topic: resolving a variable
Replies: 3
Views: 1086

Re: resolving a variable

... but I do not want to resolve the object first to var ... data.d is an expression. The way to deref a string plus expression is to resolve the expression to a variable first, then do a standard double-deref: C7 := "AHK" six := 6 seven := six + 1 MsgBox % C%seven% ; ERROR: ; MsgBox % C%(six + 1)%...
by jethrow
09 Feb 2015, 16:59
Forum: Ask For Help
Topic: Speeding up com control of Excel
Replies: 6
Views: 2499

Re: Speeding up com control of Excel

There isn't much in your code that should be slowing down the script - let us know if there are areas that are performing poorly. You could increase performance (though you probably won't notice) by saving object references rather than re-accessing them from the Application object each time: Expand:...
by jethrow
09 Feb 2015, 14:14
Forum: Ask For Help
Topic: Speeding up com control of Excel
Replies: 6
Views: 2499

Re: Speeding up com control of Excel

It seems to run much faster if the document is not visible. This probably has more to do with screen updating that the sheet actually being visible. Here is an example: xl.ScreenUpdating := False Loop 10000 { xl.Range("A1").value := A_Index } xl.ScreenUpdating := True Try that with & without the Sc...
by jethrow
03 Feb 2015, 01:42
Forum: AutoHotkey v2 Development
Topic: [Wish] One line while loop (similar to if)
Replies: 45
Views: 19874

Re: [Wish] One line while loop (similar to if)

I really doubt that it's about there being less typing, either way. I agree. I'm gonna go out on a limb & say it's because of the restrictions on how you can write your syntax (not un-similar to complaints against python). I don't want to add another line to my code - I want the simple condition & ...
by jethrow
31 Jan 2015, 13:55
Forum: Ask For Help
Topic: Accessing javascript object values from IE COM obect
Replies: 3
Views: 1967

Re: Accessing javascript object values from IE COM obect

IID := "{332C4427-26CB-11D0-B483-00C04FD90119}" ;// IID_IHTMLWindow2 window := ComObj(9,ComObjQuery(wb,IID,IID),1) MsgBox % window.object.boby.0.toString() I believe it has to do with permissions on the window object. Another webpage shouldn't be able to call wb.document.parentWindow & access the w...
by jethrow
22 Jan 2015, 15:09
Forum: Ask For Help
Topic: Classes and variables.
Replies: 14
Views: 3465

Re: Classes and variables.

Note that HotKeyIt's example uses an instance for sub-class B, whereas mine uses the same sub-class object: MsgBox % &obj1.B " vs " &obj2.B ... if using a new instance for sub-class B is OK, I'd recommend going that route ... though I'd do something like this: Class A { Var:=1 __New(){ this.B:= new ...
by jethrow
22 Jan 2015, 11:05
Forum: Ask For Help
Topic: Classes and variables.
Replies: 14
Views: 3465

Re: Classes and variables.

I prefer to think of these all as objects with key & values, rather than Class Instance variables. Then you just need to think about what object your are accessing. Anyways, here's an approach: Class A{ ; Pass in Instance Variable "Number" __New(number) { this.number := number } ; Create property B ...
by jethrow
22 Jan 2015, 10:31
Forum: Ask For Help
Topic: Classes and variables.
Replies: 14
Views: 3465

Re: Classes and variables.

A sub-object by default does not know what it's parent is - you would have to code that. Keep in mind that with the code from your op, each new instance of A has the same sub-object B: Test1:= New A Test2:= New A MsgBox % "Test1 != Test2:`n`t" &Test1 " != " &Test2 . "`n`nTest1.B = Test2.B: `n`t" &Te...
by jethrow
21 Jan 2015, 13:26
Forum: Ask For Help
Topic: __Delete()
Replies: 16
Views: 3908

Re: __Delete()

Just to be clear, the __Delete meta-function is called when an object is deleted ... that is, when the object loses all references. This would occur when the object variable is reassigned, the script terminates, or the object variable is cleared due to variable scope. For example, using your Class a...
by jethrow
20 Jan 2015, 14:01
Forum: Tutorials
Topic: Classes in AHK, Basic tutorial.
Replies: 28
Views: 65471

Re: Classes in AHK, Basic tutorial.

So what is class? Imagine that you want to build a Car. To make it you have to have Plan of it. This plane is Class. In AHK it looks like this: ... So what is Instance? Imagine that you build Car using Plan, and this Car is Instance. So Plan is Class and Car is Instance. In AHK creating Instance fr...
by jethrow
20 Jan 2015, 13:41
Forum: Ask For Help
Topic: Help Sending Keys to Embedded Trident Brower
Replies: 2
Views: 1326

Re: Help Sending Keys to Embedded Trident Brower

The page has a keyboard handler and is written in Javascript ... I'd do one of the following: Figure out the API behind the keyboard handler & utilize it for what you want to do. Manually execute your keystrokes & determine the wParam, lParam, nMsg, hWnd values passed to WM_KEYDOWN. Then simply cal...
by jethrow
10 Jan 2015, 10:33
Forum: Ask For Help
Topic: Dictionaries / Associative Arrays in ahk
Replies: 2
Views: 1638

Re: Dictionaries / Associative Arrays in ahk

I'm not a programmer but have been using AutoHotKey for years and am learning Python. Since you're not a programmer, we're on the same page. Comparing AutoHotkey to Python in terms of usage is Ok, but comparing under-the-hood prolly isn't that useful. The Scripting.Dictionary object is a COM object...
by jethrow
03 Dec 2014, 12:03
Forum: Ask For Help
Topic: [SOLVED] find table information on IE (HTML DOM?)
Replies: 4
Views: 2441

Re: find table information on IE (HTML DOM?)

Blackholyman wrote:You Can also use the table element and loop over its cell elements with a for-loop
Could you provide an example?
by jethrow
23 Nov 2014, 10:49
Forum: Ask For Help
Topic: COM Object Introspection
Replies: 7
Views: 3009

Re: COM Object Introspection

My bad - GetFuncDesc is the 6th member of the ITypeInfo Interface.
by jethrow
22 Nov 2014, 22:08
Forum: Ask For Help
Topic: COM Object Introspection
Replies: 7
Views: 3009

Re: COM Object Introspection

I am a little unsettled by the low-level tinkering with the vtable, but I suppose that is unavoidable and I will get used to it eventually ... I searched for a win32 API function or method named IsMemberOf , but could not find anything relevant. What exactly is that DllCall calling? Join the club -...
by jethrow
19 Nov 2014, 18:41
Forum: Ask For Help
Topic: COM Object Introspection
Replies: 7
Views: 3009

Re: COM Object Introspection

You could look into IsMemberOf

Code: Select all

IsMemberOf(obj, name) {
	return, DllCall(NumGet(NumGet(1*p:=ComObjValue(obj))+A_PtrSize*5), "Ptr",p, "Ptr",VarSetCapacity(iid,16,0)*0+&iid, "Ptr*",&name, "UInt",1, "UInt",1024, "Int*",dispID)=0 && dispID+1
}
by jethrow
28 Oct 2014, 01:48
Forum: Offtopic
Topic: « What's on your mind? »
Replies: 4453
Views: 1059148

Re: « What's on your mind? »

Is it normal to enjoy going through dozens+ of production Korn Shell scripts line-by-line?

What about if it keeps you up at night thinking about all the optimization opportunities?

:ugeek:

Go to advanced search