Search found 6543 matches

by jeeswg
Yesterday, 21:55
Forum: Ask For Help
Topic: System macro not working on AutoHotkey v1.1+ x64 Topic is solved
Replies: 6
Views: 168

Re: System macro not working on AutoHotkey v1.1+ x64 Topic is solved

Hmm. :think: Reversing the bytes in a UInt64 / Int64. I knew that Format can do Int64 to UInt64. But it seems it cannot do UInt64 to Int64. So NumPut/NumGet is needed. If you do bitshift-right on a negative number, it fills in all the initial bits with 1s. And so if you read that number as a positiv...
by jeeswg
Yesterday, 20:11
Forum: Ask For Help
Topic: Shortcuts for launching programs
Replies: 6
Views: 105

Re: Shortcuts for launching programs

- I have some ideas for exe name to path, here: Best way to get the path to an executable - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=5&t=36484&p=168051#p168051 - I demonstrate using 'HKEY_CLASSES_ROOT\Applications', below: - However, you can usually just specify the exe nam...
by jeeswg
Yesterday, 18:46
Forum: Ask For Help
Topic: System macro not working on AutoHotkey v1.1+ x64 Topic is solved
Replies: 6
Views: 168

Re: System macro not working on AutoHotkey v1.1+ x64 Topic is solved

See: LoadPicture() from variable - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=5&t=39002&p=181321#p181321 And here: best utilities + best AutoHotkey scripts (+ useful tips) - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=7&t=28149 [ list all of the functio...
by jeeswg
Yesterday, 16:54
Forum: AutoHotkey v2 Help
Topic: [a104] are builtin classes protected against accidental overwriting? Topic is solved
Replies: 8
Views: 141

Re: [a104] are builtin classes protected against accidental overwriting? Topic is solved

- Potentially you could call %func%() with Array/Object/custom function MyArray etc, depending on the situation. - There's also ease of conversion, if another language has a similar function. - You might commonly interchange between Array/MyArray in quick scripts, or modify the existing Array functi...
by jeeswg
Yesterday, 13:35
Forum: Ask For Help
Topic: Can AHK do this?
Replies: 3
Views: 98

Re: Can AHK do this?

- When you press the keys, see if they appear in the key history. If they do, you may be able to create hotkeys for them. See the code below. - The key history is accessible via the KeyHistory command and via: right-click the AHK tray icon, Open, View, Key history and script info - (Very often, Fn w...
by jeeswg
18 Aug 2019, 23:49
Forum: AutoHotkey v2 Development
Topic: Map shorthand
Replies: 14
Views: 282

Re: Map shorthand

For readability and avoiding pressing " too many times: oMap := StrSplitMap("key1,value1,key2,value2,key3,value3", ",") oMap := StrSplitMap("1,1,2,2,3,3", ",") oMap := StrSplitMap("1.0,1.0,2.0,2.0,3.0,3.0", ",") vOutput := "" for vKey, vValue in oMap vOutput .= vKey " " vValue " " Type(vKey) " " Typ...
by jeeswg
18 Aug 2019, 18:44
Forum: AutoHotkey v2 Development
Topic: commands as functions (AHK v2 functions for AHK v1)
Replies: 72
Views: 11466

Re: commands as functions (AHK v2 functions for AHK v1)

Re.:
AutoHotkey v2 alpha (UPDATES) - Page 3 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=37&t=2120&p=288705#p288705

Code: Select all

Map(Params*)
{
	if (Params.Length() & 1)
		throw Exception("Invalid number of parameters.", -1)
	return Object(Params*)
}
by jeeswg
18 Aug 2019, 13:08
Forum: AutoHotkey v2 Development
Topic: AHK Unit Testing
Replies: 3
Views: 134

Re: AHK Unit Testing

I've shared some test code, here. (At some point I plan to create a variant that doesn't need the user to monitor it.)
commands as functions (AHK v2 functions for AHK v1) - Page 2 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=37&t=29689&p=210822#p210822
by jeeswg
16 Aug 2019, 15:04
Forum: Ask For Help
Topic: Cast COM Object IWebBrowser2 to IServiceProvider
Replies: 3
Views: 239

Re: Cast COM Object IWebBrowser2 to IServiceProvider

Great info, thanks for sharing! For the current Internet Explorer tab: ;WBGet function - AutoHotkey Community ;https://autohotkey.com/boards/viewtopic.php?f=6&t=39869 q:: ;internet explorer - get tab hWnd (TabWindowClass hWnd) WinGet, hWnd, ID, A oWB := WBGet("ahk_id " hWnd) IID_IServiceProvider := ...
by jeeswg
16 Aug 2019, 13:53
Forum: Ask For Help
Topic: I want to overlay a different time zone versus my system time zone in bottom-right clock
Replies: 1
Views: 160

Re: I want to overlay a different time zone versus my system time zone in bottom-right clock

