Search found 1060 matches

by FanaticGuru
Today, 17:39
Forum: Ask For Help
Topic: Excel to Variable - seeking more efficient way Topic is solved
Replies: 6
Views: 84

Re: Excel to Variable - seeking more efficient way Topic is solved

It is not uncommon for my company to have multiple excel files open. With that in mind, my current script obtains the specific excel title needed and stores it as a variable using WinActivate, %EXCEL% to pull the appropriate one. Can I add the title into this somewhere? Also - Is there a way to obt...
by FanaticGuru
Today, 12:33
Forum: Ask For Help
Topic: how to read excel column and put it in array and send it
Replies: 2
Views: 31

Re: how to read excel column and put it in array and send it

; Create a connection between AHK and an open active Excel file xlApp := ComObjActive("Excel.Application") Columns := ["A","D","F"] Data := {} ; Get all cell values in columns and put in an array for Index, Column in Columns for xlCell in xlApp.ActiveSheet.Us...
by FanaticGuru
Yesterday, 21:07
Forum: Gaming
Topic: [Game] AHKBAN a Boxxle (Sokoban) clone
Replies: 3
Views: 62

Re: [Game] AHKBAN a Boxxle (Sokoban) clone

I played the first 7 levels and I like it. I have not seen this puzzle before. When I have more time, I will definitely see how far I can go.

Nice job implementing it also. It plays fine without any problems that I noticed. Responsive movement. Good job.

FG
by FanaticGuru
Yesterday, 16:10
Forum: Ask For Help
Topic: Excel to Variable - seeking more efficient way Topic is solved
Replies: 6
Views: 84

Re: Excel to Variable - seeking more efficient way Topic is solved

Thank you for the response. I will try to poke through this and try to figure it out. But I will be honest, this all looks amazingly foreign to me =D Yes, this is accessing Excel in a totally different way than through the clipboard. COM allows AutoHotkey to communicate directly with Excel as one p...
by FanaticGuru
21 May 2018, 23:42
Forum: Ask For Help
Topic: Excel to Variable - seeking more efficient way Topic is solved
Replies: 6
Views: 84

Re: Excel to Variable - seeking more efficient way Topic is solved

xlApp := ComObjActive("Excel.Application") ; one cell to one variable HAWB := xlApp.Range("A1").Value MsgBox % HAWB Data := {} ; Get all cell values in column A and put in an array for Cell in xlApp.ActiveSheet.UsedRange.Columns("A").Cells Data.Push(Cell.Value) ; Displ...
by FanaticGuru
18 May 2018, 15:21
Forum: Ask For Help
Topic: Excel COM Topic is solved
Replies: 3
Views: 54

Re: Excel COM Topic is solved

I'm trying to find the equivalent of xlToRight for xlToLeft. Does anyone know what number should be defined as xlToLeft, and also where this number comes from? I'm trying to get to column A. Another way is while you are in Excel, you can hit Alt-F11 to open the Visual Basic Editor, then hit Ctrl-G ...
by FanaticGuru
18 May 2018, 00:16
Forum: Ask For Help
Topic: Help with Find method for excel (COM) Topic is solved
Replies: 2
Views: 55

Re: Help with Find method for excel (COM) Topic is solved

Hello, In part of my script I am trying to find cells with specific format, but the "format" argument of Find doesn't seem to do anything -- the method finds any cell with specified value, even though the format doesn't match. Here's my code: xl := ComObjActive("Excel.Application&quo...
by FanaticGuru
17 May 2018, 15:53
Forum: Ask For Help
Topic: Read and forward mail in an IMAP inbox
Replies: 15
Views: 170

Re: Read and forward mail in an IMAP inbox

I don't know anything about the software involved but you could try: for _, Item in olSubfolder.Items ;instead of: for Item in olSubfolder.Items Just for the record for Item in olSubfolder.Items is correct. This is the way for works with most COM objects which are collections where the key is the d...
by FanaticGuru
16 May 2018, 23:00
Forum: Ask For Help
Topic: [help] : insert into last row of excel sheet Topic is solved
Replies: 4
Views: 90

Re: [help] : insert into last row of excel sheet Topic is solved

Thank you for the help Unfortunately it does not work with me, it switch to excel windows but nothing inserted I can tell you that it works for me on multiple computers using different versions of Excel. Nothing about the script will cause "it switch to excel windows" so maybe you are att...
by FanaticGuru
16 May 2018, 14:51
Forum: Ask For Help
Topic: Code cleanup - PowerPoint COM
Replies: 8
Views: 111

Re: Code cleanup - PowerPoint COM

