Search found 2642 matches

by jeeswg
2 minutes ago
Forum: AutoHotkey v2 Development
Topic: scrap commands?
Replies: 0
Views: 4

scrap commands?

Note: this poll says nothing about control flow statements: Break, Continue, Else, Gosub, Goto, If, Loop, Return, While. Catch, Finally, For, Throw, Try, Until. Note: this poll says nothing about directives e.g. #If and #IfWinActive. At present you can do this: Func(Arg1, Arg2) Func Arg1, Arg2 ;comm...
by jeeswg
20 minutes ago
Forum: AutoHotkey v2 Development
Topic: keys with numeric names
Replies: 0
Views: 6

keys with numeric names

- I found that in AHK v2, the assignment of values to keys in arrays is different. - In AHK v1 this creates 2 keys, in AHK v2 this creates 1 key. obj := {} obj[1] := "a" obj["1"] := "b" - Overall, with the various for/against arguments considered, I think this behaviour...
by jeeswg
56 minutes ago
Forum: Scripts and Functions
Topic: one-loop sorting of strings by their length
Replies: 16
Views: 387

Re: one-loop sorting of strings by their length

q:: ;some ternary operator examples ;it is possible to use the '2-item ternary operator' in AHK ;AHK v1 only a := 1, b := 0, c := 0 (a = 1) ? (b := 1) (a = 2) ? (c := 1) MsgBox, % b " " c ;works in AHK v1/v2 a := 1, b := 0, c := 0 (a = 1) && (b := 1) (a = 2) && (c := 1) Ms...
by jeeswg
Today, 11:38
Forum: Scripts and Functions
Topic: one-loop sorting of strings by their length
Replies: 16
Views: 387

Re: one-loop sorting of strings by their length

- I made some comments about stable sort v. unstable sort here: Wish List 2.0 - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=13&t=36789 - In sort functions, you should specify what happens if a > b, and a < b, and a = b. - If you return 0, for a = b, then the Sort command i...
by jeeswg
Today, 09:07
Forum: Scripts and Functions
Topic: one-loop sorting of strings by their length
Replies: 16
Views: 387

Re: one-loop sorting of strings by their length

Re. ShortestFirst: return (d := strlen(a1) - strlen(a2)) ? d : -ShortestFirst versus return strlen(a)-strlen(b) The first will maintain the order of any items with the same length, it will give a stable sort, e.g. a,b,c,d,e -> a,b,c,d,e versus a,b,c,d,e -> b,c...
by jeeswg
Yesterday, 19:01
Forum: Ask For Help
Topic: How to genuinely compile a script? Is there any "loop" faster alternative?
Replies: 8
Views: 199

Re: How to genuinely compile a script? Is there any "loop" faster alternative?

- Interesting link. I've now started a txt file collecting links on AutoHotkey 'behind the scenes', which I might post when I get a few links, say ten. At some point I intend to go through old AHK forum posts, and collect any relevant links. - It seems that you've answered the first question in your...
by jeeswg
Yesterday, 16:11
Forum: Ask For Help
Topic: How to account for changing ClassNN info
Replies: 13
Views: 102

Re: How to account for changing ClassNN info

Hmm, well in that case, hopefully that information can be used to confirm that you've got the correct ComboBox as you loop through them. It looks like everything is doable if you combine the information I've put together on this page. Also, the first MsgBox confirms that the ComboBox class name ends...
by jeeswg
Yesterday, 15:32
Forum: Ask For Help
Topic: How to account for changing ClassNN info
Replies: 13
Views: 102

Re: How to account for changing ClassNN info

My script above was for use with Notepad. Use this script, to see if you can get the control text: The ComboBox should be the active control when you run it. q:: ;active control - get class (and get text if control compatible) ControlGetFocus, vCtlClassNN, A ControlGet, hCtl, Hwnd,, % vCtlClassNN, A...
by jeeswg
Yesterday, 15:07
Forum: Ask For Help
Topic: How to account for changing ClassNN info
Replies: 13
Views: 102

Re: How to account for changing ClassNN info

Yes and no. The class of the window ends in 'ad1', this is good evidence. So I'll assume that 'ad1' is also the end of the control class. To double-check I could do this: ControlGetFocus, vCtlClassNN, A ControlGet, hCtl, Hwnd,, % vCtlClassNN, A WinGetClass, vCtlClass, % "ahk_id " hCtl MsgB...
by jeeswg
Yesterday, 14:52
Forum: Ask For Help
Topic: How to account for changing ClassNN info
Replies: 13
Views: 102

