Search found 520 matches
- 15 Mar 2019, 10:24
- Forum: Ask for Help (v1)
- Topic: Please make me understand why the behavior of these two arrays is different as shown in these two examples?
- Replies: 13
- Views: 2336
Re: Please make me understand why the behavior of these two arrays is different as shown in these two examples?
IMEime has given the specifics, I refrained from doing so because, in this case, it's a lot like going to the doctor and complaining that it hurts when you stab yourself with a knife. It doesn't really matter why it hurts at that point, stop stabbing yourself.
- 15 Mar 2019, 10:18
- Forum: Forum Issues
- Topic: Reminding new members to use code tags
- Replies: 71
- Views: 23416
Re: Reminding new members to use code tags
Sigh this is a 15 year long battle and nothing has actually worked. I gave up like 5 years ago :+1: I might argue that the process of adding code tags is much less obvious in newer editor layout, but new users barely used them when it was really obvious. We're not saying nothing could be done progr...
- 15 Mar 2019, 09:14
- Forum: Ask for Help (v1)
- Topic: How to compare time strings? Topic is solved
- Replies: 5
- Views: 2377
Re: How to compare time strings? Topic is solved
if (Round(A_Hour)=0) && (Round(A_Min)<=10)
- 14 Mar 2019, 14:45
- Forum: Ask for Help (v1)
- Topic: Please make me understand why the behavior of these two arrays is different as shown in these two examples?
- Replies: 13
- Views: 2336
Re: Please make me understand why the behavior of these two arrays is different as shown in these two examples?
You're not dealing with the same types of objects.
One is an AHK object, the other is an Excel object, they work with for-loops differently.
One is an AHK object, the other is an Excel object, they work with for-loops differently.
Code: Select all
Xl := ComObjActive("Excel.Application")
for c in Xl.Range("a1:a11")
MsgBox % c.Value
- 14 Mar 2019, 14:22
- Forum: Ask for Help (v1)
- Topic: Cant make Excel to autosum by sending hotkeys Topic is solved
- Replies: 5
- Views: 1368
Re: Cant make Excel to autosum by sending hotkeys Topic is solved
It only selects cells with data because that's how the AutoSum feature works, from the cell at which you call to AutoSum, it autoselects the contiguous range of cells with data directly above it to add. If you need one that selects a fixed range, that can probably be done.
- 14 Mar 2019, 13:47
- Forum: Ask for Help (v1)
- Topic: Internet explorer Kisok mode
- Replies: 2
- Views: 572
Re: Internet explorer Kisok mode
web_browser.theatermode
- 14 Mar 2019, 13:19
- Forum: Ask for Help (v1)
- Topic: Cant make Excel to autosum by sending hotkeys Topic is solved
- Replies: 5
- Views: 1368
Re: Cant make Excel to autosum by sending hotkeys Topic is solved
This is something that will probably easiest to connect to Excel via COM and give it the information to do it. !SC00D:: <^>!SC00D:: if WinActive("ahk_exe EXCEL.EXE") { xl := ComObjActive("Excel.Application"), c := xl.Selection , c.Formula := "=SUM(" xl.Range(c.Offset(-1,0),c.Offset(-1,0).End(-4162))...
- 14 Mar 2019, 08:06
- Forum: Ask for Help (v1)
- Topic: Loop each line of string and replace nth character Topic is solved
- Replies: 9
- Views: 1907
Re: Loop each line of string and replace nth character Topic is solved
Make sure to read through the Regular Expressions Quick Reference and the documentation for RegExReplace() for more information. FWIW, my solution, with no subpattern: text = ( 123456 Some text 654321 Some more text 112233 Even more text ) msgbox % text newtext := RegExReplace(text, "`am)^\d{6}\K ",...
- 13 Mar 2019, 15:43
- Forum: Ask for Help (v1)
- Topic: problems with Function
- Replies: 2
- Views: 370
Re: problems with Function
I corrected this in your post and added code tags.ahk-antuan wrote: ↑13 Mar 2019, 15:19sorry the Add at the end sould be a Test. but that was not the problemsolver.
- 13 Mar 2019, 13:21
- Forum: Ask for Help (v1)
- Topic: Better way of monitoring active window?
- Replies: 3
- Views: 739
Re: Better way of monitoring active window?
Code: Select all
#Persistent
SetTitleMatchMode, 2
SetTimer, MonitorWindow, 100
return
MonitorWindow:
If WinActive("Post Payments")
{
<< Perform the additional tasks while window is active... >>
}
Return
- 13 Mar 2019, 08:03
- Forum: Ask for Help (v1)
- Topic: if (expression OR expression) Syntax short-hand ? Topic is solved
- Replies: 23
- Views: 3767
Re: if (expression OR expression) Syntax short-hand ? Topic is solved
Please accept my apologies DRocks , I had forgotten that key in objects does not operate strictly in expression mode. This should get it: ;-------------------------------------------------------------------------------------------------------------------------------------------------- WM_SETCURSOR(w...
- 12 Mar 2019, 15:26
- Forum: Ask for Help (v1)
- Topic: How to use regexmatch Match.Count()?
- Replies: 9
- Views: 3162
Re: How to use regexmatch Match.Count()?
\v stands for a vertical whitespace character, which includes `r and `n , + stands for "one or more", so \v+ stands for one or more vertical whitespace characters. The "" in the ReplaceWith field is meaningless since we're not saving the modified string, but c is the variable where the count of occ...
- 12 Mar 2019, 14:57
- Forum: Ask for Help (v1)
- Topic: if (expression OR expression) Syntax short-hand ? Topic is solved
- Replies: 23
- Views: 3767
Re: if (expression OR expression) Syntax short-hand ? Topic is solved
Also my 2c: If you keep an object around that has the hWNDs as keys you can use: if (objContainingAllhWNDs.hasKey(hWND)) My thoughts exactly: ;-------------------------------------------------------------------------------------------------------------------------------------------------- WM_SETCUR...
- 12 Mar 2019, 12:47
- Forum: Ask for Help (v1)
- Topic: How to use regexmatch Match.Count()?
- Replies: 9
- Views: 3162
Re: How to use regexmatch Match.Count()?
Probably better to use RegExReplace():
Code: Select all
list=
(
the quick
brown fox
jumps over
the
lazy dog
)
RegExReplace(list,"\v+","",c)
MsgBox % c
- 11 Mar 2019, 15:34
- Forum: Ask for Help (v1)
- Topic: Excel-COM: Creating borders for a defined range of cells? Topic is solved
- Replies: 11
- Views: 2601
Re: Excel-COM: Creating borders for a defined range of cells? Topic is solved
As an aside: rangeArray := ["B3:C6", "E8:F11"] ; List of cell blocks which should be colored (will be completed later) for i in rangeArray ; Cycle through all elements of rangeArray ... If you're going to manipulate a patchwork of ranges in the exact same way, use the Union method : For i, rng in ["...
- 11 Mar 2019, 13:50
- Forum: Ask for Help (v1)
- Topic: Help with PixelSearch Functions
- Replies: 2
- Views: 614
Re: Help with PixelSearch Functions
r::SetTimer, FindOre, 800 s::SetTimer, CheckStamina, Off FindOre: CoordMode, Pixel, Screen ImageSearch, FoundX, FoundY, 10, 31, 616, 576, *20 C:\Users\Core\Desktop\Server\Untitled.png if ErrorLevel = 0 { SetTimer, FindOre, Off SetTimer, CheckStamina, 300 return } else if ErrorLevel = 1 Send, {Numpa...
- 11 Mar 2019, 12:48
- Forum: Ask for Help (v1)
- Topic: Map Ctrl-Space to LeftAlt-Shift Topic is solved
- Replies: 5
- Views: 1442
Re: Map Ctrl-Space to LeftAlt-Shift Topic is solved
What should be the intended result of hitting this key combination in your end program?
- 11 Mar 2019, 11:52
- Forum: Ask for Help (v1)
- Topic: Illegal Character % Topic is solved
- Replies: 2
- Views: 2456
Re: Illegal Character % Topic is solved
If you're going to use Send in this way you need to add an escape character before the percents, otherwise it will try to read everything between them as a variable, in which case } is an illegal character:
removed pw
Code: Select all
Send {Text}ugvkjn`%ufuzgi`%jzfzg
- 11 Mar 2019, 09:33
- Forum: Ask for Help (v1)
- Topic: Windows 7 to Windows 10: Having to Reload Script
- Replies: 15
- Views: 3427
Re: Windows 7 to Windows 10: Having to Reload Script
I can run those hotstrings on my Windows 10 machine without any issue. Are you running your script as administrator?
- 11 Mar 2019, 09:17
- Forum: Ask for Help (v1)
- Topic: Copy from Excel and Paste Tab Delimited Until Clipboard is Empty? Topic is solved
- Replies: 9
- Views: 2527
Re: Copy from Excel and Paste Tab Delimited Until Clipboard is Empty? Topic is solved
I set F3 to reload the script and it's working great. You could also use F3 to "reset" the array and the counter so you don't have to reload the script. A rewrite with some extra checks: F3:: if IsObject(data) ; if the array already exists, check if it should be overwritten { MsgBox, 52, Array Rese...