Search found 910 matches

by FanaticGuru
Today, 00:00
Forum: Ask For Help
Topic: Help with tasks in Outlook.ComObjActive("Outlook.Application")
Replies: 1
Views: 33

Re: Help with tasks in Outlook.ComObjActive("Outlook.Application")

I am trying to create a simple task via AHK. I have most of it working except I cannot set the time for the reminder. I would like the gui to select the data and time then feed it into a task and then save it. First I would like the time to be set then I can move on with the rest of the work. You c...
by FanaticGuru
Yesterday, 23:36
Forum: Ask For Help
Topic: Control via COM an already open Excel Topic is solved
Replies: 3
Views: 49

Re: Control via COM an already open Excel Topic is solved

You can also try just using the command made for it: xlApp := ComObjActive("Excel.Application") This will work for most people. It is all I ever use and I use COM with Excel alot on several different computers. The Excel_Get function is more robust and can handle some fringe cases....
by FanaticGuru
Yesterday, 23:27
Forum: Ask For Help
Topic: Creating and Ending a Loop in Using Excel Data
Replies: 12
Views: 215

Re: Creating and Ending a Loop in Using Excel Data

If the data in spreadsheet cell A1 is 12345 when the program sends the contents of val to the user input field in the database it converts it to 12345.0 The database uses the literal value and therefore doesn't find the correct record. That is a common situation with Excel that it likes to return n...
by FanaticGuru
21 Feb 2018, 23:33
Forum: Ask For Help
Topic: Creating and Ending a Loop in Using Excel Data
Replies: 12
Views: 215

Re: Creating and Ending a Loop in Using Excel Data

Below is a more complete script using the opening of an Excel file. ; 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...
by FanaticGuru
20 Feb 2018, 18:18
Forum: Ask For Help
Topic: Creating and Ending a Loop in Using Excel Data
Replies: 12
Views: 215

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
20 Feb 2018, 18:02
Forum: Ask For Help
Topic: Creating and Ending a Loop in Using Excel Data
Replies: 12
Views: 215

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
20 Feb 2018, 17:50
Forum: Ask For Help
Topic: Creating and Ending a Loop in Using Excel Data
Replies: 12
Views: 215

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
20 Feb 2018, 17:45
Forum: Ask For Help
Topic: COM access to non-Microsoft applications
Replies: 8
Views: 99

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
20 Feb 2018, 17:36
Forum: Ask For Help
Topic: Access a variable from one function inside another function
Replies: 9
Views: 107

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
20 Feb 2018, 17:26
Forum: Ask For Help
Topic: COM access to non-Microsoft applications
Replies: 8
Views: 99

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: 69

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: 254

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: 254

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: 76

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: 69

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: 198

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: 198

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: 126

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: 126

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...

Go to advanced search