Multiple (digital) clocks for different countries, that update simultaneously:
get DST (daylight-saving time) start/end dates/times in UTC - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=28355&p=162191#p162191
Cheers.
by jeeswg
16 Aug 2019, 11:45
Forum: Ask For Help
Topic: Does A_ComSpec point to 32-bit cmd or 64-bit cmd?
Replies: 7
Views: 324

Re: Does A_ComSpec point to 32-bit cmd or 64-bit cmd?

@gregster: Here's a test script. I'd expect the paths to differ. If you get both paths the same, it might be interesting to know what OS you're using. Thanks. ;test file redirection (requires 64-bit PC, 32-bit AHK) if !A_Is64bitOS { MsgBox, % "error: you must test the script on a 64-bit PC" return }...
by jeeswg
16 Aug 2019, 02:00
Forum: Ask For Help
Topic: Unicode hotstring writes gibberish Topic is solved
Replies: 2
Views: 78

Re: Unicode hotstring writes gibberish Topic is solved

Your file is UTF-8 without a BOM. You need to save as UTF-8 with a BOM. Cheers.
by jeeswg
15 Aug 2019, 22:45
Forum: Ask For Help
Topic: Check Variable Contain Numbers/Letters Topic is solved
Replies: 12
Views: 292

Re: Check Variable Contain Numbers/Letters Topic is solved

Cheers.

Code: Select all

;q:: ;check that string contains at least one number and at least one letter
Var=UDP4324
;Var=aaaaaaa
;Var=1111111
if RegExMatch(Var, "i)(?=.*[A-Z])(?=.*\d)")
;if RegExMatch(Var, "\d") && RegExMatch(Var, "[A-Za-z]") ;equivalent to line above
{
	MsgBox, OK
}
else
{
	MsgBox, NO
}
return
by jeeswg
15 Aug 2019, 12:05
Forum: Ask For Help
Topic: Does A_ComSpec point to 32-bit cmd or 64-bit cmd?
Replies: 7
Views: 324

Re: Does A_ComSpec point to 32-bit cmd or 64-bit cmd?

If you run 32-bit AHK on a 64-bit PC, you need to disable file redirection, otherwise when you specify the path to the 64-bit version, it opens the 32-bit version: ;note: on 64-bit PCs: ;C:\Windows\System32 contains 64-bit files (yes, *64*-bit/system*32*) ;C:\Windows\SysWOW64 contains 32-bit files (...
by jeeswg
14 Aug 2019, 14:06
Forum: Ask For Help
Topic: Not Respecting Sleep function
Replies: 3
Views: 108

Re: Not Respecting Sleep function

It looks like the Delimiters parameter needs changing. It's using 10 characters rather than 2, and contains an apostrophe rather than a backtick. ;before: Loop, parse, clipboard, A_Space 'r, `n ;after (multiple versions): Loop, parse, clipboard, % A_Space "`r", `n Loop, parse, clipboard, % " `r", `n...
by jeeswg
14 Aug 2019, 10:51
Forum: Ask For Help
Topic: Format date script
Replies: 3
Views: 127

Re: Format date script

- I tried the script, but 'Fri' sent fine. One possibility is that you've assigned a hotkey/hotstring to 'shift+F' or 'F'.
- You could experiment by making the text lower case before sending. To see if a lower-case f sends successfully.
SendInput, % Format("{:L}", vDate)
by jeeswg
14 Aug 2019, 10:45
Forum: Ask For Help
Topic: Loop file sort rule..? Topic is solved
Replies: 2
Views: 88

Re: Loop file sort rule..? Topic is solved

You can use the Winapi function, StrCmpLogicalW, to sort items like Explorer sorts file names:
Numerical sorting tweak? - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=63893&p=273947#p273947
by jeeswg
13 Aug 2019, 15:23
Forum: Ask For Help
Topic: Silent Install of Winmerge for chocolatey Community
Replies: 3
Views: 378

Re: Silent Install of Winmerge for chocolatey Community

Press q perhaps?
Btw my original script will work on Notepad when a dialog is open, e.g. Open/Save As/Find/Replace/Font.
by jeeswg
13 Aug 2019, 13:02
Forum: Ask For Help
Topic: Silent Install of Winmerge for chocolatey Community
Replies: 3
Views: 378

Re: Silent Install of Winmerge for chocolatey Community

I would go by window class and exe name, and perhaps for extra security, check the control ClassNNs. E.g. change the class/exe in script below. You could also use WinGet Style/ControlGet Style. Cheers. q:: ;notepad - get control list for dialog window WinGet, hWnd, ID, ahk_class #32770 ahk_exe notep...
by jeeswg
10 Aug 2019, 18:57
Forum: Ask For Help
Topic: Defining Structs (memory buffers) using bitwise operators?
Replies: 8
Views: 486

Re: Defining Structs (memory buffers) using bitwise operators?

- I like to think of everything as bytes, left to right, e.g. 'AA BB CC DD' (big endian). - NumGet Int would report that as 0xDDCCBBAA, because it's reading it as little endian. - Items in a struct would be blocks of bytes, left to right. - Generally, when you write to a struct, sign doesn't matter,...

Go to advanced search