quote:
Originally posted by matty
There was a bug in the gdip class I wrote.
In the CaptureWindow_Fullscreen function the SystemArea.Top and SystemArea.Left are in the wrong order. Should be Left then Top not Top then Left.
Actually it's not it. It only fixes the extra black on the bottom (at least in my case). There is another issue when second monitor on left side: the virtual left corner is negative number (-1600 in my case). The problem is that GetSystemArea() function returns complete set of coordinates, including proper width and height:
-1600, 0, 3200, 1200
But, CaptureWindow() generates it's own width/height using formula WIDTH - LEFT: 3200 - (-1600) = 4800
Replacing
js code:
this.ImageWidth = rect.ReadDWORD(8) - rect.ReadDWORD(0);
this.ImageHeight = rect.ReadDWORD(12) - rect.ReadDWORD(4);
with something like this fixes that issue:
js code:
this.ImageWidth = bIsFullscreen && !bIsSelectedArea ? rect.ReadDWORD(8) : rect.ReadDWORD(8) - rect.ReadDWORD(0);
this.ImageHeight = bIsFullscreen && !bIsSelectedArea ? rect.ReadDWORD(12) : rect.ReadDWORD(12) - rect.ReadDWORD(4);
But the counter still being cut off because it's displaying on second monitor which is shifted a few pixels down relatively to first monitor.
The only solution I could figure out is to use in functions.js these settings:
js code:
case 0 : _win32.SetWindowPos(hWnd, _win32._const._HWND_TOPMOST, 0,0,iWidth, iHeight, 0); break;
case 1 : _win32.SetWindowPos(hWnd, _win32._const._HWND_TOPMOST, _win32.GetSystemMetrics(0) - iWidth, 0, iWidth, iHeight, 0); break;
case 2 : _win32.SetWindowPos(hWnd, _win32._const._HWND_TOPMOST, 0, _win32.GetSystemMetrics(1) - iHeight, iWidth, iHeight, 0); break;
case 3 : _win32.SetWindowPos(hWnd, _win32._const._HWND_TOPMOST, _win32.GetSystemMetrics(0) - iWidth, _win32.GetSystemMetrics(1) - iHeight, iWidth, iHeight, 0); break;
case 4 : _win32.SetWindowPos(hWnd, _win32._const._HWND_TOPMOST, (_win32.GetSystemMetrics(0) /2) - (iWidth/2), (_win32.GetSystemMetrics(1) /2) - (iHeight/2), iWidth, iHeight, 0); break;
This ensures the counter being displayed on first monitor..
quote:
Originally posted by matty
Hotkeys cannot be used if they are already registered. Therefore you wont be able to set an already in use hotkey in the script. Only way a collision could occur is if the script isn't running when you assign the same hotkey. At that point when we load up we will warn the user that the hotkey is in use.
They might not be able do two actions, however I can set them in hotkey settings:
And there is no warning of any kind.
A little bug, when pressed ESC during timer, it kills the timer with this error:
quote:
Error: unknown (code: -2147418113)
File: timer.js. Line: 16.
Function OnEvent_Timer returned an error. Code: -2147352567
After that delayed actions no longer working until script restart.
P.S.
Please add to hotkey action list delayed actions. It could be useful when you need capture a window with a context menu, or opened dropdown.