Search found 59 matches
- 20 May 2023, 08:01
- Forum: Ask for Help (v2)
- Topic: Global variables unusable in AHK 2.0.2
- Replies: 6
- Views: 919
Global variables unusable in AHK 2.0.2
Dear AHK devs, please fix this crazy global variables behavior, which becomes hell every moment I'm trying to rewrite AHK-2-alpha's scripts into AHK 2.0 (specifically 2.0.2). How you end up with such implementation? I mean, why now I have to update information that "yes, this var is global, for sure...
- 15 May 2023, 11:37
- Forum: Ask for Help (v2)
- Topic: DefineProp() and DefineMethod() Topic is solved
- Replies: 2
- Views: 454
Re: DefineProp() and DefineMethod() Topic is solved
Thank you!!!
- 15 May 2023, 07:48
- Forum: Ask for Help (v2)
- Topic: DefineProp() and DefineMethod() Topic is solved
- Replies: 2
- Views: 454
DefineProp() and DefineMethod() Topic is solved
In AHK 2.0.2, how to add new property to the String class?
How to add new method to any class, since there's no more DefineMethod method>
How to add new method to any class, since there's no more DefineMethod method>
- 09 Mar 2023, 23:52
- Forum: Scripts and Functions (v2)
- Topic: Class_SQLiteDB v2.0.6 - 2023-11-28
- Replies: 55
- Views: 66888
Re: Class_SQLiteDB v2.0.0 - 2023-01-05
Got it, thanks!
- 05 Mar 2023, 22:02
- Forum: Scripts and Functions (v2)
- Topic: Class_SQLiteDB v2.0.6 - 2023-11-28
- Replies: 55
- Views: 66888
Re: Class_SQLiteDB v2.0.0 - 2023-01-05
By the way, why is this resulting with error, but works fine when leave the lines uncommented? ;MsgBox DllCall( "LoadLibrary" ; , "Str", "sqlite3.dll" ; , "UPtr" ) MsgBox StrGet( DllCall("sqlite3.dll\sqlite3_libversion", "Cdecl UPtr"), "UTF-8" ) Especially considering that sqlite3_libversion documen...
- 31 Mar 2021, 21:34
- Forum: Ask for Help (v2)
- Topic: "InputHook()" for mouse?
- Replies: 1
- Views: 852
"InputHook()" for mouse?
Is it possible to use method, simiar to InputHook(), for the mouse? E.g.: hook := InputHook() hook.OnKeyDown := Func( "OnKeyDown" ) hook.KeyOpt( "{LButton}{RButton}{XButton2}{WheelDown}", "+N" ) hook.Start() OnKeyDown( hk, vk, sc ) { switch vk { case 12345: ;Code for LButton case 123134: ;Code for R...
- 13 Dec 2020, 05:25
- Forum: Ask for Help (v2)
- Topic: Press a combination of
- Replies: 1
- Views: 383
Re: Press a combination of
Well I tried but it doesn't work :-) Something wrong with ids comparison. global LocaleIdentifiers := Map( ;https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/a29e5c28-9fb9-4c49-8e43-4b9b8e733a05 ;https://www.autohotkey.com/docs/misc/Languages.htm "Afrikaans", 0x0436, "Albanian", 0...
- 11 Dec 2020, 12:25
- Forum: Ask for Help (v2)
- Topic: Simulaty a file drag-and-drop into an app Topic is solved
- Replies: 4
- Views: 741
Re: Simulaty a file drag-and-drop into an app Topic is solved
Thanks, seems that it's what I'm looking for. I'll try to convert this to AHK2. Let's hope this won't take more than a year
- 11 Dec 2020, 10:32
- Forum: Ask for Help (v2)
- Topic: Simulaty a file drag-and-drop into an app Topic is solved
- Replies: 4
- Views: 741
Simulaty a file drag-and-drop into an app Topic is solved
Is there a way to simulate drag-and-drop from AHK2 to an app? Or, more specifically, not drag-and-drop but just drop. I want to tell to a third-party window that there was a file dropped in it.
- 11 Dec 2020, 10:05
- Forum: Ask for Help (v2)
- Topic: Create nested class instance from variable Topic is solved
- Replies: 5
- Views: 1347
Re: Create nested class instance from variable Topic is solved
No, you can't evaluate any code using %%. i.e. dot operator. Only variable names.
- 26 Nov 2020, 00:17
- Forum: Ask for Help (v2)
- Topic: Convert string to number Topic is solved
- Replies: 1
- Views: 4127
Convert string to number Topic is solved
Is + 0 the only method in AHK to convert string into number? str_int := "100" str_float := "100.0" MsgBox Type( str_int ) ;String MsgBox Type( str_float );String num_int := str_int + 0 num_float_a := str_int + 0.0 num_float_b := str_float + 0 MsgBox Type( num_int ) ;Integer MsgBox Type( num_float_a ...
- 25 Nov 2020, 20:57
- Forum: Scripts and Functions (v2)
- Topic: JSON Serializer - 2022/09/07 - beta.8
- Replies: 43
- Views: 19038
Re: JSON - load and dump arrays to/from JSON - AHK v1/2 - 2020/10/10 - a122
a := Map(), b := Map(), c := Map(), d := Map(), e := Map(), f := Map() ; Object() is more technically correct than {} but both will work. Sorry how description "Object() is more technically correct than {} but both will work." connected with the code a := Map(), b := Map(), c := Map(), d := Map(), ...
- 18 Aug 2020, 02:11
- Forum: Ask for Help (v2)
- Topic: A RawPath ? No parameters, no variables ? Topic is solved
- Replies: 5
- Views: 2475
Re: A RawPath ? No parameters, no variables ? Topic is solved
Great! I don't understand yet completely what it does, but saved your function just in case
- 18 Aug 2020, 00:57
- Forum: Ask for Help (v2)
- Topic: PostMessage to simulate Edit control change?
- Replies: 1
- Views: 466
PostMessage to simulate Edit control change?
PostMessage example to raise Edit control change event? Is it possible?
When I call just ControlSetText function, the target window doesn't react to new text. So maybe it's possible to raise "change" event, preferably without sending keystrokes.
When I call just ControlSetText function, the target window doesn't react to new text. So maybe it's possible to raise "change" event, preferably without sending keystrokes.
- 16 Aug 2020, 21:26
- Forum: Ask for Help (v2)
- Topic: A RawPath ? No parameters, no variables ? Topic is solved
- Replies: 5
- Views: 2475
Re: A RawPath ? No parameters, no variables ? Topic is solved
Maybe this one: https://docs.microsoft.com/en-us/windows/win32/api/processenv/nf-processenv-expandenvironmentstringsa
I'm not really into DllCall, maybe I'll try later to make a function
I'm not really into DllCall, maybe I'll try later to make a function
- 16 Aug 2020, 19:39
- Forum: Ask for Help (v1)
- Topic: Google didn't close correctly issue Topic is solved
- Replies: 8
- Views: 5303
Re: Google didn't close correctly issue Topic is solved
It's nice you found a solution!
- 16 Aug 2020, 08:55
- Forum: Ask for Help (v2)
- Topic: A_LoopFileFullPath doesn't work for a folder Topic is solved
- Replies: 8
- Views: 4473
Re: A_LoopFileFullPath doesn't work for a folder Topic is solved
The thing is that paths that are passed to FullPath function, initially stored in INI file. They could be written by another user, so I can't be sure if a path is relative or absolute. Then these paths will be passed to command line utility, where absolute path is preferred to avoid strings like ".....
- 16 Aug 2020, 06:56
- Forum: Ask for Help (v2)
- Topic: A_LoopFileFullPath doesn't work for a folder Topic is solved
- Replies: 8
- Views: 4473
Re: A_LoopFileFullPath doesn't work for a folder Topic is solved
The filename that passes to function might be either short path or full path. This function is needed just to avoid guessing It always return full path.
- 16 Aug 2020, 04:36
- Forum: Ask for Help (v1)
- Topic: Google didn't close correctly issue Topic is solved
- Replies: 8
- Views: 5303
Re: Google didn't close correctly issue Topic is solved
If you want to avoid such Chrome's error window, after browser crashed last time, I've heard it's impossible to disable this error. But you of course can close it via AHK. I'm not sure if "Restore pages?" is window's title or just a text, so try one of this: loop { WinClose % "Restore pages? ahk_exe...
- 16 Aug 2020, 04:20
- Forum: Ask for Help (v2)
- Topic: A_LoopFileFullPath doesn't work for a folder Topic is solved
- Replies: 8
- Views: 4473
Re: A_LoopFileFullPath doesn't work for a folder Topic is solved
FredOoo > As soon as break or return is encountered, you exit the loop. So you'll always loop once. It's a trick described somewhere in AHK docs :-) There's no other way to find out file of folder's full path but to get it from A_LoopFileFullPath variable. And this variable is available only inside...