Re: How to account for changing ClassNN info

The ClassNN appears to have a consistent pattern: WindowsForms10.COMBOBOX.app.0.#######_r9_ad## But the NN varies, it is 14 or 11 (or possibly 4 or 1, I'm not certain if the class ends in 'ad1' or 'ad'). So this appears to be a problem, the number at the end is not consistent. [EDIT:] The class appe...
by jeeswg
Yesterday, 14:43
Forum: Ask For Help
Topic: How to click a button that has no ClassNN
Replies: 1
Views: 36

Re: How to click a button that has no ClassNN

- So usually a button control has its own ClassNN. - Otherwise the button may be part of a control. If when you hover over the button with AutoHotkey's window spy, it is part of larger control that has a ClassNN, and if the button is always in the same place relative to the larger control that it's ...
by jeeswg
Yesterday, 14:37
Forum: Ask For Help
Topic: How to account for changing ClassNN info
Replies: 13
Views: 102

Re: How to account for changing ClassNN info

- Can you give an example of 2 versions of the same control? 2 different ClassNNs. - Something like this might work to get the 14th control that starts with 'WindowsForms10.COMBOBOX'. WinGet, hWnd, ID, A vCount := 0 WinGet, vCtlList, ControlList, % "ahk_id " hWnd Loop, Parse, vCtlList, `n ...
by jeeswg
Yesterday, 14:17
Forum: Ask For Help
Topic: Double quote symbols appear as @ symbols in Command Prompt window
Replies: 8
Views: 110

Re: Double quote symbols appear as @ symbols in Command Prompt window

- Normally you can do anything you would do in the command prompt via AutoHotkey, as was mentioned above, via Run or RunWait. You can even do special commands like 'set' by specifying the path of ComSpec with some arguments. - There is an example of getting the StdOut from a process here, see JEE_Ru...
by jeeswg
16 Nov 2017, 23:49
Forum: Ask For Help
Topic: Clueless and need help with a few old AHK codes
Replies: 6
Views: 76

Re: Clueless and need help with a few old AHK codes

- For an old script, first I would try running it with the U32 (Unicode x32) or A32 (ANSI x32) exes for the current version of AutoHotkey (currently v1.1.26.01). The oldest scripts were written for x32, and ANSI. - I might try older versions of AutoHotkey or AutoHotkey Basic. - I would make a note o...
by jeeswg
16 Nov 2017, 22:42
Forum: Ask For Help
Topic: Numpad Keys not working as triggers while other keys do work...
Replies: 7
Views: 62

Re: Numpad Keys not working as triggers while other keys do work...

Btw:

Code: [Select all]GeSHi © Codebox Plus

Numpad1:: ;works when NumLock is on
NumpadEnd:: ;works when NumLock is off
vState := GetKeyState("NumLock", "T") ? "on" : "off"
MsgBox, % A_ThisHotkey "`r`n" "NumLock is " vState
return
by jeeswg
16 Nov 2017, 21:44
Forum: Ask For Help
Topic: Encoding issues retrieving text from the internet
Replies: 4
Views: 67

Re: Encoding issues retrieving text from the internet

- It was a different but related issue that led me to an interest in retrieving the raw contents of the html and not ResponseText. - Sometimes I would get an error, mentioning encoding I believe, when retrieving ResponseText. I don't know the full details, because I did this very rarely. - So what I...
by jeeswg
16 Nov 2017, 18:05
Forum: Ask For Help
Topic: Convert string in clipboard from Unicode to specific codepage
Replies: 5
Views: 73

Re: Convert string in clipboard from Unicode to specific codepage

- A possible answer to 'Is there a way to make an ANSI program CP1251 compatible instead of CP1252.' Try searching the Internet for 'set system codepage'. This might be a solution. - If you change one line in my script above to: Clipboard := StrGet(&vTemp, "CP1252") ;1252 not 1...
by jeeswg
16 Nov 2017, 13:57
Forum: Ask For Help
Topic: hotkey
Replies: 1
Views: 24

Re: hotkey

This didn't work for me:

This did:
by jeeswg
16 Nov 2017, 13:45
Forum: Ask For Help
Topic: Rogue character appear when pasting/SENDing £
Replies: 1
Views: 14

Re: Rogue character appear when pasting/SENDing £

Hello, this sounds like the same problem you had before: Can't SEND pound sign (£) - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=5&t=39021 It definitely sounds like an issue relating to UTF-8 in some way, because UTF-8 stores the £ sign using those 2 characters. You would ...

Go to advanced search