Search found 15 matches
- 19 Aug 2020, 08:07
- Forum: Ask for Help (v2)
- Topic: GetActiveObjects Topic is solved
- Replies: 7
- Views: 1268
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", ...
- 19 Aug 2020, 07:41
- Forum: Ask for Help (v2)
- Topic: GetActiveObjects Topic is solved
- Replies: 7
- Views: 1268
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...
- 19 Aug 2020, 03:28
- Forum: Ask for Help (v2)
- Topic: GetActiveObjects Topic is solved
- Replies: 7
- Views: 1268
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...
- 30 Apr 2018, 20:11
- Forum: Tutorials (v1)
- Topic: MS Office COM Basics
- Replies: 116
- Views: 197078
Re: MS Office COM Basics
Cheers mate, I doing it correctly after all just went out of bounds with my initial range.
- 29 Apr 2018, 21:41
- Forum: Tutorials (v1)
- Topic: MS Office COM Basics
- Replies: 116
- Views: 197078
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 ...
- 08 Dec 2016, 08:18
- Forum: Tutorials (v1)
- Topic: MS Office COM Basics
- Replies: 116
- Views: 197078
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...
- 30 Nov 2016, 02:34
- Forum: Tutorials (v1)
- Topic: MS Office COM Basics
- Replies: 116
- Views: 197078
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...
- 29 Nov 2016, 09:46
- Forum: Tutorials (v1)
- Topic: MS Office COM Basics
- Replies: 116
- Views: 197078
Re: MS Office COM Basics
How does one translate the following Array() parameters to ahk syntax? Eg.
I tried declaring and populating an AHK arrays but it seems that the excel methods won't take it.
Code: Select all
Criteria1:=Array("5130", "5132", "5134")
Criteria2:=Array(2, "8/1/2016")
Criteria1:=Array("=")
- 14 Nov 2016, 09:04
- Forum: Tutorials (v1)
- Topic: MS Office COM Basics
- Replies: 116
- Views: 197078
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...
- 13 Nov 2016, 11:03
- Forum: Tutorials (v1)
- Topic: MS Office COM Basics
- Replies: 116
- Views: 197078
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)
- 13 Nov 2016, 10:35
- Forum: Scripts and Functions (v1)
- Topic: Excel COM Function Library
- Replies: 14
- Views: 8304
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?
How do I properly use XL_ListWorkbooks() to specify which workbooks to close and activate?
- 11 Nov 2016, 08:41
- Forum: Scripts and Functions (v1)
- Topic: Excel COM Function Library
- Replies: 14
- Views: 8304
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...
- 08 Nov 2016, 07:03
- Forum: Scripts and Functions (v1)
- Topic: Excel COM Function Library
- Replies: 14
- Views: 8304
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...
- 06 Nov 2016, 08:03
- Forum: Ask for Help (v1)
- Topic: Dropdown Checkbox in WPF/WindowsForms
- Replies: 0
- Views: 659
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 ...
- 04 Oct 2015, 11:06
- Forum: Ask for Help (v1)
- Topic: Dynamic GuiControl Function
- Replies: 1
- Views: 940
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...