Search found 299 matches

by pneumatic
31 Aug 2017, 01:36
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

just me wrote:As long as you don't show your code it's almost impossible to provide reliable alternative solutions.
If it works in the demo then it will work in my script.
by pneumatic
31 Aug 2017, 00:55
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

tbh I'm not really satisfied with any of the solutions, they are all very convoluted and I don't have a lot of confidence that they aren't going to cause bugs in my program. The interaction with controls has to be air tight. The ordering of events has to be guaranteed. Luckily I realised I can just ...
by pneumatic
30 Aug 2017, 22:35
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

Check out my posted example, seems relatively easy to manage. You'd get to keep all the different tasks in the same place, and it should work across different GUIs even. I think your implementation is reliable in that it will always keep the slider position and gsub in sync regardless of how fast o...
by pneumatic
30 Aug 2017, 10:34
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

Every time the slider's g-label is called If the reason is 4 or Normal ( Mouse release or at the end of any other reason is always a repeated normal ) it will run your update one last time, and soundplay. Otherwise it will watch the slider and update whenever it's value changes. Got it, thanks. I c...
by pneumatic
30 Aug 2017, 09:45
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

What was wrong with: You seem to have skipped right over our suggestions. I have trouble understanding whether your solution is suitable for my script as I need my sliders to fire immediately on every event and also on mouse release, and I couldn't figure out if yours does that, or what I would hav...
by pneumatic
30 Aug 2017, 09:05
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

Apparently OnMessage functions will interrupt everything including critical threads, so if the slider's subroutine should not be interrupted mid way through then there is no way of preventing that. I guess it could be handled by using a variable at the end of the sub to signify that the subroutine h...
by pneumatic
30 Aug 2017, 06:47
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

I think grabbing A_GuiControl on WM_LBUTTONUP() is just a fluke and in no way guarantees A_GuiControl will receive the correct value. i.e I see no reason why WM_LBUTTONUP() is guaranteed to be part of the thread that was launched by the control (which is required for A_GuiControl to receive the cont...
by pneumatic
29 Aug 2017, 08:52
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

I don't understand how AltSubmit specified for a Slider control is related to 'submitting every single variable in the entire GUI'. Nevermind I was remembering the wrong bit in the help file. My sliders make adjustments to an xgraph which the user needs to see in real time not just on release. I gu...
by pneumatic
29 Aug 2017, 08:01
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

just me wrote:For what reason do you use AltSubmit at all?
Because I don't need to be submitting every single variable in the entire GUI.
by pneumatic
29 Aug 2017, 06:03
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

Critical on the first line worked for me, are you sure you tried with it on the first line? Yes, on the first line of the subroutine, and then Critical, Off at the last line (if you are not doing critical , off at the end then yes it fixes the issue but the whole script becomes critical which is no...
by pneumatic
28 Aug 2017, 05:21
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

24 ms are a quite long time on a i7-4790k CPU. Yes, but remember ahk is single threaded and only uses about ~12.5% CPU max. If a game was CPU bound to 24ms (~40fps) that shouldn't affect reliability of controls. Would you please post the real code which produces the issue? There might be are other ...
by pneumatic
27 Aug 2017, 22:39
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

Seem to have an easy solution #Persistent #SingleInstance Force SetBatchLines , -1 OnMessage(0x202,"WM_LBUTTONUP") DllCall("QueryPerformanceCounter", "Int64*", CounterBefore) Sleep 1000 DllCall("QueryPerformanceCounter", "Int64*", CounterAfter) 1ms := (CounterAfter - CounterBefore) / 1000 Gui, New G...
by pneumatic
27 Aug 2017, 22:13
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Re: Slider control's A_GuiEvent = 4 is unreliable

This isn't an AHK bug, it's wrong usage! Unfortunately critical doesn't seem to be having any effect (it still misses the event) so I can't agree it's "wrong usage" if there is no "right way" of doing it. I guess it's just a limitation of ahk, which fair enough is not a bug* , but a pretty severe l...
by pneumatic
27 Aug 2017, 04:42
Forum: Ask For Help
Topic: Slider control's A_GuiEvent = 4 is unreliable
Replies: 34
Views: 5734

Slider control's A_GuiEvent = 4 is unreliable

If a Slider's subroutine takes a while to execute (eg. 100ms) due to it being a complex subroutine, or some other thread in the script interrupting it, A_GuiEvent 4 (the event which triggers on mouse release) becomes unreliable. I believe it's due to the mouse position getting ahead of the thumb pos...
by pneumatic
23 Aug 2017, 07:15
Forum: Bug Reports
Topic: StrSplit() returns an array of unexpected capacity
Replies: 34
Views: 7320

Re: StrSplit() returns an array of unexpected capacity

just me wrote: if it is causing 'bugs' in your scripts, you are definitely using it wrong.
Or is it StrSplit who is is doing it "wrong" by sneakily adding all this extra capacity to my array :think:
by pneumatic
22 Aug 2017, 20:19
Forum: Bug Reports
Topic: StrSplit() returns an array of unexpected capacity
Replies: 34
Views: 7320

Re: StrSplit() returns an array of unexpected capacity

Array := ["1","2","3","4","","","",""] explicitely defines 4 empty elements, 5 - 8. So Array.Length() returns 8. Huh that's weird, I tested it before I posted that message and could swear it was giving me length of 4, now it's not. Must have done something wrong in my test :) Anyway, I still think ...
by pneumatic
22 Aug 2017, 20:06
Forum: Bug Reports
Topic: Bug with replication of script when reload
Replies: 6
Views: 2219

Re: Bug with replication of script when reload

I had a similar issue. https://autohotkey.com/boards/viewtopic.php?f=5&t=34595 In my case it "could not close previous instance" because of Window's UAC/secpol which blocks programs from closing other programs if they have a lower integrity level. To do anything reliably in windows seems to require ...
by pneumatic
22 Aug 2017, 05:00
Forum: Bug Reports
Topic: StrSplit() returns an array of unexpected capacity
Replies: 34
Views: 7320

Re: StrSplit() returns an array of unexpected capacity

just me wrote:It doesn't create "empty elements"
If

Code: Select all

Array := ["1","2","3","4"]
Array.setCapacity(8)
is equivalent to

Code: Select all

Array := ["1","2","3","4","","","",""]
then increasing the capacity could be viewed as equivalent to creating "empty" elements.
by pneumatic
22 Aug 2017, 01:35
Forum: Bug Reports
Topic: StrSplit() returns an array of unexpected capacity
Replies: 34
Views: 7320

Re: StrSplit() returns an array of unexpected capacity

If the documentation says "this is when I'm going to create an element" I would expect that rule to be true of all elements, including empty ones. If you create a bunch of empty elements for me when you didn't say so and I wasn't expecting it, that could cause bugs in my program. And in fact it did;...
by pneumatic
21 Aug 2017, 21:15
Forum: Bug Reports
Topic: StrSplit() returns an array of unexpected capacity
Replies: 34
Views: 7320

Re: StrSplit() returns an array of unexpected capacity

There's no section in the documentation telling you that Array.GetCapacity() will always return the same value as Array.Length() for simple arrays, so it does not contradict 'documented behaviour'. The issue is with StrSplit not GetCapacity StrSplit() For example: "," would divide the string based ...

Go to advanced search