Search found 122 matches

by Scoox
18 Nov 2014, 18:31
Forum: Ask For Help
Topic: Opposite of Gui, Submit?
Replies: 4
Views: 1786

Opposite of Gui, Submit?

Gui, Submit 'writes' the contents of all controls in a GUI to their respective associated variables: Gui, Submit The single line of code above is all that's needed, irrespective of the number of controls. What I would like to do is the opposite, that is, to update all the controls in one go en mass...
by Scoox
18 Nov 2014, 03:13
Forum: Ask For Help
Topic: Radio buttons... bug or feature?
Replies: 1
Views: 809

Radio buttons... bug or feature?

The help file says: The radio button's associated output variable (if any) receives the number 1 for "on" and 0 for "off". However, if only one button in a radio group has a variable, that variable will instead receive the number of the currently selected button : 1 is the first radio button (accord...
by Scoox
13 Nov 2014, 00:34
Forum: Scripts and Functions
Topic: XGraph v1.1.1.0 : Real time data plotting.
Replies: 27
Views: 27759

Re: XGraph v1.1.1.0 : Real time data plotting.

Looks awesome, thanks for sharing!
by Scoox
09 Nov 2014, 20:25
Forum: Ask For Help
Topic: Activate all GUIs when main GUI activated?
Replies: 2
Views: 945

Re: Activate all GUIs when main GUI activated?

I think I figured it out...

Code: Select all

ShowGui_MidiEventLog(Parent)
{
	Gui, MidiEventLog: Default
	Gui, +Owner%Parent%
	Gui, Show, AutoSize, MIDI Event Log
}
But the name of the parent GUI must be passed to this function. I wonder if there is a way to do this without relying on GUI names.
by Scoox
09 Nov 2014, 19:42
Forum: Ask For Help
Topic: Activate all GUIs when main GUI activated?
Replies: 2
Views: 945

Activate all GUIs when main GUI activated?

Hello fellow AHKians, I am writing a script that has three GUIs: 1) Main GUI, which has a taskbar button 2) Two child GUIs that don't have a taskbar button. The child GUIs are not modal, which means I can opearte all three GUIs at the same time. What I want is for all three GUIs to get activated whe...
by Scoox
02 Nov 2014, 22:11
Forum: Ask For Help
Topic: Execution speed: GoTo or If-Else for time-critical code?
Replies: 2
Views: 1137

Re: Execution speed: GoTo or If-Else for time-critical code?

Thanks Lexikos, really useful info there. If-Else would be easier to maintain, so I'll do two versions and benchmark them as you suggested. Will post my findings here.
by Scoox
02 Nov 2014, 20:39
Forum: Ask For Help
Topic: Execution speed: GoTo or If-Else for time-critical code?
Replies: 2
Views: 1137

Execution speed: GoTo or If-Else for time-critical code?

I am writing a program that takes input from a MIDI controller. The MIDI controller is a Novation Launchpad S, basically a device with loads of pretty backlit buttons. Each button sends a different MIDI message, each message is a three-byte number. I want my script to do different things depending o...
by Scoox
23 Oct 2014, 05:45
Forum: Ask For Help
Topic: WM_MOUSEMOVE message reporting wrong coordinates
Replies: 14
Views: 3206

Re: WM_MOUSEMOVE message reporting wrong coordinates

Thanks a lot, I will try that later
by Scoox
23 Oct 2014, 04:34
Forum: Ask For Help
Topic: WM_MOUSEMOVE message reporting wrong coordinates
Replies: 14
Views: 3206

Re: WM_MOUSEMOVE message reporting wrong coordinates

PS: Using OnMessage(0x200, "MouseMove") works but if the mouse moves off the GUI very fast the highlighting remains visible some times, as though the WM_MOUSEMOVE message had not been captured in time, and once the mouse is outside the GUI the WM_MOUSEMOVE message cannot be detected. The reason for ...
by Scoox
23 Oct 2014, 04:18
Forum: Ask For Help
Topic: WM_MOUSEMOVE message reporting wrong coordinates
Replies: 14
Views: 3206

Re: WM_MOUSEMOVE message reporting wrong coordinates

I have a GUI with a picture control that looks like a table/grid, a bit like a chess board. - I want whichever square of the grid is under the mouse pointer to be highlighted in red. For the highlighting I am just using a small picture control (the red square) which moves around following the mouse....
by Scoox
23 Oct 2014, 03:59
Forum: Ask For Help
Topic: WM_MOUSEMOVE message reporting wrong coordinates
Replies: 14
Views: 3206

