Search found 14 matches
- 08 May 2020, 07:51
- Forum: Ask for Help (v1)
- Topic: WBGet() fails when DOM Explorer opened on active tab
- Replies: 0
- Views: 294
WBGet() fails when DOM Explorer opened on active tab
For me, the code below fails to report the URL of the active IE tab when the DOM Explorer is open or had previously been open for that tab. Instead, it throws Error: 0x80020003 - Member not found Specifically: LocationURL I have found this issue documented nowhere. How can I make my application more...
- 08 May 2020, 07:36
- Forum: Ask for Help (v1)
- Topic: ControlSend to a specific IE tab when user switches to another tab
- Replies: 0
- Views: 297
ControlSend to a specific IE tab when user switches to another tab
I have an AHK script that, when it starts, picks up what tab is active and selected by the user using WBGet(). The script needs to paste text from the clipboard into a form on that tab (referenced by "wb", the web browser object obtained from WBGet()) and does so via ControlSend , Internet Explorer_...
- 20 Apr 2020, 06:02
- Forum: Ask for Help (v1)
- Topic: GUI ListView: Is it possible to enforce that some row stays selected at all times?
- Replies: 0
- Views: 356
GUI ListView: Is it possible to enforce that some row stays selected at all times?
The title says it, can I make sure in a ListView that always one item be selected? Because as of now, when I click somewhere on the blank area of the ListView, the last highlighted row gets deselected. I need exactly one row to be selected at any time as it determines the state of my application. (I...
- 18 Apr 2020, 12:58
- Forum: Ask for Help (v1)
- Topic: Classes: Are there situations in which a destructor will NOT be called?
- Replies: 1
- Views: 325
Classes: Are there situations in which a destructor will NOT be called?
I rely on a destructor to serialize data of a class instance to disk. So if the program quits normally, I can be sure that no data is lost since the destructor is called before the object is destroyed.
Are there situations, like crashes or exceptions, where I cannot be sure a destructor is called?
Are there situations, like crashes or exceptions, where I cannot be sure a destructor is called?
- 18 Apr 2020, 09:14
- Forum: Ask for Help (v1)
- Topic: In class inheritence, are both the derived class destructor and the base class destructor called?
- Replies: 2
- Views: 421
Re: In class inheritence, are both the derived class destructor and the base class destructor called?
Ok, that was my impression. Thanks
- 16 Apr 2020, 16:20
- Forum: Ask for Help (v1)
- Topic: In class inheritence, are both the derived class destructor and the base class destructor called?
- Replies: 2
- Views: 421
In class inheritence, are both the derived class destructor and the base class destructor called?
In C++, destructors are called in reverse order, i.e., first the derived class's destructor, then the base class's destructor. More importantly, they are BOTH called. In AHK, I have the impression that ONLY the derived class' destructor is called. Am I right? I would AHK lacking in this respect if t...
- 15 Apr 2020, 08:35
- Forum: Ask for Help (v1)
- Topic: Can I influence the order of destructor calls? One class depending on another without inheritance
- Replies: 5
- Views: 665
Re: Can I influence the order of destructor calls? One class depending on another without inheritance
Thanks swagfag, I tested your code snippet and can confirm it works as expected. It would appear the destruction order is fine. After further tinkering with my code I have been able to narrow down the issue: For me, on my machine running AHK 1.1.32.00, your code breaks for some variable names for th...
- 15 Apr 2020, 05:29
- Forum: Ask for Help (v1)
- Topic: Can I influence the order of destructor calls? One class depending on another without inheritance
- Replies: 5
- Views: 665
Can I influence the order of destructor calls? One class depending on another without inheritance
My AHK class "AppState" relies on another well-known AHK class, AutoHotkey-JSON [JSON.ahk], as found https://github.com/cocobelgica/AutoHotkey-JSON . More precisely, when my program quits, the state/settings of my app are to be written to a JSON file. Hence, in the destructor, I need to rely on JSON...
- 23 Jan 2019, 13:17
- Forum: Ask for Help (v1)
- Topic: How to send a keystroke to the Internet Explorer window/tab my AHK script created
- Replies: 0
- Views: 831
How to send a keystroke to the Internet Explorer window/tab my AHK script created
Hello dear AHK community, In my AHK code, I create a IE instance / window / tab with the following code: wb := ComObjCreate("InternetExplorer.Application") wb.visible := true wb.Navigate("https://www.mywebsite.com") I'd like to use ControlSend to occassionally send a certain keystroke to that same I...
- 21 Jan 2019, 10:29
- Forum: Ask for Help (v1)
- Topic: How to send a keystroke to an Internet Explorer window?
- Replies: 2
- Views: 910
Re: How to send a keystroke to an Internet Explorer window?
Thanks for the pointer, but I'm not sure where to go from there. The syntax is: ControlSend , Control, Keys, WinTitle, WinText, ExcludeTitle, ExcludeText "Keys" would be {Right} since I want to hit the right arrow key once. But how do I target the correct IE tab? EDIT: I opened a new thread for this...
- 08 Jan 2019, 18:06
- Forum: Ask for Help (v1)
- Topic: How to send a keystroke to an Internet Explorer window?
- Replies: 2
- Views: 910
How to send a keystroke to an Internet Explorer window?
Hello, let's assume I open a certain website through an IE instance: wb := ComObjCreate("InternetExplorer.Application") wb.visible := true wb.Navigate("https://www.mywebsite.com") That website accepts page navigation with the "arrow right" and "arrow left" keys. How can I send one "arrow right" keys...
- 19 Dec 2018, 16:02
- Forum: Ask for Help (v1)
- Topic: GUI multi-line edit: Insert string at cursor position Topic is solved
- Replies: 4
- Views: 1824
Re: GUI multi-line edit: Insert string at cursor position Topic is solved
I have come up with the following code that seems to fix the problem I stated earlier. It's a primitive solution exploiting the pattern I described. It counts the number of line breaks up until the caret and makes adjustments to the insert position. OnInsert: Gui, Submit, NoHide ; Get the info enter...
- 19 Dec 2018, 11:57
- Forum: Ask for Help (v1)
- Topic: GUI multi-line edit: Insert string at cursor position Topic is solved
- Replies: 4
- Views: 1824
Re: GUI multi-line edit: Insert string at cursor position Topic is solved
Thank you! It already looks good and in my testing seems to work perfectly when there is no line break. However, if you enter the following text 1234567890 1234567890 1234567890 and then move the cursor between the 1 and the 2 on the second line, click INSERT, and next move the cursor between the 1 ...
- 19 Dec 2018, 09:30
- Forum: Ask for Help (v1)
- Topic: GUI multi-line edit: Insert string at cursor position Topic is solved
- Replies: 4
- Views: 1824
GUI multi-line edit: Insert string at cursor position Topic is solved
Hello, in the following simplified example of an AHK GUI, there is a multi-line edit box and an "INSERT" button. The user is supposed to write a message (typically with a couple of line breaks) in the edit box, and when he clicks the "INSERT" button, an "INSERT" string is to be inserted right at the...