Search found 122 matches

by Scoox
25 Jul 2015, 07:24
Forum: Ask For Help
Topic: Race conditon with Edit control (with sample script)
Replies: 4
Views: 1415

Race conditon with Edit control (with sample script)

I am writing a simple script to carry out simple unit conversions. For example, to convert between inches and centimetres. The idea is that if I type in the "Centimetres" edit box, the "Inches" edit box gets updated accordingly, but also the other way round. In other words, it's bi-directional. The ...
by Scoox
15 Jul 2015, 10:48
Forum: Ask For Help
Topic: Uninitialized array element behaving different from uninitialized variable?
Replies: 4
Views: 1212

Re: Uninitialized array element behaving different from uninitialized variable?

Oh, crap, I somehow managed to copy-paste the wrong lines, must have been very late at night. This is what I was supposed to have posted ("Bob" part):

Code: Select all

Bob := Object()
Bob[1]++
MsgBox % Bob[1] ;displays "" WHY?
But just me's reply answer's my question, thanks!
by Scoox
13 Jul 2015, 04:51
Forum: Ask For Help
Topic: Uninitialized array element behaving different from uninitialized variable?
Replies: 4
Views: 1212

Uninitialized array element behaving different from uninitialized variable?

I don't understand why in the displayed values of Tom, Bob and Jon are not the same, is this a bug or a feature?

Code: Select all

#NoEnv
#SingleInstance Force

Tom++
MsgBox % Tom ;Displays "1"

Bob := Object()
MsgBox % Bob ;displays "" WHY?

Jon := Object()
Jon[1] := 0
jon[1]++
Msgbox % Jon[1] ;displays "1"
by Scoox
20 Mar 2015, 07:50
Forum: Ask For Help
Topic: Displaying only part of an image in picture control?
Replies: 2
Views: 1137

Re: Displaying only part of an image in picture control?

Sorry for the late reply. Thanks a lot for your reply TLM, your code works but the icons load quite slowly indeed.

Later I found this other thread which uses GDI+ to show parts of an image. I hope in the future AHK has native functions to load resources into memory
by Scoox
13 Mar 2015, 20:19
Forum: Ask For Help
Topic: Displaying only part of an image in picture control?
Replies: 2
Views: 1137

Displaying only part of an image in picture control?

I wan to display only a part of an image in a picture control, for example:

Image

Is this possible or will I have to use individual files for each image? Thanks
by Scoox
09 Mar 2015, 10:35
Forum: Ask For Help
Topic: Stacked picture control visibility (send to back/front)
Replies: 5
Views: 1830

Stacked picture control visibility (send to back/front)

I am making a GUI where several picture controls are positioned on top of each other. Is there a way to "send to back" and "bring to front" controls? In the following example, the black and white grid background was added to the GUI first, then the red 3x3 square, and finally the small blue squares....
by Scoox
04 Feb 2015, 22:08
Forum: Bug Reports
Topic: Hotkeys not working with #InputLevel
Replies: 4
Views: 2393

Re: Hotkeys not working with #InputLevel

Oops! I didn't type out the complete hotstring. But yeah, that's not the issue here. Thanx
by Scoox
04 Feb 2015, 21:20
Forum: Bug Reports
Topic: Hotkeys not working with #InputLevel
Replies: 4
Views: 2393

Hotkeys not working with #InputLevel

I have no idea why the following code doesn't work. Pressing 'i' or 'o' types nothing. If I comment out #InputLevel 1, 'i' and 'o' work again but the hotstring doesn't. I am trying to remap some keys and still be able to trigger hotstrings with them, what am I doing wrong? #NoEnv #SingleInstance For...
by Scoox
02 Feb 2015, 05:27
Forum: Ask For Help
Topic: Can remap SC029 but not SC079 ??
Replies: 1
Views: 1179

Can remap SC029 but not SC079 ??

I just got a Japanese Happy Hacking Keyboard which has a number of extra thumb keys, and I want to remap those keys. I obtained the SC key codes by looking at the key history, and I was able to remap some of the special keys without issues but others throw an error message. For example: SC029::RCtrl...
by Scoox
17 Dec 2014, 01:29
Forum: Ask For Help
Topic: Control associated variable scope?
Replies: 5
Views: 1575