Re: WM_MOUSEMOVE message reporting wrong coordinates

I tried a different approach based on a solution which I found elsewhere on the forum, unfortunately I don't have the link handy. For some reason, MouseGetPos reports incorrect coordinates when using this code, any ideas why this might be happening? Run the code and move the mouse pointer by holding...
by Scoox
22 Oct 2014, 05:06
Forum: Ask For Help
Topic: WM_MOUSEMOVE message reporting wrong coordinates
Replies: 14
Views: 3206

Re: WM_MOUSEMOVE message reporting wrong coordinates

My point is, if Microsoft state WM_MOUSEMOVE already retrieves the coordinates relative to the upper-left corner of the GUI, why should I need to retrieve them again using MouseGetPos?
by Scoox
22 Oct 2014, 04:31
Forum: Ask For Help
Topic: WM_MOUSEMOVE message reporting wrong coordinates
Replies: 14
Views: 3206

Re: WM_MOUSEMOVE message reporting wrong coordinates

Thanks, that works, but I am going to have to look at it carefully. Isn't there an easier way to do this? I mean, this seems too complicated :(
by Scoox
22 Oct 2014, 04:02
Forum: Ask For Help
Topic: WM_MOUSEMOVE message reporting wrong coordinates
Replies: 14
Views: 3206

Re: WM_MOUSEMOVE message reporting wrong coordinates

Thanks just me, actually I am trying to achieve the opposite, I'd like to get the coordinates relative to the upper-left corner of the GUI, not the control, in other words, I favour the way it works by default for Picture controls. Is this possible?
by Scoox
22 Oct 2014, 02:53
Forum: Ask For Help
Topic: WM_MOUSEMOVE message reporting wrong coordinates
Replies: 14
Views: 3206

WM_MOUSEMOVE message reporting wrong coordinates

I have another silly problem with WM_MOUSEMOVE. According to this : lParam The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area. The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to ...
by Scoox
22 Oct 2014, 00:15
Forum: Ask For Help
Topic: Run code only when mouse moves over GUI
Replies: 7
Views: 1959

Re: Run code only when mouse moves over GUI

Nice! I have just replaced the tooltip with a Text control to display A_TickCount and it works as expected, which is great because I don't really need the tooltip in my final script. EDIT: The problem came back again but the code hadn't changed, so I figured the WM_MOUSEMOVE must be being sent by an...
by Scoox
21 Oct 2014, 20:43
Forum: Ask For Help
Topic: Run code only when mouse moves over GUI
Replies: 7
Views: 1959

Re: Run code only when mouse moves over GUI

Just tested on another machine with a fresh OS install (no drivers installed/updated yet) and I am getting the same. Lexikos, have you guys tested the code in the first post? I've seen other reports of this problem elsewhere: http://stackoverflow.com/questions/13630503/what-did-i-miss-about-wm-mouse...
by Scoox
21 Oct 2014, 19:41
Forum: Ask For Help
Topic: Run code only when mouse moves over GUI
Replies: 7
Views: 1959

Re: Run code only when mouse moves over GUI

The function is called whenever a WM_MOUSEMOVE message is received. WM_MOUSEMOVE is only sent to the window when the mouse moves, hence the name. Your original code does not update the tick count while the mouse is stationary on my system. If it does on your system, I'd guess that some other softwa...
by Scoox
21 Oct 2014, 07:44
Forum: Ask For Help
Topic: Run code only when mouse moves over GUI
Replies: 7
Views: 1959

Re: Run code only when mouse moves over GUI

your script does just about what you say you need. here i've put in a coords check for the tooltip to desplay #NoEnv #SingleInstance Force Critical OnMessage(0x200, "onMouseMove") Gui, Show, w300 h300 Return GuiClose: ExitApp onMouseMove(wParam, lParam, msg, hwnd) { static x := lParam & 0xFFFF y :=...
by Scoox
21 Oct 2014, 05:56
Forum: Ask For Help
Topic: Run code only when mouse moves over GUI
Replies: 7
Views: 1959

Run code only when mouse moves over GUI

I am working on a GUI and I want a function to be called whenever the mouse moves over the GUI. I've tried the following code, but the function MouseMove() is invoked even when the mouse is not moving. Is it possible to achieve this using OnMessage() ? Thanks #NoEnv #SingleInstance Force Critical On...

Go to advanced search