Search found 1136 matches

by FanaticGuru
Yesterday, 12:42
Forum: Ask For Help
Topic: Small code to run Calc
Replies: 10
Views: 199

Re: Small code

I am ending using v1 EXE conversion of: Insert:: #SingleInstance force if WinExist("Calculator") WinActivate else Run "C:\Program Files\Calc.exe" WinSet, Top return but when Calc is not running, I have to press Insert twice in order to run the EXE converted code twice, to have C...
by FanaticGuru
08 Aug 2018, 20:06
Forum: Ask For Help
Topic: Small code to run Calc
Replies: 10
Views: 199

Re: Small code

Hello, I am trying to write a code to open a exe file (Calculator) when press Insert key. The code it's working when using 1.1 for converting to EXE, but not with 2.0. I want: 1. to use 2.0 2. that the Calculator window to be on top after press Insert (maybe using WinMoveTop). Thank you Insert:: #S...
by FanaticGuru
07 Aug 2018, 19:51
Forum: Ask For Help
Topic: How to use script2 to block script1's hotkeys when a specific window is active WITHOUT using IfWinActive
Replies: 7
Views: 92

Re: How to use script2 to block script1's hotkeys when a specific window is active WITHOUT using IfWinActive

first.ahk q::MsgBox % "from first" second.ahk #If WinActive("ahk_exe notepad.exe") q::return #If try if it works for your app This is the solution I would recommend also. When two scripts have the same hotkey the last one run has priority. In this case the second script is check...
by FanaticGuru
01 Aug 2018, 14:33
Forum: Ask For Help
Topic: Start Script When Game Starts?
Replies: 10
Views: 126

Re: Start Script When Game Starts?

Yea... when my game window is active and I hit ctrl+f1 nothing pops up. It does pop up boxes for other active windows, but for some reason not for the game window. Some programs block virtual key presses either by convenience or on purpose. Adding #UseHook or #InstallKeybdHook at the top of script ...
by FanaticGuru
31 Jul 2018, 12:16
Forum: Ask For Help
Topic: Too fast
Replies: 2
Views: 77

Re: Too fast

Also, if you use Sleep you need to make sure it is inside the while-loop.

Code: [Select all]GeSHi © Codebox Plus

XButton1::
While GetKeyState("XButton1","P")
{
Send, e
Sleep 500
}
return
FG
by FanaticGuru
30 Jul 2018, 17:13
Forum: Ask For Help
Topic: Excel paste into next column
Replies: 6
Views: 145

Re: Excel paste into next column

next empty column on row 1 while xl.Cells(1, A_Index).value { col := A_Index+1 continue } xl.Cells(1, col) := num The Find method is normally quicker and easier than looping through all the cells. xlApp := ComObjActive("Excel.Application") MsgBox % Empty_Column := xlApp.Rows(1).Find("...
by FanaticGuru
30 Jul 2018, 13:16
Forum: Ask For Help
Topic: Word COM LineSpacing Topic is solved
Replies: 1
Views: 42

Re: Word COM LineSpacing Topic is solved

Does anyone know how to set LineSpacing using COM in Word? I have tried many commands, but without success so far.. I want to make spaces between the lines at 1.0 oWord := ComObjActive("Word.Application") oWord.Selection.ParagraphFormat.LineSpacing.LinesToPoints := 2 ; doesn't work oWord....
by FanaticGuru
26 Jul 2018, 15:11
Forum: Ask For Help
Topic: Run .bat on exit
Replies: 7
Views: 90

Re: Run .bat on exit

#NoEnv #SingleInstance, Force #Persistent SetTitleMatchMode, 2 DetectHiddenWindows, On SetTimer, ProcessCheckTimer, 3000 Return ProcessCheckTimer: Process, Exist, application1.exe pid1 := ErrorLevel If (!pid1) { Process, Exist, ahkscript.exe pid2 := ErrorLevel If (pid2) Process, Close, %pid2% Run, ...
by FanaticGuru
26 Jul 2018, 14:56
Forum: Ask For Help
Topic: Excel Com & loop search Topic is solved
Replies: 5
Views: 106

Re: Excel Com & loop search Topic is solved

for Cell in Wb1.ActiveSheet.Range("A1", LastCell) ; Loop Through All Used Cells in Column "A" of First Workbook Wb2.ActiveSheet.Columns("A").Find(Cell.Value).OffSet(0,2).Value := Cell.OffSet(0,1).Value how I can add the following to this code? If cell.value not found, ...
by FanaticGuru
26 Jul 2018, 14:48
Forum: Ask For Help
Topic: if (excel sheet exists) ? create
Replies: 4
Views: 80

Re: if (excel sheet exists) ? create

Any suggestions on finding the next blank cell when dealing with multiple sheets? What I have 'works' but after a few dozen rows, it slows down drastically having to check each variable when it compounds on itself starting from 1 each time. I assume you are talking about find the first blank cell b...
by FanaticGuru
25 Jul 2018, 16:32
Forum: Ask For Help
Topic: if (excel sheet exists) ? create
Replies: 4
Views: 80

Re: if (excel sheet exists) ? create

Hey All, TL;DR - 1) how do you test if a sheet name exists, 2) how do you create a sheet - I'm new, the more details/descriptions you provide the better. xlApp := ComObjActive("Excel.Application") SheetName := "FanaticGuru" try xlSheet := xlApp.Sheets(SheetName) catch { xlSheet ...
by FanaticGuru
25 Jul 2018, 16:22
Forum: Ask For Help
Topic: Excel Com & loop search Topic is solved
Replies: 5
Views: 106

