Search found 906 matches

by FanaticGuru
16 minutes ago
Forum: Ask For Help
Topic: Creating and Ending a Loop in Using Excel Data
Replies: 7
Views: 74

Re: Creating and Ending a Loop in Using Excel Data

Example of Opening Excel Worksheet. ; Create new instance of Excel and show it xlApp := ComObjCreate("Excel.Application") xlApp.Visible := true ; remove or comment out this line to not show Excel ; Open Workbook xlWb := xlApp.Workbooks.Open("C:\Users\FG\Desktop\Test\Test.xlsx") ;...
by FanaticGuru
32 minutes ago
Forum: Ask For Help
Topic: Creating and Ending a Loop in Using Excel Data
Replies: 7
Views: 74

Re: Creating and Ending a Loop in Using Excel Data

Example: ; Starting Row and Column Row := 3 Column := 2 F12:: xlApp := ComObjActive("Excel.Application") val := xlApp.Cells(Row, Column).Value Row++ if !(val = "") SendRaw, % val else MsgBox DONE return With the source Excel sheet running (can be minimized whatever, AHK could ope...
by FanaticGuru
44 minutes ago
Forum: Ask For Help
Topic: Creating and Ending a Loop in Using Excel Data
Replies: 7
Views: 74

Re: Creating and Ending a Loop in Using Excel Data

You don't need to Alt-Tab between Excel and your program. You can stay in your program and just pull the data from Excel as you need it. Excel never has to be active or even visible for that matter.

It will save alot of trouble with the Alt+Tabbing.

FG
by FanaticGuru
49 minutes ago
Forum: Ask For Help
Topic: COM access to non-Microsoft applications
Replies: 8
Views: 68

Re: COM access to non-Microsoft applications

But if there is a COM interface, the best way to learn about the methods/properties is to actually look at its documentation, if you don't want to rely on (often unsatisfying) trial and error or plain guessing. That touches on another reason some developers choose not to code COM support, it requir...
by FanaticGuru
58 minutes ago
Forum: Ask For Help
Topic: Access a variable from one function inside another function
Replies: 7
Views: 59

Re: Access a variable from one function inside another function

On a tangent note, sometimes you might want to use a gosub which is similar to a function in flow of control in that you jump somewhere and then return but it does not limit anything to a local scope. Everything stays in the global scope which can sometimes be useful.

FG
by FanaticGuru
Today, 17:26
Forum: Ask For Help
Topic: COM access to non-Microsoft applications
Replies: 8
Views: 68

Re: COM access to non-Microsoft applications

Perhaps I'm not familiar enough with COM to understand what the output of the MsgBox is saying: I'm seeing a bunch of hexadecimal values and "--INoteLinkContentService" hexadecimal"--INoteLinkContentService" !Personal-Monikers::FileSyncClient -- IFileSyncClient9 !Personal-Monike...
by FanaticGuru
15 Feb 2018, 15:25
Forum: Ask For Help
Topic: Outlook M.Reply Help
Replies: 4
Views: 62

Re: Outlook M.Reply Help

That's fantastic and worked perfectly - but there is a problem with adding a : olReplyAllItem.body := To the script, as this replaces the whole thread. Is there a way to keep the thread I'm replying to and add a reply as I would a normal 'reply' email? Thanks again, You just need to put the existin...
by FanaticGuru
15 Feb 2018, 13:36
Forum: Ask For Help
Topic: Best practice ? Read variable from other scripts
Replies: 17
Views: 240

Re: Best practice ? Read variable from other scripts

... You could remove the method callfunction and add another method that only calls a specific function. That way you already limit which functions can be called... great thanks, and here it is: fnReceive_wordlistAddress := Func("Receive_wordlistAddress").Bind(1) ObjRegisterActive(fnRecei...
by FanaticGuru
15 Feb 2018, 02:08
Forum: Ask For Help
Topic: export excel cell as pic
Replies: 5
Views: 80

Re: export excel cell as pic

Here is the basics of one way of doing it. xlApp := ComObjActive("Excel.Application") xlSheet := xlApp.ActiveSheet xlArea := xlSheet.Range("B2:C3") xlArea.CopyPicture xlChart := xlSheet.ChartObjects.Add(0,0, xlArea.Width, xlArea.Height) xlChart.Chart.Paste xlChart.Chart.Export(A_...
by FanaticGuru
15 Feb 2018, 00:37
Forum: Ask For Help
Topic: Best practice ? Read variable from other scripts
Replies: 17
Views: 240

Re: Best practice ? Read variable from other scripts

After I discovered Lexikos' ObjRegisterActive, everything else including my own hidden GUI solution seems like a hack. COM was specifically designed for applications to communicate with each other and ObjRegisterActive provides a way to tap into that. Example: ;ObjReg1 #Persistent ; Create an Object...
by FanaticGuru
14 Feb 2018, 23:59
Forum: Ask For Help
Topic: Read memory and offsets Topic is solved
Replies: 3
Views: 74

Re: Read memory and offsets Topic is solved

If you ever need to find a dynamic base address, read memory values other than UInts, or wish to read pointers in a single line, then this memory class can help. https://github.com/Kalamity/classMemory Mainly as just a shoutout and thank you to RHCP, I also use classMemory and highly recommend it. FG
by FanaticGuru
14 Feb 2018, 13:26
Forum: Ask For Help
Topic: Outlook M.Reply Help
Replies: 4
Views: 62

Re: Outlook M.Reply Help

Here is an example: F12:: olApp := ComObjActive("Outlook.Application") try olItem := olApp.ActiveWindow.CurrentItem catch olItem := olApp.ActiveExplorer.Selection.Item(1) if (olItem.Class = 43) olMailItem := olItem else { MsgBox Mail Item Not Current or Selected return } olReplyAllItem := ...
by FanaticGuru
13 Feb 2018, 04:54
Forum: Ask For Help
Topic: Insert a block in AutoCAD with specific number of loops and wait for the user interaction first
Replies: 16
Views: 193

Re: Insert a block in AutoCAD with specific number of loops and wait for the user interaction first

That's really wonderful to know that AHK can use the VBA although that I am not doing well at it but can understand the process and the way the program runs and I was not encouraged to learn it further since its not going to be supported by Autodesk with AutoCAD anymore as known for all. I am good ...
by FanaticGuru
13 Feb 2018, 00:30
Forum: Ask For Help
Topic: Insert a block in AutoCAD with specific number of loops and wait for the user interaction first
Replies: 16
Views: 193

Re: Insert a block in AutoCAD with specific number of loops and wait for the user interaction first

If you want to delve into the magical world of COM, the code below will demonstrate how to create a block and insert it into the current drawing. ; Create AutoCAD Application object of currently running AutoCAD program acApp := ComObjActive("AutoCAD.Application") ; Create Default Point Str...
by FanaticGuru
12 Feb 2018, 14:22
Forum: Ask For Help
Topic: Listview from GUI to Email
Replies: 7
Views: 121

Re: Listview from GUI to Email

Thank you! Searched around, but did not find Outlook for free, Outlook Express seems to be free, but will Outlook Express work with ComObj? ( I haven´t MS Office on this computer) A new mail client has appeared on Windows 10. it's just called "e-post" on Swedish (Maybe e-mail on english?)...
by FanaticGuru
11 Feb 2018, 01:45
Forum: Ask For Help
Topic: Listview from GUI to Email
Replies: 7
Views: 121

Re: Listview from GUI to Email

What is needed to use Outlook, if I want to test your example above? (Do I need an Outlook account? Office package? or...) You need Outlook installed on your computer. That usually means Microsoft Office although it is possible to just install Outlook. And since I used ComObjActive("Outloo...
by FanaticGuru
10 Feb 2018, 01:44
Forum: Ask For Help
Topic: Listview from GUI to Email
Replies: 7
Views: 121

Re: Listview from GUI to Email

If you use Outlook then you could use COM to create a table in an email. It is not that difficult (if you know all the secret words and magic numbers). Here is a basic example of creating a table in an Outlook email: olApp := ComObjActive("Outlook.Application") olMailItem := olApp.CreateIt...
by FanaticGuru
09 Feb 2018, 17:18
Forum: Ask For Help
Topic: RegEx issue. Of course.... Topic is solved
Replies: 12
Views: 186

Re: RegEx issue. Of course.... Topic is solved

Well, could RegExReplace use AnimSeq in a loop and set a loop index variable with first match and remove that match from AnimSeq? Like Loop { FoundString := command%a_index% := regexre(AnimSeq, exp) StringReplace, AnimSeq, FoundString,, 0 ; here would be FoundString reformated to use the end value ...
by FanaticGuru
09 Feb 2018, 16:09
Forum: Ask For Help
Topic: RegEx issue. Of course.... Topic is solved
Replies: 12
Views: 186

Re: RegEx issue. Of course.... Topic is solved

Quick (possibly) helpful note: RegExReplace can be used here. RegExReplace(str,regExpression,,cnt) msgbox % cnt It is a good point that RegExReplace can be used to "count" the occurances of a pattern in a string. But as not to side track those with limited knowledge RegExReplace cannot ca...
by FanaticGuru
09 Feb 2018, 15:51
Forum: Ask For Help
Topic: Starting a new project, but with which AHK version?
Replies: 7
Views: 130

Re: Starting a new project, but with which AHK version?

I would agree with the logic of jeeswg and use the latest version of AHK v1.1 but with an eye to using more AHK v2 friend techniques for easy conversion if wanted at a later date. The biggies are always use := for assignments and = for comparisons. And if a built-in function is available always use ...

Go to advanced search