Search found 150 matches

by pneumatic
26 Aug 2018, 18:44
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 441
Views: 79168

Re: Suggestions on documentation improvements

So do you also conclude that 37 == 1 should be true? Obviously not :lol: So 1 and 0/"" aren't pointers to some underlying representation or boolean data structure of truth and falsity - they are themselves literal representations of truth and falsity. So comparisons between truth and fals...
by pneumatic
26 Aug 2018, 07:49
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 441
Views: 79168

Re: Suggestions on documentation improvements

It compares if the values are exactly the same. And "" is not 0. In practice you are right; ahk is comparing "" and 0. But the documentation implies that the comparison is not necessarily between "" and 0, because: 1. blank var "holds a false value". 2. the w...
by pneumatic
26 Aug 2018, 05:34
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 441
Views: 79168

Re: Suggestions on documentation improvements

The documentation says my var holds "a false value", so when comparing it to another false value (the word false) why shouldn't we expect the result to be true?
by pneumatic
25 Aug 2018, 21:51
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 441
Views: 79168

Re: Suggestions on documentation improvements

a variable can be used to hold a false value simply by making it blank or assigning 0 to it Let's test it... var := "" if (var = false) msgbox nope, this line won't occur because false is explicitly defined as a var containing 0 The words true and false are built-in variables containing 1...
by pneumatic
24 Mar 2018, 12:23
Forum: Ask For Help
Topic: How to exit script gracefully Topic is solved
Replies: 2
Views: 159

How to exit script gracefully Topic is solved

Hello In my script I'm using OnExit, Quit to call my Quit subroutine which then eventually calls ExitApp. My concern is that Quit might interrupt some other thread that was doing something important like writing a file, and interrupted it half way through, leaving those files in an inconsistent stat...
by pneumatic
24 Mar 2018, 11:55
Forum: Bug Reports
Topic: Adding button removes slider border
Replies: 0
Views: 207

Adding button removes slider border

Not sure if this is a bug/feature of AHK or Windows, but it's unexpected behaviour. Gui , New , +hwndHGUI Gui , Add , Text , vText1, Slider1 Gui , Add , Slider, Buddy1Text1 x50 y10 w250 ;Gui , Add , Button , x140 y60 w60 h23 , Button Gui , Show , w320 h100 return Adding a button to the GUI causes th...
by pneumatic
23 Mar 2018, 12:29
Forum: Scripts and Functions
Topic: Set laptop brightness & show Win 10's native OSD
Replies: 10
Views: 2582

Re: Set laptop brightness & show Win 10's native OSD

Thank you qwerty12 for taking the time to make this class. I would like to add a couple of extra conditions to it: 1. Detect if the user's system supports this method of brightness control in the first place, and if not, do nothing. Should I simply modify line 48 as follows? if (jump && Brig...
by pneumatic
08 Mar 2018, 21:32
Forum: Bug Reports
Topic: WinGetPos gives on some win bad values
Replies: 1
Views: 230

Re: WinGetPos gives on some win bad values

Try using a different WinTitle ( ahk_id vs ahk_pid vs ahk_exe vs Title ). Sometimes they will give a different value because a different windows API function is being used to retrieve it, and the windows API is very difficult and convoluted to know under what circumstances exactly which values will ...
by pneumatic
07 Mar 2018, 17:19
Forum: Ask For Help
Topic: Checked groupbox
Replies: 8
Views: 239

Re: Checked groupbox

Thanks for the solutions. My main concern wasn't actually with the management of child controls (I was already doing that manually in an unsophisticated way) but rather to ensure the checkbox gets drawn on top of the groupbox. It seems the basic rule is that as long as the checkbox is added after th...
by pneumatic
07 Mar 2018, 05:02
Forum: Ask For Help
Topic: Checked groupbox
Replies: 8
Views: 239

Checked groupbox

Hi Is it possible to achieve a checked groupbox like this http://www.csharphelper.com/howto_check_groupbox.png The article where this image is from mentions the following technique: 1. check whether the CheckBox is inside the GroupBox and, if it is, move it into the GroupBox‘s parent 2. move the Che...
by pneumatic
06 Mar 2018, 19:20
Forum: Scripts and Functions
Topic: Masonjar13's Library List
Replies: 31
Views: 7381

Re: Masonjar13's Library List

Hi Masonjar Came across a post of yours here regarding animated cursors not being restored after hiding them https://autohotkey.com/board/topic/5727-hiding-the-mouse-cursor/page-2#entry654705 Not sure if you had seen the fix, and I couldn't find it in your library, but it seems the animations can be...
by pneumatic
02 Mar 2018, 18:12
Forum: Bug Reports
Topic: Gui Option parameter invalid
Replies: 3
Views: 422

