Search found 15 matches

by RNDLDVL
19 Aug 2020, 08:07
Forum: AutoHotkey v2 Help
Topic: GetActiveObjects Topic is solved
Replies: 4
Views: 269

Re: GetActiveObjects Topic is solved

read InStr's remarks about blank needles Oh god, I'm stupid. I overlooked that part. Thanks mate, it works fine now. Here's the code for people interested in COM specifically excel, might be of use. GetActiveObjects(Prefix:="", CaseSensitive:=false) { objects := Map() ,DllCall("ole32\CoGetMalloc", ...
by RNDLDVL
19 Aug 2020, 07:41
Forum: AutoHotkey v2 Help
Topic: GetActiveObjects Topic is solved
Replies: 4
Views: 269

Re: GetActiveObjects Topic is solved

if InStr(name, Prefix, CaseSensitive) = 1 { I think something about the changes regarding string variables gives me an invalid parameter #2 in this line, which is the Prefix variable. I've tested both v1 and v2, v1 proceeds inside the the if block despite Prefix having a null value which kinda does...
by RNDLDVL
19 Aug 2020, 03:28
Forum: AutoHotkey v2 Help
Topic: GetActiveObjects Topic is solved
Replies: 4
Views: 269

GetActiveObjects Topic is solved

Not sure if this is the right section. Anyone happen to have the v2 version of this function? I've tried porting it basing on the v2 documentation but I'm not sure how the DllCalls work themselves so I'm not sure what I am doing wrong or perhaps an alternative to fetching all active specific COM obj...
by RNDLDVL
30 Apr 2018, 20:11
Forum: Tutorials
Topic: MS Office COM Basics
Replies: 111
Views: 127381

Re: MS Office COM Basics

Cheers mate, I doing it correctly after all just went out of bounds with my initial range.
by RNDLDVL
29 Apr 2018, 21:41
Forum: Tutorials
Topic: MS Office COM Basics
Replies: 111
Views: 127381

Re: MS Office COM Basics

Hello, Anyone might have an idea how to properly set the TotalList parameter of the Range.Subtotal function. Here is the msdn page for the function: https://msdn.microsoft.com/en-us/vba/excel-vba/articles/range-subtotal-method-excel The page describes the parameter as a Variant type of "An array of ...
by RNDLDVL
08 Dec 2016, 08:18
Forum: Tutorials
Topic: MS Office COM Basics
Replies: 111
Views: 127381

Re: MS Office COM Basics

Hey kon, have you tried using your COM scripts on 32bit operating systems? (eg. 32bit win 7). I'm having problems opening(manually or through COM) workbooks once my script attaches to excel through this: try global xL := ComObjActive("Excel.Application") catch global xl := ComObjCreate("Excel.Applic...
by RNDLDVL
30 Nov 2016, 02:34
Forum: Tutorials
Topic: MS Office COM Basics
Replies: 111
Views: 127381

Re: MS Office COM Basics

Yeah, it's seems to be working now for the parameters I've specified earlier. However, I can't seem to get the proper data type for this parameter: Key:=Range(A2:A14050) Here's the whole line for referrence: xSF := wbs.Worksheets(1).ListObjects(1).Sort.SortFields xSF.Clear xSF.Add(Key:=Range("A2:A14...
by RNDLDVL
29 Nov 2016, 09:46
Forum: Tutorials
Topic: MS Office COM Basics
Replies: 111
Views: 127381

Re: MS Office COM Basics

How does one translate the following Array() parameters to ahk syntax? Eg.

Code: Select all

Criteria1:=Array("5130", "5132", "5134")
Criteria2:=Array(2, "8/1/2016")
Criteria1:=Array("=")
I tried declaring and populating an AHK arrays but it seems that the excel methods won't take it.
by RNDLDVL
14 Nov 2016, 09:04
Forum: Tutorials
Topic: MS Office COM Basics
Replies: 111
Views: 127381

Re: MS Office COM Basics

If more than one Excel Application is open it becomes more complicated to determine if a workbook is open. You need to check in each application. One way to do that is to use GetActiveObjects() . This example checks if "C:\Test\Book2.xlsx" is open. ; Show a list of all active objects ; This is here...
by RNDLDVL
13 Nov 2016, 11:03
Forum: Tutorials
Topic: MS Office COM Basics
Replies: 111
Views: 127381

Re: MS Office COM Basics

How do I properly detect if the excel workbooks I want my script to interact with are already open in the background or foreground? Since they don't have fixed names. I use this to specify which worksbooks are which but I'm not sure how to check if they are open.

Code: Select all

Workbook := ComObjGet(path)
by RNDLDVL
13 Nov 2016, 10:35
Forum: Scripts and Functions
Topic: Excel COM Function Library
Replies: 12
Views: 6423

Re: Excel COM Function Library

Thanks, managed to get it to work by declaring them global variables. Oh, lol, that MsgBox line was left there when I was testing with other stuff.

How do I properly use XL_ListWorkbooks() to specify which workbooks to close and activate?
by RNDLDVL
11 Nov 2016, 08:41
Forum: Scripts and Functions
Topic: Excel COM Function Library
Replies: 12
Views: 6423

Re: Excel COM Function Library

test() { z := srcXL[1] xlSrc := ComObjGet(z) ;lstRow := xlSrc.Sheets(1).UsedRange.Rows.Count rowDates := XL_RangeFindAll(xlSrc,"","A1:A2000","*/*","A2000",xlvalues,xlwhole,xlbycolumns,xlnext,"Row") MsgBox, %rowDates% } srcXL[1] contains the file path to the excel file. Basically, if I tried to call...
by RNDLDVL
08 Nov 2016, 07:03
Forum: Scripts and Functions
Topic: Excel COM Function Library
Replies: 12
Views: 6423

Re: Excel COM Function Library

I'm trying to use the FindAll function but I keep getting a Type Mismatch error with the generated function code from the Demo Script. Here's the error's, I'm not really sure what I'm doing wrong --------------------------- plotter.ahk --------------------------- Error in #include file "C:\Users\Mic...
by RNDLDVL
06 Nov 2016, 08:03
Forum: Ask For Help
Topic: Dropdown Checkbox in WPF/WindowsForms
Replies: 0
Views: 441

Dropdown Checkbox in WPF/WindowsForms

Good day, after much time fiddling around with different "Control" functions, the best I could do in changing the selection of a dropdown checkbox of a different program; is to send a click to the control, set input focus on it and send keystrokes. The method is quite unreliable and the control has ...
by RNDLDVL
04 Oct 2015, 11:06
Forum: Ask For Help
Topic: Dynamic GuiControl Function
Replies: 1
Views: 763

Dynamic GuiControl Function

Basically the script that I'm working has 64 buttons that is bound to read the entire content of a text file and copies it to the clipboard when clicked. Saving and loading is easy, now to change the corresponding button's text according to the label assigned to it is the difficult part. I can't wra...

Go to advanced search