Here is two examples of techniques I would use. ; init array Replacements := {} Replacements.Push("Digital Advertising Performance | Ford") Replacements.Push("Digital Advertising Performance | Lincoln") Replacements.Push("Website Performance Insights") ; loop array for ...
by FanaticGuru
16 May 2018, 14:00
Forum: Ask For Help
Topic: [help] : insert into last row of excel sheet Topic is solved
Replies: 4
Views: 90

Re: [help] : insert into last row of excel sheet Topic is solved

hello, i have an excel filename "E:\h\ahk\off.xlsm" i want to paste the value of variable %var1% into the empty row next to the last "used" row of column A ,for example column A has 6 used row, i want to paste it into the row 7 of column "A" (" A7 " cell) the...
by FanaticGuru
16 May 2018, 13:39
Forum: Ask For Help
Topic: Help convert this VBScript to AHK
Replies: 7
Views: 133

Re: Help convert this VBScript to AHK

It is mostly the same as before except with FanaticGuru's contributions added with a few changes (specifically, using the WinWait command instead of the query process loop, using PID with ExecQuery instead of Process Name and using the WinKill command instead of Terminate). objGameInstance := ComOb...
by FanaticGuru
15 May 2018, 17:15
Forum: Ask For Help
Topic: Help convert this VBScript to AHK
Replies: 7
Views: 133

Re: Help convert this VBScript to AHK

I am not very familiar with COM Objects or how AHK uses them so I can't currently figure out how to make three of the commands work in AHK syntax. Here is an equivalent example to some of the tricker VBA code: cName := "notepad.exe" objWMIService := ComObjGet("winmgmts:") Loop {...
by FanaticGuru
15 May 2018, 13:04
Forum: Ask For Help
Topic: Help convert this VBScript to AHK
Replies: 7
Views: 133

Re: Help convert this VBScript to AHK

I can see how most of the commands can be converted to AHK equivalents but I'm puzzled on what exactly these lines are doing: SET objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") commandLine = objInstance.CommandLine I'm assuming the second line is gra...
by FanaticGuru
14 May 2018, 11:55
Forum: Ask For Help
Topic: COM script help, copy and paste from excel to different program
Replies: 2
Views: 46

Re: COM script help, copy and paste from excel to different program

Here is an example of how to loop through all the cells in Columns A and B. MyFilePath := A_Desktop "\PMU.xlsx" try oExcel := ComObjActive("Excel.Application") ; Get the active Excel application object if an instance of Excel is open. catch { oExcel := ComObjCreate("Excel.Ap...
by FanaticGuru
14 May 2018, 11:42
Forum: Ask For Help
Topic: Externally calling a function from running AHK script
Replies: 7
Views: 93

Re: Externally calling a function from running AHK script

You can use ObjRegisterActive linked below: https://autohotkey.com/boards/viewtopic.php?t=6148 This will allow you to register an AutoHotkey object with Windows as a COM object. Then any program that can access COM objects (most popular Windows programming languages can) will be able to access the m...
by FanaticGuru
10 May 2018, 13:46
Forum: Ask For Help
Topic: VBA macro to autohotkey Topic is solved
Replies: 2
Views: 58

Re: VBA macro to autohotkey Topic is solved

Hello, I have excel code, I would like the same to work in AHK. It's about finding an empty record in the AG column, then doing the action and going to the next empty cell. And so to the last data in the column. totalrows = ActiveSheet.UsedRange.Rows.Count For row = 2 To totalrows If (Cells(row, 34...
by FanaticGuru
10 May 2018, 10:44
Forum: Ask For Help
Topic: Outlook 2016 save the email
Replies: 3
Views: 67

Re: Outlook 2016 save the email

Below is an example of how to save an email as a msg file in Outlook. I still get the same errormessage on SaveAs ... don't know why that method doesn't work.. I thought maybe I can get a mail name and search that email in computer, where it will be saved after I open it via internet (in temp direc...
by FanaticGuru
09 May 2018, 19:09
Forum: Ask For Help
Topic: Delete PDF Pages through Adobe COM
Replies: 13
Views: 218

Re: Delete PDF Pages through Adobe COM

My next goal is to achieve is to do the advanced search and export to CSV. To accomplish this with the adobe interface, use CTRL+SHIFT+F to get a search window. After you have searched a keyword, there is an option to export these results. This is where the page numbers come from. The excel data is...
by FanaticGuru
09 May 2018, 12:34
Forum: Ask For Help
Topic: excel vba code to autohotkey..
Replies: 1
Views: 61

Re: excel vba code to autohotkey..

hello. can i use this vba code in autohotkey? i want to know specific word's color changed. (but I do not want an input box macro.) vba code ↓ Sub WordColor() Dim cell As Range, word As String, startIndex As Integer word = InputBox(Prompt:="input word", Title:="word color change"...

Go to advanced search