Gui Option parameter invalid

Hello, just wondering if this is a bug. Option1 := "" Option2 := "+AlwaysOnTop" /* Doesn't work Gui , New Gui , %Option1% %Option2% */ /* Works Gui , MyGui: New Gui , MyGui: %Option1% %Option2% */ /* Also works Gui , New , %Option1% %Option2% */ Gui , Show , Center w320 h240 retu...
by pneumatic
23 Feb 2018, 04:46
Forum: Ask For Help
Topic: Detecting window styles with bitwise-and Topic is solved
Replies: 10
Views: 268

Re: Detecting window styles with bitwise-and Topic is solved

But it's funny how ahk still does the right side even when it's short circuited and has no need to (besides being convenient). Ugh, this is wrong. It will only do the right side if the left side was true. In this case , vWinStyle & 0xC00000 evaluates to true if vWinStyle's 23rd or 24th bit is a...
by pneumatic
23 Feb 2018, 02:52
Forum: Ask For Help
Topic: Detecting window styles with bitwise-and Topic is solved
Replies: 10
Views: 268

Re: Detecting window styles with bitwise-and Topic is solved

Ohhh I probably could have figured that out myself if there was brackets around it :oops: (vWinStyle & 0xC00000 = 0xC00000) && (vOutput .= "WS_CAPTION`r`n") Because I thought it was being evaluated like this (((vWinStyle & 0xC00000) = 0xC00000) && vOutput) .= "...
by pneumatic
23 Feb 2018, 02:17
Forum: Ask For Help
Topic: Detecting window styles with bitwise-and Topic is solved
Replies: 10
Views: 268

Re: Detecting window styles with bitwise-and Topic is solved

So in v2 they changed && from logical-and to a ternary operator? Ok, but I still don't understand the expression. I know it's nice to do lots of things in one line but it's not going to be readable to the lay ahk user such as myself :lol:
by pneumatic
23 Feb 2018, 01:22
Forum: Ask For Help
Topic: Detecting window styles with bitwise-and Topic is solved
Replies: 10
Views: 268

Re: Detecting window styles with bitwise-and Topic is solved

jeeswg wrote:

Code: [Select all]GeSHi © Codebox Plus

(vWinStyle & 0xC00000 = 0xC00000) && vOutput .= "WS_CAPTION`r`n"


What in tarnation does this mean? Left side is false cause vOutput is blank, then concatenate false with a string? Please explain.
by pneumatic
22 Feb 2018, 12:21
Forum: Ask For Help
Topic: Detecting window styles with bitwise-and Topic is solved
Replies: 10
Views: 268

Re: Detecting window styles with bitwise-and Topic is solved

Converting the styles to binary, it seems WS_DLGFRAME is encoded on the 23rd bit and WS_BORDER on the 24th bit? This seems to indicate we would need to do a check for each style?

Code: [Select all]GeSHi © Codebox Plus

If (StyleToCheck & 0x800000) and (StyleToCheck & 0x400000)
msgbox The style is 0xC00000
by pneumatic
22 Feb 2018, 12:02
Forum: Ask For Help
Topic: Detecting window styles with bitwise-and Topic is solved
Replies: 10
Views: 268

Detecting window styles with bitwise-and Topic is solved

Hello I was wondering how it is that bitwise-and is able to detect combinations of window styles. For example the style 0xC00000 (WS_CAPTION) is derived from the addition of 0x800000 (WS_BORDER) and 0x400000 (WS_DLGFRAME) and the documentation seems to suggest it could be detected by: If (StyleToChe...
by pneumatic
22 Feb 2018, 05:15
Forum: Bug Reports
Topic: Local and subroutines inside functions
Replies: 20
Views: 1056

Re: Local and subroutines inside functions

Thanks. Not sure how I missed that bit lexikos :facepalm: This is not an exception to Helgef's statement. It is in fact possible for a Critical thread to be interrupted Yes, but those are special emergency exceptions to Critical. I was just talking in the general sense that a Critical thread is gene...
by pneumatic
17 Feb 2018, 01:08
Forum: Bug Reports
Topic: Local and subroutines inside functions
Replies: 20
Views: 1056

Re: Local and subroutines inside functions

The same would apply to functions without subroutines inside them, wouldn't it? eg. if a function gets interrupted by another call to itself , its local variables would still be in the previous state (since return was never reached) which could screw up what that function is trying to do. So the fun...

Go to advanced search