Search found 40 matches

by JoeSchmoe
26 Sep 2020, 21:59
Forum: AutoHotkey v2 Help
Topic: Getting a function reference to a method in a class you are writing
Replies: 4
Views: 124

Re: Getting a function reference to a method in a class you are writing

Whoah. Thanks. I'm curious, why does your code work when the following code doesn't? class MyGUIClass { __new() { this.MyGui := Gui.New() this.MyEdit := this.MyGui.Add("Edit") this.MyEdit.OnEvent('Change', 'mycallback') } mycallback(GuiCtrlObj, Info){ } } It was misleading to call the class MyGUICla...
by JoeSchmoe
25 Sep 2020, 20:20
Forum: AutoHotkey v2 Help
Topic: Getting a function reference to a method in a class you are writing
Replies: 4
Views: 124

Re: Getting a function reference to a method in a class you are writing

Hey everyone, Cloakersmoker helped me with this. Here is the solution: global MyGuiObj := MyGUIClass.new() class MyGUIClass { __new() { this.MyGui := Gui.New() this.MyEdit := this.MyGui.Add("Edit") this.MyEdit.OnEvent("Change", this.GetMethod('mycallback').Bind(this)) } mycallback(GuiCtrlObj, Info){...
by JoeSchmoe
25 Sep 2020, 19:32
Forum: AutoHotkey v2 Help
Topic: Getting a function reference to a method in a class you are writing
Replies: 4
Views: 124

Getting a function reference to a method in a class you are writing

How do I get a function reference to a method in a class I am writing? For example, I need a reference to "mycallback" to send to "OnEvent" in "__New," below. How do I get it? global MyGuiObj := MyGUIClass.new() class MyGUIClass { __new() { this.MyGui := Gui.New() this.MyEdit := this.MyGui.Add("Edit...
by JoeSchmoe
17 Feb 2019, 12:03
Forum: Ask For Help
Topic: Array Concatenation
Replies: 12
Views: 2867

Re: Array Concatenation

For the benefit of fellow archive searchers, here is a simple function I use: FirstArray := ["1.1", "1.2", "1.3"] SecondArray := ["2.1", "2.2", "2.3"] ArrayPush(FirstArray, SecondArray) For, key, val in FirstArray MsgBox, % key " is " val ArrayPush(ByRef Array1, Array2) { loop % Array2.length() ; it...
by JoeSchmoe
04 Dec 2018, 17:28
Forum: Ask For Help
Topic: Why are HWNDs converted to decimal?
Replies: 1
Views: 474

Why are HWNDs converted to decimal?

I use a lot of HWNDs to compare windows (ahk_id type stuff). Sometimes when I display the HWND via a tooltip it comes out in decimal and sometimes as Hex. For example, when I use Winget with the "List" command, I get hex. However, when I store the HWNDs in an object, they are converted to decimals. ...
by JoeSchmoe
04 Dec 2018, 14:56
Forum: Ask For Help
Topic: Check if a WinID is in a WinGroup Topic is solved
Replies: 2
Views: 664

Re: Check if a WinID is in a WinGroup Topic is solved

Thanks, jeeswg, I modified your code and it's working now! :dance:
by JoeSchmoe
03 Dec 2018, 16:47
Forum: Ask For Help
Topic: Check if a WinID is in a WinGroup Topic is solved
Replies: 2
Views: 664

Check if a WinID is in a WinGroup Topic is solved

Hello, folks...

I know the ahk_id of a window and I want to know if that window is in a specific ahk_group.

Is there a clever way to check?

Should "IfWinExist, ahk_ID %MyWinID% ahk_group %MyWinGroup%" work? It's not working for me. Wondering if I'm just missing something.

:?:
by JoeSchmoe
15 Mar 2018, 10:02
Forum: Ask For Help
Topic: Access Parent Instance Variables from a Nested Class
Replies: 5
Views: 1029

Re: Access Parent Instance Variables from a Nested Class

The important point is that instantiating either of the two classes, doesn't imply an instance of the other. Hence, as hinted by nnnik , if the child needs a parent, the child needs to create it (the parent doesn't need to know :shh: ), or the parent needs to create a child and tell it (and then th...
by JoeSchmoe
16 Feb 2018, 15:50
Forum: Ask For Help
Topic: Access Parent Instance Variables from a Nested Class
Replies: 5
Views: 1029

Access Parent Instance Variables from a Nested Class

Hello,

Is there a recommended way for a method in a nested class to access the properties of the parent object?

For example:

Code: Select all

class ClassName 
{
    InstanceVar := Expression
    class NestedClass
    {
    	Method()
    	{
        	; How do I access InstanceVar from here?
    	}
     }
}
by JoeSchmoe
11 Feb 2018, 23:11
Forum: Ask For Help
Topic: Running AHK via Task Scheduler with upgraded privileges
Replies: 2
Views: 847

Re: Running AHK via Task Scheduler with upgraded privileges

Thank you very much, Lexikos. It's nice to have such a clear answer. It looks like it is therefore impossible to get Autohotkey to run interactively with admin privileges form a non-admin account. I say this because the following post suggests to get admin privileges from a non-admin account, you ha...
by JoeSchmoe
09 Feb 2018, 13:09
Forum: Ask For Help
Topic: Running AHK via Task Scheduler with upgraded privileges
Replies: 2
Views: 847

Running AHK via Task Scheduler with upgraded privileges

Heya, folks. I've been running my "AlwaysRunning" script for years using Task Scheduler, but I've noticed that sometimes the icon doesn't appear in the task bar and sometimes other scripts can't find the AlwaysRunning window with WinExist. Has anyone else run AHK using Task Scheduler? If so, what se...
by JoeSchmoe
09 Feb 2018, 12:55
Forum: Scripts and Functions
Topic: Get the URL of the current (active) browser tab
Replies: 138
Views: 80840

Re: Get the URL of the current (active) browser tab

Thanks for continuing to maintain, ATNBueno. You're the best. :)
by JoeSchmoe
06 Jan 2018, 10:32
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 373
Views: 136688

Re: GDI+ standard library 1.45 by tic

Thanks
by JoeSchmoe
03 Jan 2018, 19:29
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 373
Views: 136688

Re: GDI+ standard library 1.45 by tic

Am I correct in understanding that everyone should use the mmikeww AHKv2-Gdip version? It seems to be the most compatible. (I actually use AHK 1.1)
by JoeSchmoe
03 Jan 2018, 19:26
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 373
Views: 136688

Re: GDI+ standard library 1.45 by tic

just for reference for people reading: tic's original: https://github.com/tariqporter/Gdip/blob/master/Gdip.ahk Rseding's unicode and x64 Gdip_All fixes: https://www.dropbox.com/s/0e9gdfetbfa8v0o/Gdip_All.ahk AHK v2 version (now also backward compatible with v1 thanks to @nnnik): https://github.com...
by JoeSchmoe
28 Oct 2017, 18:19
Forum: Scripts and Functions
Topic: [Script] KeypressOSD - Display key press on screen
Replies: 616
Views: 137034

Re: [Script] KeypressOSD - Display key press on screen

Amazing work, Marius. Is there a way to configure the script so that it keeps special keys visible after you press another key? (The way it keeps other characters visible after you press another key?) I'd like to use this program to teach people how to optimally use their keyboard in technical compu...
by JoeSchmoe
31 Jan 2017, 14:51
Forum: Ask For Help
Topic: AHK Window is findable, but SendMessage (Send_WM_COPYDATA) sometimes fails
Replies: 0
Views: 461

AHK Window is findable, but SendMessage (Send_WM_COPYDATA) sometimes fails

Hello, Hello, I'm trying to use SendMessage to send messages from one AHK script to another. I'm using the classic Send_WM_COPYDATA code that maybe Chris wrote back in the day. It works most of the time, but sometimes SendMessage returns "Fail." Here's the code I'm using: HeyJarvis(Object) { TargetS...
by JoeSchmoe
05 Jul 2016, 19:37
Forum: Scripts and Functions
Topic: Get the URL of the current (active) browser tab
Replies: 138
Views: 80840

Re: Get the URL of the current (active) browser tab

I just want to say that I use some code based on this code every day. It works wonderfully!
by JoeSchmoe
27 Mar 2016, 18:38
Forum: General Discussion
Topic: AutoHotkey User Survey
Replies: 24
Views: 7568

Re: AutoHotkey User Survey

I loved the survey and was happy to see that people were looking into it. Who wrote it?
by JoeSchmoe
27 Mar 2016, 18:33
Forum: Scripts and Functions
Topic: Columbus - a fast program launcher/searcher
Replies: 155
Views: 50480

Re: Columbus - a fast program launcher/searcher

I'm quite happy to see you still working on it as well, Run1e. Don't worry about doing what you need to do!

Go to advanced search