Search found 122 matches

by Scoox
04 Dec 2014, 19:46
Forum: Ask For Help
Topic: Checkbox / Radio buttons without caption?
Replies: 6
Views: 1808

Checkbox / Radio buttons without caption?

Is it possible to create a GUI with checkboxes or radio buttons that don't have any captions? This is useful for example if you want to use a picture caption instead of text. I tried using an empty string as a caption but I still get a small dotted rectangle to the right of the checkbox when I selec...
by Scoox
30 Nov 2014, 04:45
Forum: Ask For Help
Topic: Operator weirdness
Replies: 12
Views: 2293

Re: Operator weirdness

just me wrote: ..., and obviously that's true.
[/quote]

So in this example why does the first MsgBox display "Hello0" ? (at least on my system it does!)

Code: Select all

MsgBox % "Hello" + 0
MsgBox % (Data := "Hello") + 0
MsgBox % ("Hello") + 0
by Scoox
30 Nov 2014, 04:09
Forum: Ask For Help
Topic: Operator weirdness
Replies: 12
Views: 2293

Re: Operator weirdness

Just me, what do mean?
by Scoox
30 Nov 2014, 04:05
Forum: Ask For Help
Topic: Operator weirdness
Replies: 12
Views: 2293

Re: Operator weirdness

Well, my results so far that, for the expression "" < 0 1) AHK assumes both sides of the comparison are strings because at least one string is involved 2) Because the number used to represent ASCII '0' is greater than whatever is used to represent an empty string, it follows that 0 is greater than "...
by Scoox
30 Nov 2014, 00:51
Forum: Ask For Help
Topic: Operator weirdness
Replies: 12
Views: 2293

Re: Operator weirdness

I just relised that when a string is involved in the comparison, AHK treats the number as a string too, which explains the behaviour seen in the second script.

However, I am still unable to understand why the first script works the way it does.
by Scoox
29 Nov 2014, 22:36
Forum: Ask For Help
Topic: Operator weirdness
Replies: 12
Views: 2293

Re: Operator weirdness

Just in case anybody wonders, I was trying to do some simple validation using similar code:

Code: Select all

If ((Data + 0) < 0)
    Data := 0
I assumed adding 0 to a string would result in an empty string and then that the empty string would be considered less than 0, but obviously it's not the case.
by Scoox
29 Nov 2014, 22:24
Forum: Ask For Help
Topic: Operator weirdness
Replies: 12
Views: 2293

Operator weirdness

1) Why do the following two scripts produce different results and why does using brackets make a difference? The second script does the same as the first one, but using a function. #NoEnv #SingleInstance Force Text .= "(" """Bob""" ") + 0 =`t" Text .= ("Bob") + 0 Text .= "`n(" """Bob""" ") + 0 =`t"...
by Scoox
29 Nov 2014, 05:00
Forum: Ask For Help
Topic: Subtracting/comparing two objects?
Replies: 12
Views: 2622

Re: Subtracting/comparing two objects?

Thanks for the info and ideas guys!
by Scoox
28 Nov 2014, 04:47
Forum: Ask For Help
Topic: Subtracting/comparing two objects?
Replies: 12
Views: 2622

Re: Subtracting/comparing two objects?

The problem I am having is this: If my array contains items A, B, C, D, if the current enumerator item is B and I delete B, the next item is no longer C but D, because C no occupies the position of B.
by Scoox
28 Nov 2014, 04:18
Forum: Ask For Help
Topic: Subtracting/comparing two objects?
Replies: 12
Views: 2622

Re: Subtracting/comparing two objects?

Actually the above code does not work ... crap. If both arrays contain the same data, the results are incorrect. Gonna have to recheck that...
by Scoox
28 Nov 2014, 03:25
Forum: Ask For Help
Topic: Subtracting/comparing two objects?
Replies: 12
Views: 2622

Subtracting/comparing two objects?

