Search found 144 matches
- 26 Aug 2023, 22:53
- Forum: Ask for Help (v2)
- Topic: SoundPlay takes 400ms to return despite specifying no wait?
- Replies: 11
- Views: 1062
Re: SoundPlay takes 400ms to return despite specifying no wait?
I guess it could be problems with my sound card or driver? Thanks for trying to reproduce it though. I'm consistently getting the 300-400ms result on a Dell XPS 17 . I'd be curious to hear if anyone else is getting much faster or similar results. Loop 3 { t:=A_TickCount SoundPlay("C:\Windows\Media\d...
- 26 Aug 2023, 14:44
- Forum: Ask for Help (v2)
- Topic: SoundPlay takes 400ms to return despite specifying no wait?
- Replies: 11
- Views: 1062
SoundPlay takes 400ms to return despite specifying no wait?
On my machine, the 1st tooltip shows the time taken to be around 1.5 second, as expected, because SoundPlay is asked to wait until file is finished playing before returning. However, the 2nd tooltip where Wait is omitted ("If [the Wait parameter is] unset or omitted, the script's current thread will...
- 26 Aug 2023, 13:13
- Forum: Forum Issues
- Topic: Completely disable smilies in the full editor
- Replies: 8
- Views: 4743
Re: Completely disable smilies in the full editor
You can use a browser extension that allows you to add user css, like Stylus (https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne)
Then add
What's wrong with smileys? :p
Then add
Code: Select all
#smiley-box {
display: none
}
- 26 Aug 2023, 10:43
- Forum: Ask for Help (v2)
- Topic: Convert helgef's WinHole
- Replies: 2
- Views: 273
Re: Convert helgef's WinHole
Sorry, I have not converted it, only shortened, F2:: now toggles circle/square: Thanks Rohwedder for sharing this! I still have an v1 executable on my machine, so I can bind a shortcut to run this script from v1 when pressed. This inspired me to actually take a look at helgef's source code. Somehow...
- 26 Aug 2023, 10:24
- Forum: Ask for Help (v2)
- Topic: To BOM or not to BOM?
- Replies: 12
- Views: 812
Re: To BOM or not to BOM?
"UTF-8" (which means UTF-8 with BOM) Are you saying that encoding with UTF-8 uses 'with BOM' by default - is that implied by your editor? I use VSCode and the encoding options, amongst others, are 'UTF-8' or 'UTF-8 with BOM' As boiler said, FileEncoding("UTF-8") is the "with BOM" option, so it corr...
- 26 Aug 2023, 02:42
- Forum: AutoHotkey Development
- Topic: Why do Win functions accept hwnd integers as WinTitle while HotIfWin functions only accept strings?
- Replies: 5
- Views: 1828
Re: Why do Win functions accept hwnd integers as WinTitle while HotIfWin functions only accept strings?
I just went through my code and deleted all occurrences of `"ahk_id "`, which was a big source of annoyance. I had no idea you can now just use the hwnd!
- 26 Aug 2023, 02:31
- Forum: Ask for Help (v2)
- Topic: Convert helgef's WinHole
- Replies: 2
- Views: 273
Convert helgef's WinHole
Link: viewtopic.php?t=30622
This is the one of the most unusual, at times hilarious, but also unexpectedly useful ahk scripts I've ever come across.
Please, @Helgef or someone else, convert it to v2!
This is the one of the most unusual, at times hilarious, but also unexpectedly useful ahk scripts I've ever come across.
Please, @Helgef or someone else, convert it to v2!
- 25 Aug 2023, 22:32
- Forum: Ask for Help (v2)
- Topic: v2 object issues Topic is solved
- Replies: 4
- Views: 548
Re: v2 object issues Topic is solved
Yes, this is a big part of the process of converting from v1 to v2. But IMO it's worth it. It makes the code less prone to breaking.
For previous discussions see viewtopic.php?t=67213&start=40
For previous discussions see viewtopic.php?t=67213&start=40
- 25 Aug 2023, 22:25
- Forum: Ask for Help (v2)
- Topic: why does (Object is Object) evalute to true?
- Replies: 1
- Views: 265
why does (Object is Object) evalute to true?
According to the doc, (0) "Value is Class yields true (1) if Value is an instance of Class or false (0) otherwise". So from the fact that : (1) (Object is Object) evalutes to 1 we can infer that: (2) Object is an instance of the class Object However, the first occurence of "Object" in (2) refers to ...
- 25 Aug 2023, 21:59
- Forum: Ask for Help (v2)
- Topic: value of "Type(Prototype)" not as expected
- Replies: 2
- Views: 360
Re: value of "Type(Prototype)" not as expected
Thanks, your explanation makes perfect sense. 1. Not only is Prototype not a class, but it could't possible be one, given how the class system is set up. I originally thought otherwise because (apart from "Prototype" being a possible value of Type()) the prototype is said in the doc to be an "object...
- 25 Aug 2023, 21:26
- Forum: Ask for Help (v2)
- Topic: v2 object issues Topic is solved
- Replies: 4
- Views: 548
Re: v2 object issues Topic is solved
Use Map (see: https://www.autohotkey.com/docs/v2/v2-changes.htm#objects-misc)
Code: Select all
p := Map()
p["x-api-key"] := 1
006: MsgBox(p["x-api-key"])
008: ExitApp()
- 25 Aug 2023, 21:17
- Forum: Ask for Help (v2)
- Topic: To BOM or not to BOM?
- Replies: 12
- Views: 812
Re: To BOM or not to BOM?
I've often had use AHK to save to files that are intended to be used by other apps, and found that using FileEncoding "UTF-8" (which means UTF-8 with BOM) sometimes cause issues. For example my Win10 won't run .bat files saved in that way (using "UTF-8-RAW" is necessary) bat := "@echo off`r`npause" ...
- 24 Aug 2023, 02:19
- Forum: Ask for Help (v2)
- Topic: value of "Type(Prototype)" not as expected
- Replies: 2
- Views: 360
value of "Type(Prototype)" not as expected
[Moderator's note: Topic moved from Bug Reports.] 1. Type(Array.Prototype) evalutes to the string "Prototype" 2. According to the doc, Type(...) "Returns the class name of a value." It follows that "Prototype" must be a class name, and Prototype must be a class. 3. So Type(Prototype) should evalute...
- 24 Aug 2023, 00:08
- Forum: AutoHotkey Development
- Topic: The meaningless "Invalid memory read/write"
- Replies: 14
- Views: 4046
Re: The meaningless "Invalid memory read/write"
I see, thanks lexicos. The only such callback in my code is from SetWinEventHook, so that's probably where I should investigate.
Code: Select all
DllCall("user32\SetWinEventHook", "UInt", 0x0003, "UInt", 0x0003, "Ptr", 0, "Ptr", CallbackCreate(WM_EventHookCallBack), "UInt", 0, "UInt", 0, "UInt", 0, "Ptr")
- 23 Aug 2023, 23:39
- Forum: Wish List
- Topic: more succint, built-in way to dynamically remap keys via the Hotkey() function
- Replies: 1
- Views: 552
more succint, built-in way to dynamically remap keys via the Hotkey() function
Currently the Hotkey() function can be used to disable a remapping. Example from doc: Hotkey("*a", "Off") Hotkey("*a up", "Off") But in order to dynamically create a remapping, it's necessary to write (I'm assuming this is how it's done, correct me if i'm wrong): Hotkey("*b", (hk) => (SetKeyDelay(-1...
- 23 Aug 2023, 21:13
- Forum: Scripts and Functions (v2)
- Topic: Class_SQLiteDB v2.0.6 - 2023-11-28
- Replies: 55
- Views: 66889
Re: Class_SQLiteDB v2.0.2 - 2023-07-24
Thanks justme for porting this over!
The latest v2 alpha throws an error on this line, saying it cannot be unset
I changed it to
But I'm wondering if this is enough or if there's adjustment elsewhere that needs to be made.
The latest v2 alpha throws an error on this line, saying it cannot be unset
Code: Select all
Next(&Row?) => This.Step(&Row?)
Code: Select all
Next(&Row) => This.Step(&Row)
- 23 Aug 2023, 16:01
- Forum: AutoHotkey Development
- Topic: The meaningless "Invalid memory read/write"
- Replies: 14
- Views: 4046
Re: The meaningless "Invalid memory read/write"
I'm on version 2.0.5. and I still see this occasionally (from what I know is bad code convered from v1 that I haven't gotten round to fixing). I actually *thought* I had something reproducible a minute ago, because I was able to repeat it 4 times. But now it only happens like half of the time. This ...
- 21 Aug 2023, 05:58
- Forum: Scripts and Functions (v2)
- Topic: JSON library, write by cpp
- Replies: 47
- Views: 11483
Re: JSON library, write by cpp
Sounds great. Look forward to when it's ported over!thqby wrote: ↑21 Aug 2023, 03:38This library is taken from the JSON section of ahk_h, and the latest version of the source code already supports JSON5 and non object type literals.
https://github.com/thqby/AutoHotkey_H/blob/alpha/source/script_h.cpp#L2846
- 21 Aug 2023, 05:55
- Forum: Ask for Help (v2)
- Topic: [<=2.0.5 Bug:] An unexplainable crash
- Replies: 9
- Views: 1252
Re: [<=2.0.5 Bug:] An unexplainable crash
An object's reference count can't ever be zero, because that should mean the object no longer exists, in which case you can't read its reference count. AutoHotkey doesn't decrement the reference count below 1 when you Release, because it has to call __delete. __delete needs a reference to the objec...
- 21 Aug 2023, 02:46
- Forum: Scripts and Functions (v2)
- Topic: JSON library, write by cpp
- Replies: 47
- Views: 11483
Re: JSON library, write by cpp
Would it be possible to make JSON.parse(...) accept plain quoted JSON strings as arguments? Currently when e.g. using Webview2 to get the returned innerHTML of a DOM node, doing something like this is needed: wv2core.ExecuteScript("ele.innerHTML", WebView2.Handler(getInnerHTML)) getInnerHTML(handler...