Re: Excel Com & loop search Topic is solved

Hi! I am not good with Excel com and it would be nice if someone is able to solve my problem. I have 2 Excel files; 1 & 2 I need to search in Excel 1 in column A & O , Excel 2 Column A and paste value that match i n Excel 2 cell column G . If Excel 1 cell in column O is same value as Excel ...
by FanaticGuru
19 Jul 2018, 15:29
Forum: Tutorials
Topic: MS Office COM Basics
Replies: 107
Views: 66070

Re: MS Office COM Basics

When passing text to bookmarks in Microsoft Word, I am unable to send line feeds using `n. Is there any way to send text with carriage returns or line feeds? Chr(11) is newline, Chr(13) is new paragraph. Something like this: .InsertAfter("Stuff goes here" Chr(11) "then st...
by FanaticGuru
18 Jul 2018, 19:34
Forum: Ask For Help
Topic: Seeking Advice on Best Approach for Email Handling with Attachments
Replies: 20
Views: 375

Re: Seeking Advice on Best Approach for Email Handling with Attachments

For something like this to work Headers[A_Index] would need to contain a column letter like "B" but the way you populated the array it will probably contain a header name like "Date". Would my line of code above work? Columns[A_Index] := Chr(64+A_Index) If you want to us...
by FanaticGuru
18 Jul 2018, 16:14
Forum: Ask For Help
Topic: Seeking Advice on Best Approach for Email Handling with Attachments
Replies: 20
Views: 375

Re: Seeking Advice on Best Approach for Email Handling with Attachments

FanaticGuru, Thank you. However... finding the name of the column headers wasn't really what I was asking about. I am already doing that. It was not about finding the name of the column headers, it was about finding the column that a header is in. With that ability, you don't really need an array w...
by FanaticGuru
18 Jul 2018, 15:34
Forum: Ask For Help
Topic: Seeking Advice on Best Approach for Email Handling with Attachments
Replies: 20
Views: 375

Re: Seeking Advice on Best Approach for Email Handling with Attachments

Unfortunately, having the name of the column doesn't quite crossover neatly when using .Range with arrays... or maybe it does and I'm not coding the array correctly. If so, by all means please correct me. :D CellDate := "07/18/2018" FormatTime, CellDate, M/d/yyyy oWB.Sheets(Sht).Range(Hea...
by FanaticGuru
17 Jul 2018, 11:34
Forum: Ask For Help
Topic: Seeking Advice on Best Approach for Email Handling with Attachments
Replies: 20
Views: 375

Re: Seeking Advice on Best Approach for Email Handling with Attachments

What's the best approach to using the Header Names of a spreadsheet rather than the R1C1 convention in Excel (using ComObjCreate)? I'm asking because the columns in this spreadsheet can / do get shifted around by any one of several users, and I am (was) attempting to place strings in specific colum...
by FanaticGuru
06 Jul 2018, 15:15
Forum: Ask For Help
Topic: Seeking Advice on Best Approach for Email Handling with Attachments
Replies: 20
Views: 375

Re: Seeking Advice on Best Approach for Email Handling with Attachments

All that aside it sounds like there is just something wrong with your path. You might do a MsgBox % dFilename right before that line to make sure the path looks right. Did that... still same error unless Excel is open. (This is on a Windows 7 machine if that has anything to do with it.) I don't kno...
by FanaticGuru
06 Jul 2018, 15:01
Forum: Ask For Help
Topic: Using associative arrays here?
Replies: 7
Views: 237

Re: Using associative arrays here?

CreatePixel(Color, Handle) { VarSetCapacity(BMBITS, 4, 0), Numput("0x" . Color, &BMBITS, 0, "UInt") hBM := DllCall("Gdi32.dll\CreateBitmap", "Int", 1, "Int", 1, "UInt", 1, "UInt", 24, "Ptr", 0, "Ptr") hBM ...
by FanaticGuru
06 Jul 2018, 13:09
Forum: Ask For Help
Topic: Seeking Advice on Best Approach for Email Handling with Attachments
Replies: 20
Views: 375

Re: Seeking Advice on Best Approach for Email Handling with Attachments

Question: In my current method to access the cells in a workbook, am I forced to have that workbook open in Excel? oWorkbook := ComObjGet(dFilename) I'm getting some kind of error saying that I'm using an invalid extension in the filename if I don't have the workbook open, and I wasn't sure if this...

Go to advanced search