I have two arrays Array_A and Array_B. I need a function to generate three arrays, one containing items that only appear in Array_A, one containing items that only appear in Array_B and one containing items that are common to both Array_A and Array_B. After a bit of thinking I concluded that the qui...
by Scoox
27 Nov 2014, 10:43
Forum: Ask For Help
Topic: Clearing object properties, iss this a bug or a feature?
Replies: 6
Views: 1263

Re: Clearing object properties, iss this a bug or a feature?

Thaks for your thorough analysis trismarck . Another trick, inspired by your code above, is to assign an uninitialized variable to the object property: MyObj := {} MyObj.Bob := "hello world" MyObj.Bob := Null ;Where Null is an uninitialized variable MsgBox % MyObj.Bob ; MsgBox is empty just me , I a...
by Scoox
27 Nov 2014, 07:41
Forum: Ask For Help
Topic: Clearing object properties, iss this a bug or a feature?
Replies: 6
Views: 1263

Re: Clearing object properties, iss this a bug or a feature?

Gotcha, thanks a lot. I'll just have to remember this is the way it works.
by Scoox
27 Nov 2014, 05:34
Forum: Ask For Help
Topic: Clearing object properties, iss this a bug or a feature?
Replies: 6
Views: 1263

Clearing object properties, iss this a bug or a feature?

Why is it that I can clear a variable like this: Jane := "Hello" MsgBox % Jane ;MsgBox displays Hello Jane := MsgBox % Jane ;an empty MsgBox is displayed But the same approach does not work with object properties: MyObj := {} MyObj.Bob := "Hello" MsgBox % MyObj.Bob ;MsgBox displays Hello MyObj.Bob :...
by Scoox
24 Nov 2014, 23:28
Forum: Scripts and Functions
Topic: Simple method of user input validation as-you-type
Replies: 0
Views: 1445

Simple method of user input validation as-you-type

Today I was looking for a way to validate Edit control input. The traditional approach is to pop up a small window with an edit box where the user types in a number or some text, then clicks OK. The OK button becomes disabled if the input is invalid, until correct input is entered. This approach is ...
by Scoox
22 Nov 2014, 08:39
Forum: Ask For Help
Topic: ListView filcker problem
Replies: 4
Views: 1413

Re: ListView filcker problem

The code you posted in the last post seems to work well, so I was probably doing something wrong. I will have a look at it in detail, thanks a lot.
by Scoox
22 Nov 2014, 04:55
Forum: Ask For Help
Topic: ListView filcker problem
Replies: 4
Views: 1413

Re: ListView filcker problem

You might try either to add the LVS_EX_DOUBLEBUFFER extended list view style ( +LV0x00010000 ) or use GuiControl, -Redraw ... +Redraw . Thank you. Just tested this but the first proposed solution has a detrimental effect on execution times, and the second causes a different type of flicker. I wonde...
by Scoox
22 Nov 2014, 03:28
Forum: Ask For Help
Topic: ListView filcker problem
Replies: 4
Views: 1413

ListView filcker problem

Please run the following script. I get very bad flicker whenever adding or deleting rows results in the the appearance/disappearance of scrollbars. https://dl.dropboxusercontent.com/u/98636804/Forums/AHKscript/2014-11-22-163248%20LV%20flicker.gif Notes: All six listviews have a height of 30 rows. In...
by Scoox
18 Nov 2014, 22:16
Forum: Ask For Help
Topic: Opposite of Gui, Submit?
Replies: 4
Views: 1786

Re: Opposite of Gui, Submit?

Thanks. So basically I need to manually create an object containing the variable names. Another solution I thougth of was using Loop, Parse : Loop, Parase, EditVar|TextVar|PicleVar|ChickenVar, | GuiControl,, %A_LoopField%, % %A_LoopField% But now I like your solution better because using arrays is p...
by Scoox
18 Nov 2014, 18:55
Forum: Ask For Help
Topic: Compile or not compile?
Replies: 2
Views: 4564

Re: Compile or not compile?

I only compile if I am going to distribute to users who are not familiar with AHK. As far as I know when you compile a script all you are doing is package the script, a bunch of icons and a copy of autohotkey.exe into a single file for convenient distribution, so I assume any performance differences...

Go to advanced search