Search found 2882 matches
- 04 Mar 2024, 22:01
- Forum: Ask for Help (v2)
- Topic: How are we supposed to resize a Tab3?
- Replies: 1
- Views: 74
Re: How are we supposed to resize a Tab3?
This is a hacky way. It might be more flexible if there is a way to get the current margins? I just figured it was 3 on either element (so 6 pixels between consecutive elements). But I guess it'll do for now for me. #Requires AutoHotkey v2.0 tabItemCounter:=["",1,1,1] additionGui1:="", additionGui2:...
- 04 Mar 2024, 21:21
- Forum: Ask for Help (v2)
- Topic: How are we supposed to resize a Tab3?
- Replies: 1
- Views: 74
How are we supposed to resize a Tab3?
Clicking the buttons on Tabs 2-4 (Titled Tabs 1-3 with a 0-index) to add additional Edit fields results in no visual changes. All the elements are added off screen. There is no resizing of the control per this documentation note: The calculated size accounts for sub-controls which exist when autosiz...
- 20 Feb 2024, 21:00
- Forum: Ask for Help (v2)
- Topic: How is double deref managed in v2?
- Replies: 2
- Views: 94
How is double deref managed in v2?
I had my mind wrapped around v1 so easily. Loop 5 var%A_Index%:=5*A_Index MsgBox % var1 "`n" var2 "`n" var3 "`n" var4 "`n" var5 Great, we see the values 5, 10, 15, 20, 25. But I'm trying to adapt this situation into a GUI on v2 and it's not liking it #Requires Autohotkey v2 #SingleInstance global in...
- 19 Feb 2024, 10:37
- Forum: Ask for Help (v2)
- Topic: Literally write hex (binary) to a file Topic is solved
- Replies: 3
- Views: 151
Re: Literally write hex (binary) to a file Topic is solved
In a couple tests this AM, that works greatly and adapted it easily fro the file writing, which indeed is what I am seeing in my hex editor. Looks like I just had to approach it as one character at a time rather than trying to do the whole string at once. So thanks for that insight!
- 18 Feb 2024, 21:20
- Forum: Ask for Help (v2)
- Topic: Literally write hex (binary) to a file Topic is solved
- Replies: 3
- Views: 151
Literally write hex (binary) to a file Topic is solved
Struggling on this one. Can't find any examples for whatever reason. Been a while since I played with AHK. Open to v1 or v2 solutions (just installed v2). SetFormat, Integer, Hex string:=5041544348 ; sorry misleading name, it's really just supposed to be a literal raw value represented in hex MsgBox...
- 21 Dec 2022, 10:15
- Forum: Ask for Help (v1)
- Topic: Case sensitive Associative Array?
- Replies: 5
- Views: 446
Case sensitive Associative Array?
Hi there. I was hoping to write myself an English -> HexTable converter as I work on editing a game. (For reference: This is a top google result: https://www.autohotkey.com/board/topic/61840-how-make-associative-array-keys-case-sensitive/. Being it's 11 years old, I was wondering if there were any A...
- 01 Dec 2018, 10:39
- Forum: Ask for Help (v1)
- Topic: A_Index fails in Excel COM, manual increment works
- Replies: 13
- Views: 2937
Re: A_Index fails in Excel COM, manual increment works
Jumping on to test in just a moment. Thanks for the idea just me! Edit: Yes, the +0 trick worked. And I did a bit more diagnosis that it only matters that the c:=A_Index is set in the outer loop. If I set it in the inner loop (which I did to test if a 1,1 pair would work), there is no issue. To clar...
- 01 Dec 2018, 02:26
- Forum: Ask for Help (v1)
- Topic: A_Index fails in Excel COM, manual increment works
- Replies: 13
- Views: 2937
Re: A_Index fails in Excel COM, manual increment works
Formatting fixed. It was never an issue of r = 1. It does r++. 1506 times. Then goes back to 0. And repeats that 272 times. To be clear, in both instances, the values of r and c are 1 to produce the 1, 1 pair. The first code continues on to 2, 1 then 3, 1 . The second code, which uses A_Index, insta...
- 30 Nov 2018, 22:58
- Forum: Ask for Help (v1)
- Topic: A_Index fails in Excel COM, manual increment works
- Replies: 13
- Views: 2937
A_Index fails in Excel COM, manual increment works
The code below works ex:=ComObjActive("Excel.Application") Loop % 26*10+12 ; this is columns { c++ Loop 1506 ; this is rows { r++ MsgBox % r "," c formula:=ex.Cells(r, c).formula If StrLen(formula)>80 ex.Cells(r, c).formula:="=IF(A5=""CP""," SubStr(formula,2) ",IF(A5=""Stats Sum"",(INDIRECT(""R"" & ...
- 24 Sep 2018, 17:24
- Forum: Ask for Help (v1)
- Topic: how to tell if a variable is integer? Topic is solved
- Replies: 7
- Views: 6074
Re: how to tell if a variable is integer? Topic is solved
If var is digit Digit does not accept periods (nor commas), so it works in identifying a value as an integer. However, you may want to incorporate it with another check for it to have a value, as otherwise a null value in the variable is also accepted. If !var { MsgBox %var% has no value or is fals...
- 17 Sep 2018, 14:53
- Forum: Ask for Help (v1)
- Topic: [Solved] Sending 2 different action when a key is pressed + when it’s released Topic is solved
- Replies: 4
- Views: 1339
Re: Sending an action when a key is pressed + when a key is released Topic is solved
Bah, I forgot down is not a modifier for hotkeys.
Code: Select all
MButton::SoundSet, 0,, Mute, 2
MButton up::SoundSet, 1,, Mute, 2
- 17 Sep 2018, 12:37
- Forum: Ask for Help (v1)
- Topic: [Solved] Sending 2 different action when a key is pressed + when it’s released Topic is solved
- Replies: 4
- Views: 1339
Re: Sending an action when a key is pressed + when a key is released Topic is solved
MButton can be finicky, but the code should be
If it doesn't work as is, try a different key instead of MButton, just to test it. Then we can come up with a different solution.
Code: Select all
MButton down::SoundSet, 0,, Mute, 2
MButton up::SoundSet, 1,, Mute, 2
If it doesn't work as is, try a different key instead of MButton, just to test it. Then we can come up with a different solution.
- 11 Sep 2018, 20:40
- Forum: Ask for Help (v1)
- Topic: Using IE COM, how can I scroll to bottom of page? Topic is solved
- Replies: 4
- Views: 1898
Re: Using IE COM, how can I scroll to bottom of page? Topic is solved
It's complained about scroll and scrollTo if I omitted window, will start trialing those in any combination I can think of.
Edit: That worked straight away. Thanks!
Edit: That worked straight away. Thanks!
- 11 Sep 2018, 20:32
- Forum: Ask for Help (v1)
- Topic: Using IE COM, how can I scroll to bottom of page? Topic is solved
- Replies: 4
- Views: 1898
Re: Using IE COM, how can I scroll to bottom of page? Topic is solved
Didn't work: --------------------------- &Test Script.ahk --------------------------- Error: 0x80020006 - Unknown name. Specifically: window Line# 375: { 376: if (ex.Range("N" A_Index).DisplayFormat.Interior.Color != 6249471) 377: Continue 378: if (ex.Range("N" A_Index).value="") 379: Break 381: ie....
- 11 Sep 2018, 17:19
- Forum: Ask for Help (v1)
- Topic: Using IE COM, how can I scroll to bottom of page? Topic is solved
- Replies: 4
- Views: 1898
Using IE COM, how can I scroll to bottom of page? Topic is solved
I could end up focusing the browser window and then using Send {End} , but for curiosity's sake, I'd like to get it done with COM. (It'd be slightly more fluid too, letting me do stuff in the meantime while I wait on webpages to load instead of having to leave it focused.) I've tried stuff like ie.s...
- 07 Sep 2018, 14:56
- Forum: Ask for Help (v1)
- Topic: round to nearest non-zero number
- Replies: 5
- Views: 1613
Re: round to nearest non-zero number
Two improvements. Try in the RegEx method the needle "^0*\K\.0*" . The ^ means we must match the beginning of the string. 0.something will match, but 160.something will not. The 0* also lets .something, with no digits left of decimal match. The \K means all matching characters in pattern to left of ...
- 07 Sep 2018, 08:56
- Forum: Ask for Help (v1)
- Topic: round to nearest non-zero number
- Replies: 5
- Views: 1613
Re: round to nearest non-zero number
There's probably a way more efficient way. But you can identify how many 0s there are by using RegExMatch to extract the string of ".000..." for how many zeroes there are, then use the StrLen command to find how many positions to go. This counts the period in the strlen, but we want that, or else it...
- 30 Aug 2018, 22:05
- Forum: Ask for Help (v1)
- Topic: Loop with increments 1a, 1b, 1c, 2a, 2b, 2c, 3a etc
- Replies: 5
- Views: 1554
Re: Loop with increments 1a, 1b, 1c, 2a, 2b, 2c, 3a etc
There's more than one way to solve this problem. Rather than any loop inside of a loop, here's an answer with a single loop. In a loop, you have the variable A_ Index . We will use this in conjunction with the Ceil () function (Ceil, rounds up) and the Mod () function (Modulus, calculates a remainde...
- 27 Aug 2018, 12:23
- Forum: Ask for Help (v1)
- Topic: If color=green then click x, y. So simple but doesnt work Topic is solved
- Replies: 1
- Views: 1188
Re: If color=green then click x, y. So simple but doesnt work Topic is solved
(Foreword: I have not downloaded "Case Clicker.ahk", just using the reference code you copy and pasted to the forum.) First off, when you find the Target_Color matches Current_Color1, you are making it click at Target_X2 and _Y2, not _X1 and _Y1. May be purposeful, but I otherwise saw a pattern that...
- 02 Aug 2018, 19:41
- Forum: Ask for Help (v1)
- Topic: Binding a key for a Sequence
- Replies: 2
- Views: 1115
Re: Binding a key for a Sequence
This is possible with a counting variable and an If statement. var:=0 ; start this at zero e:: var++ ; increments the variable by 1 If (var=1) Send 1 else if (var=2) Send 2 ; add in 3 and 4, to make sure you understand what is going on else if (var=5) { Send 5 var:=0 ; reset to zero } return You can...