Re: Control associated variable scope?

But I am really curious, when would it be useful to declare a control associated variable as static? Basically, the same reason you would declare any variable as static: If you want the variable to only be visible within the function, but still want it to "remember" its value from one function call...
by Scoox
16 Dec 2014, 23:16
Forum: Ask For Help
Topic: Control associated variable scope?
Replies: 5
Views: 1575

Re: Control associated variable scope?

Gotcha! It's the variable name, not the variable itself.

But I am really curious, when would it be useful to declare a control associated variable as static?
by Scoox
16 Dec 2014, 20:58
Forum: Ask For Help
Topic: Control associated variable scope?
Replies: 5
Views: 1575

Control associated variable scope?

Loosely speaking, I have a function that adds a small picture control (a small red square) to a GUI when the user clicks, as shown below. I refer to the red squares as "markers". Although the maximum number of markers is finite, it is a large number, so to speed up script start-up I decided it would...
by Scoox
16 Dec 2014, 20:10
Forum: Ask For Help
Topic: GuiControl, MoveFast command?
Replies: 6
Views: 1650

Re: GuiControl, MoveFast command?

Thank you for taking the time to reply, Lexikos. It could be specific to my system. On my system it works very well on some of my scripts and not so well (but still very well) on others. I have a large GUI, taking up about 70% of my screen real estate, and in that one I could see some artefacts, alt...
by Scoox
10 Dec 2014, 08:48
Forum: Ask For Help
Topic: GuiControl, MoveFast command?
Replies: 6
Views: 1650

Re: GuiControl, MoveFast command?

GuiControl, Move already provides fairly fast redrawing and I my computer is not too bad, definitely not top-of-the-range though, and yet I have seen many apps with mouse-tracking effects that don't have any flicker at all, on the same system. I suppose moving a control around the GUI was never mean...
by Scoox
09 Dec 2014, 11:07
Forum: Ask For Help
Topic: GuiControl, MoveFast command?
Replies: 6
Views: 1650

Re: GuiControl, MoveFast command?

I think that comment might be obsolete. The documentation implies that Move does not do that - that's what MoveDraw is for. GuiControl, MoveDraw: Same as "Move" (above) except that it also repaints the region of the GUI window occupied by the control . Although this may cause an unwanted flickering...
by Scoox
09 Dec 2014, 00:54
Forum: Ask For Help
Topic: GuiControl, MoveFast command?
Replies: 6
Views: 1650

GuiControl, MoveFast command?

Hi everyone, I am making a GUI that has large background image and a small image hovering over the background image that follows the mouse. When the small image moves, repainting of the background image is slow and you can see a "void" where the small image used to be for a short period of time, whi...
by Scoox
05 Dec 2014, 04:11
Forum: Ask For Help
Topic: Checkbox / Radio buttons without caption?
Replies: 6
Views: 1960

Re: Checkbox / Radio buttons without caption?

Wow that was neat! Thanks just me:)
by Scoox
05 Dec 2014, 00:38
Forum: Scripts and Functions
Topic: Maze game prank script
Replies: 2
Views: 2026

Re: Maze game prank script

Writing this also made me realise that transparent moving controls in AHK are not possible (hence the crappy square moving piece instead of a Hello Kitty icon with a transparent background).
by Scoox
05 Dec 2014, 00:33
Forum: Scripts and Functions
Topic: Maze game prank script
Replies: 2
Views: 2026

Maze game prank script

I knocked this together a while ago for testing mouse movement detection and, as a prank lover, it's proved to be a lot of fun when friends come round my place. You know what it does... >> Download package containing code and resources << https://dl.dropboxusercontent.com/u/98636804/Forums/AHKscript...
by Scoox
05 Dec 2014, 00:19
Forum: Ask For Help
Topic: Checkbox / Radio buttons without caption?
Replies: 6
Views: 1960

Re: Checkbox / Radio buttons without caption?

Yeah i thought about that, I thought there was an option or something to not display the caption. So you are saying it is not possible, right?

Go to advanced search