Search found 1166 matches

by FanaticGuru
24 Aug 2018, 15:11
Forum: Ask For Help
Topic: Trying to get better at arrays, need help
Replies: 3
Views: 90

Re: Trying to get better at arrays, need help

Ok, Figured it out for anyone who is curious for each, element in Data { if (ThisName = element.Name) { PersonA := element.User } } This seems more well suited to an associative array. #SingleInstance Force ; get info into Data array UserNames= ( John Bob Tom ) UserIDs= ( J B T ) Names := StrSplit(...
by FanaticGuru
22 Aug 2018, 13:03
Forum: Ask For Help
Topic: variable for Outlook
Replies: 2
Views: 43

Re: variable for Outlook

I cant put a carriage return in a variable. Here is my code. omolist = test ;this works promolist = test`n123 ;this does not work FormatTime, CurrentDateTime,, MM-dd-yy body = %promolist% subject:=CurrentDateTime " promos are on 1030view Omneon HARMONIC and PM EXPORTS" email:="person...
by FanaticGuru
22 Aug 2018, 12:46
Forum: Ask For Help
Topic: Gotta be a cleaner way
Replies: 3
Views: 89

Re: Gotta be a cleaner way

Can someone with more experience than myself show me how this could be cleaned up and made simpler? I don't have the interest to go through all the code but you need to use some various loops, maybe some subroutines or functions. Here is an example: ;~ A1:=pwb.document.GetElementsByTagName("TD...
by FanaticGuru
21 Aug 2018, 19:42
Forum: Ask For Help
Topic: COM, Outlook, ClipboardAll
Replies: 8
Views: 121

Re: COM, Outlook, ClipboardAll

Outlook := ComObjActive("Outlook.Application") email := Outlook.CreateItemFromTemplate(A_Desktop "\Untitled.oft") email.To := "someone@email.com" email.Subject := "COM email test with formatting" ; .Display(true) - True to make the window modal. The default v...
by FanaticGuru
21 Aug 2018, 16:02
Forum: Ask For Help
Topic: COM, Outlook, ClipboardAll
Replies: 8
Views: 121

Re: COM, Outlook, ClipboardAll

I'm not sure where to begin on writing some HTML.. so I looked into a normal paste. The one thing is, when I use window spy I can't seem to 'see' the body messsage. The only control name I can find is "_WwG1" and setting text has no effect. I can however use ControlFocus to activate the b...
by FanaticGuru
21 Aug 2018, 15:00
Forum: Ask For Help
Topic: COM, Outlook, ClipboardAll
Replies: 8
Views: 121

Re: COM, Outlook, ClipboardAll

The Help for ClipboardAll explains it pretty well. ClipboardAll returns the binary formatted information of the clipboard and is rarely what you want. Clipboard is what you would normally use in situations like this. FG Thanks for the reply. The only thing is, when I use Clipboard it just behaves a...
by FanaticGuru
21 Aug 2018, 14:38
Forum: Ask For Help
Topic: COM, Outlook, ClipboardAll
Replies: 8
Views: 121

Re: COM, Outlook, ClipboardAll

Hello, In the code below, ClipboardAll does not appear to be working. I'm copying a range of cells from Excel and then wanting that data to be in the message body, with the formatting and cell colors as a manual paste result. Does anyone know how I can accomplish this? Thanks in advance! Outlook :=...
by FanaticGuru
20 Aug 2018, 18:31
Forum: Ask For Help
Topic: Save outlook items with Date and Subject
Replies: 4
Views: 119

Re: Save outlook items with Date and Subject

Thanks, unfortunately this gives me a 00.00 as a time. what could be wrong ? All I can tell you is that the script works for me. When I activate this script: F12:: olApp := ComObjActive("Outlook.Application") try olItem := olApp.ActiveWindow.CurrentItem catch olItem := olApp.ActiveExplore...
by FanaticGuru
20 Aug 2018, 16:59
Forum: Ask For Help
Topic: Excel IP in Cell convert to URL ?
Replies: 9
Views: 143

Re: Excel IP in Cell convert to URL ?

Below is an AHK COM solution: xlApp := ComObjActive("Excel.Application") for Cell in xlApp.ActiveSheet.UsedRange.Cells if RegExMatch(Cell.Value2, "\d*\.\d*\.\d*\.\d*", IP) xlApp.ActiveSheet.Hyperlinks.Add(Cell, IP,,, "http://" IP) This will loop through all the used cel...
by FanaticGuru
15 Aug 2018, 17:29
Forum: Ask For Help
Topic: Pulling cell value from excel during a loop
Replies: 1
Views: 53

Re: Pulling cell value from excel during a loop

Purpose: Copy the text from cell AY6 in an open excel sheet into a text box in another active program. The text changes everyday thus the need to reference a cell rather than a static piece of text. Excel Location: "T:/Task Assignments/Order Management/CNF/qsod104 - PFS CNF Overview_180127&quo...
by FanaticGuru
13 Aug 2018, 12:42
Forum: Ask For Help
Topic: Small code to run Calc
Replies: 10
Views: 261

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

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

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

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

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

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

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

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

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

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

Go to advanced search