Search found 212 matches

by sancarn
24 Oct 2018, 06:26
Forum: Wish List
Topic: [Request]: Official Library & Wrapper
Replies: 89
Views: 7583

Re: [Request]: Official Library & Wrapper

* Library should be hosted on GitHub * Library should have a support thread on the forum * Library should have general instruction readme on GitHub. * Library scripts should have links to the support thread and GitHub in header comments. Do at least this and i will set a cron job to use a page just...
by sancarn
15 Aug 2018, 11:13
Forum: Scripts and Functions
Topic: UIA Automation - Inspect.exe for AHK
Replies: 9
Views: 3608

Re: UIA Automation - Inspect.exe for AHK

Afraid not! I haven't worked on this in a while, let alone in AHK...
by sancarn
23 Jun 2018, 08:51
Forum: Ask For Help
Topic: Why can AHK inject functions into IE such that they can be called from JS so easily?
Replies: 0
Views: 317

Why can AHK inject functions into IE such that they can be called from JS so easily?

Hi all, So last week I posted this stackoverflow question . For those who don't already know you can inject AHK functions into Internet Explorer such that they can be called from JavaScript. An Example: #Persistent html = ( <html> <head> <script> document.setVar = function`(name,val`){ document[name...
by sancarn
28 May 2018, 12:13
Forum: Scripts and Functions
Topic: .NET Framework Interop (CLR, C#, VB)
Replies: 142
Views: 41538

Re: .NET Framework Interop (CLR, C#, VB)

Even more so, I figured out how to get members and get length etc. In a really nice way. Requires a few extra references but it is totally worth it: #include CLR.ahk C# = ( using System; //For Types using System.Windows.Forms; //For MessageBox using System.Reflection; //For BindingFlags using System...
by sancarn
28 May 2018, 10:35
Forum: Scripts and Functions
Topic: .NET Framework Interop (CLR, C#, VB)
Replies: 142
Views: 41538

Re: .NET Framework Interop (CLR, C#, VB)

@evilC I actually think it is not possible with how AHK currently sends variables to .NET (or with how .NET casts these to object). I made the following code: #include CLR.ahk C# = ( using System; //For Types using System.Windows.Forms; //For MessageBox using System.Runtime.InteropServices; //For Ma...
by sancarn
28 Mar 2018, 03:52
Forum: Scripts and Functions
Topic: ObjRegisterActive
Replies: 43
Views: 13809

Re: ObjRegisterActive

Does using ObjRegisterActive mean that now we can write AHK apps which can be controlled by COM by other programs written in other languages? Yes. It's easy to do from VBScript. However, it seems GetObject() requires a ProgID rather than a CLSID, so you need to register it in the registry. ' First ...
by sancarn
24 Dec 2017, 13:29
Forum: Ask For Help
Topic: Acc library: Ideas for new functions.
Replies: 6
Views: 645

Re: Acc library: Ideas for new functions.

- I don't know if this is possible with either UI Automation or Acc, but one potential area of interest would be to be able to retrieve the left/right caret positions in a control/element, that way you could retrieve text before/in/after a selection, or text in a selection and a bit either side of ...
by sancarn
22 Dec 2017, 04:33
Forum: Ask For Help
Topic: Acc library: Ideas for new functions.
Replies: 6
Views: 645

Re: Acc library: Ideas for new functions.

Would like to be able to get tooltip information when over a control and store it into a file. Something that would work over multiple applications, to include both Microsoft (Word, Notepad, Edge, etc...) and non-Microsoft apps (like Firefox, VLC, etc..). This would be great, although sadly I'm not...
by sancarn
22 Dec 2017, 04:26
Forum: Scripts and Functions
Topic: AccV2
Replies: 24
Views: 2415

Re: AccV2

Because of this topic and because I had the time I tried to complete my scripts in regard to the basic features. I'm still not interested enough to do further development, but I want to share what I have so far. Maybe you or someone else is interested in using (parts) of the code and will save some...
by sancarn
05 Dec 2017, 09:05
Forum: Scripts and Functions
Topic: AccV2
Replies: 24
Views: 2415

Re: AccV2

anyway to keep this library backward compatible with old acc scripts? maybe you and jeeswg can work together? Although I have no issue with working with Jeeswg, I would have an issue with backwards compatibility. I agree that backwards compatibility is great to have but i personally do dislike the ...
by sancarn
02 Dec 2017, 06:26
Forum: Scripts and Functions
Topic: AccV2
Replies: 24
Views: 2415

Re: Acc

Is this a feature that is missing acc_ObjectFromClient? Nope. Client is an IAccessible Object so Object from Client makes no sense... The program I am using has many areas that displays text, they are not areas I enter text, I tried the following 2 ways but it doesnt give me the data (no error) I a...
by sancarn
30 Nov 2017, 06:07
Forum: Scripts and Functions
Topic: AccV2
Replies: 24
Views: 2415

Re: Acc

I guess I should rename the library given that this Acc.ahk will be incompatible with old Acc.ahk scripts.
by sancarn
27 Nov 2017, 20:26
Forum: Scripts and Functions
Topic: AccV2
Replies: 24
Views: 2415

Re: Acc

ok, I had the wrong acc.ahk, now I get no errors but the message box does not popup with any info (it doesnt popup at all) There were a few silly mistakes, after looking in the viewer, I figured out the issues: #Include acc.ahk window := acc_ObjectFromWindow(winexist("ahk_exe notepad.exe"),ACC_OBJI...
by sancarn
27 Nov 2017, 18:53
Forum: Scripts and Functions
Topic: AccV2
Replies: 24
Views: 2415

Re: Acc

Thanks, so for example, can I have my script go to a window and bring me back just the name content of one control? Sure in numerous ways. E.G. for notepad.exe (untested): window := acc_ObjectFromWindow(winexist("ahk_exe notepad.exe")) menuBar := acc_childrenFilter(window,ACC_FILTERS.byRole,ACC_ROL...
by sancarn
27 Nov 2017, 11:53
Forum: Scripts and Functions
Topic: AccV2
Replies: 24
Views: 2415

Re: Acc

wondering if any of you would know how to get the data that acc viewer shows in the accessible part (lower part) of the program called Accessible Info. What is the code for me to write if I want to get the Name data that ACC shows in the accessible info?? The acc code returns an object which implem...
by sancarn
27 Nov 2017, 03:37
Forum: Scripts and Functions
Topic: AccV2
Replies: 24
Views: 2415

Re: Acc

I would be very interested to hear more detail about what changes you've made There are a few reasons why I added the things I have added. 1. Current functionality didn't include certain features. E.G. Getting the currently selected item required a special state constant which wasn't in the initial...
by sancarn
26 Nov 2017, 11:35
Forum: Scripts and Functions
Topic: AccV2
Replies: 24
Views: 2415

AccV2

This code was created initially by Sean, however since then there have been updates by Jethrow and myself. Most of my updates have been private so far, but figured they'd be useful for others. So I decided to open source the code on Github . Bare in mind that I am planning on changing the library in...
by sancarn
26 Nov 2017, 09:42
Forum: Ask For Help
Topic: Difficulty passing class method to function? Topic is solved
Replies: 10
Views: 816

Re: Difficulty passing class method to function? Topic is solved

Normally, when someone starts using more than 1 or 2 foos and bars I stop reading. Yep, me too. Your code is super confusing with all the foos and bars :P But I do understand what is going on. I originally didn't understand the point of the "this" variable, but now I understand that it's only there...
by sancarn
25 Nov 2017, 05:43
Forum: Ask For Help
Topic: Difficulty passing class method to function? Topic is solved
Replies: 10
Views: 816

Re: Difficulty passing class method to function? Topic is solved

Oh so I didn't realise you can also just pass 0 for this: test(method){ return method.call(0) } class Foo { bar(){ return "Hello world" } } msgbox % test(Foo.bar) A_AhkUser: Maybe you have in view something like this Your first example still pollutes the global scope with functions f , g and h . I j...
by sancarn
24 Nov 2017, 20:37
Forum: Ask For Help
Topic: Difficulty passing class method to function? Topic is solved
Replies: 10
Views: 816

Re: Difficulty passing class method to function? Topic is solved

Foo.bar.bind(foo) . Then you can use this in bar which can use static variables in foo and other methods. I mean in general, I don't even need instances of the class, static variables or other methods. I just wanted an easy way to package up some functions without polluting the global scope... xD I...

Go to advanced search