 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
tic
Joined: 22 Apr 2007 Posts: 1336
|
Posted: Mon Apr 23, 2007 6:20 pm Post subject: |
|
|
| actually i dont think it needs antialiasing. i think its just the shadow of the window when the elipse is over it that is making the bottom right of the elipse look jagged, but i dont know the exstyle to remove the shadow |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1281
|
Posted: Mon Apr 23, 2007 10:47 pm Post subject: |
|
|
| tic wrote: | | actually i dont think it needs antialiasing. i think its just the shadow of the window when the elipse is over it that is making the bottom right of the elipse look jagged, but i dont know the exstyle to remove the shadow |
It's a class-style, so you may use SetClassLong.
In this case, however, it'd better be done before the tooltip window shows.
So, the simplest solution could be just using WinClose:
| Code: | | WinClose, ahk_class SysShadow |
I added this code to the magnifier script, BTW. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1281
|
Posted: Mon Apr 23, 2007 10:54 pm Post subject: |
|
|
| Laszlo wrote: | | I would use the color picker script the following way: |
Thanks for the suggestions. Let me think about them a while. |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1336
|
Posted: Mon Apr 23, 2007 11:23 pm Post subject: |
|
|
| Quote: | | I added this code to the magnifier script, BTW. |
Yes, sorry, I can see that now. I've been trying myself, but my biggest problem is that I can't seem to understand how that whole stretchblt thing works. I couldnt find where you allowed hidden windows to be shown in the magnifier script you made.
| Code: | #NoEnv
#SingleInstance, Force
SetWinDelay, 1
nZ := 2.6 ; Zoom Factor
nR := 1 ; Rectangle of the Zoomer
CoordMode, Mouse
CoordMode, Pixel
ToolTip, %A_Space%
WinClose, ahk_class SysShadow
WinGet, hWnd, ID, ahk_class tooltips_class32
WinSet, ExStyle, +0x00000020, ahk_id %hWnd%
hDC_SC := DllCall("GetDC", "Uint", 0)
hDC_TT := DllCall("GetDC", "Uint", hWnd)
Loop
{
MouseGetPos, xmouse, ymouse
DllCall("StretchBlt", "Uint", hDC_TT, "int", 0, "int", 0, "int", nR*2, "int", nR*2, "Uint", hDC_SC, "int", xmouse-nR//nZ, "int", ymouse-nR//nZ, "int", nR//nZ*2, "int", nR//nZ*2, "Uint", 0x00CC0020)
WinMove, ahk_id %hWnd%,, xmouse-nR, ymouse-nR, nR*2, nR*2
WinSet, AlwaysOnTop, On, ahk_id %hWnd%
}
F6::
Exit:
DllCall("ReleaseDC", "Uint", 0, "Uint", hDC_SC)
DllCall("ReleaseDC", "Uint", hWnd, "Uint", hDC_TT)
ExitApp
F12::
If nR < 300
{
nR += 35
}
return
F11::
If nR > 1
{
nR -= 35
}
return |
All i need this to do extra is show hidden windows (like your magnifier you made does) and disappear, rather than become 1 pixel when minimized the most, and would be grateful if you could help.
Where can I read about how to use Stretchblt or bitblt in ahk? Thank you for your continued help and making such great scripts |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1281
|
Posted: Tue Apr 24, 2007 8:45 am Post subject: |
|
|
| Laszlo wrote: | | I would use the color picker script the following way: |
I updated the script.
Now can launch multiple instances from the same script. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1281
|
Posted: Tue Apr 24, 2007 8:49 am Post subject: |
|
|
| tic wrote: | | Yes, sorry, I can see that now. |
Please don't. I updated the script after reading your post.
| Quote: | | All i need this to do extra is show hidden windows (like your magnifier you made does) and disappear, rather than become 1 pixel when minimized the most, and would be grateful if you could help. |
I don't think I understood you here. There is no hidden window in the script.
Would you be more specific about what you have in mind?
| Quote: | | Where can I read about how to use Stretchblt or bitblt in ahk? |
They are in MSDN:
http://msdn2.microsoft.com/en-us/library/ms532278.aspx
http://msdn2.microsoft.com/en-us/library/ms532355.aspx |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1336
|
Posted: Tue Apr 24, 2007 3:06 pm Post subject: |
|
|
| Quote: | | Please don't. I updated the script after reading your post. |
Oh! lol. i thought it was there the whole time and i was being dumb.
What i mean by hidden windows, is in the script i just posted, some windows wont show, such as objectdock, the main window of my winamp skin and my msn app, but in your magnifier then it shows these.
And what i mean by not becoming 1 pixel, is that when the following script is run, then the magnifier starts off as 1 pixel and u can increase it to 300 pixels, but id like it to start so as you cannot see it, and then can increase it to 300 pixels and then at any point can decrease it so that you cant see it again, so basically i need it to enter a null loop when you press F11 and the width is 1 pixel, and break from this loop on pressing F12.
| Code: | #NoEnv
#SingleInstance, Force
SetWinDelay, 1
nZ := 2.6 ; Zoom Factor
nR := 1 ; Rectangle of the Zoomer
CoordMode, Mouse
CoordMode, Pixel
ToolTip, %A_Space%
WinClose, ahk_class SysShadow
WinGet, hWnd, ID, ahk_class tooltips_class32
WinSet, ExStyle, +0x00000020, ahk_id %hWnd%
hDC_SC := DllCall("GetDC", "Uint", 0)
hDC_TT := DllCall("GetDC", "Uint", hWnd)
loop:
Loop
{
MouseGetPos, xmouse, ymouse
DllCall("StretchBlt", "Uint", hDC_TT, "int", 0, "int", 0, "int", nR*2, "int", nR*2, "Uint", hDC_SC, "int", xmouse-nR//nZ, "int", ymouse-nR//nZ, "int", nR//nZ*2, "int", nR//nZ*2, "Uint", 0x00CC0020)
WinMove, ahk_id %hWnd%,, xmouse-nR, ymouse-nR, nR*2, nR*2
WinSet, AlwaysOnTop, On, ahk_id %hWnd%
}
F6::
Exit:
DllCall("ReleaseDC", "Uint", 0, "Uint", hDC_SC)
DllCall("ReleaseDC", "Uint", hWnd, "Uint", hDC_TT)
ExitApp
F12::
If nR < 300
{
nR += 35
}
return
F11::
If nR > 1
{
nR -= 35
}
return |
Hope I've explained myself ok.
Edit: I think it's because you've used BitBlt in your magnifier, and from what I can tell, you're stretching that, so I think BitBlt can "see" these windows, where StretchBlt cant, but so far I cant get the mouse into the centre of the magnifier :/ |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1281
|
Posted: Tue Apr 24, 2007 10:54 pm Post subject: |
|
|
| tic wrote: | | What i mean by hidden windows, is in the script i just posted, some windows wont show, such as objectdock, the main window of my winamp skin and my msn app, but in your magnifier then it shows these. |
I guess these windows are also Layered windows.
| Quote: | | And what i mean by not becoming 1 pixel, is that when the following script is run, then the magnifier starts off as 1 pixel and u can increase it to 300 pixels, but id like it to start so as you cannot see it, and then can increase it to 300 pixels and then at any point can decrease it so that you cant see it again, so basically i need it to enter a null loop when you press F11 and the width is 1 pixel, and break from this loop on pressing F12. |
I suppose this could be done using WinHide/WinShow before/after increasing.
BTW, don't forget to set 'DetectHiddenWindows On'.
| Quote: | | Edit: I think it's because you've used BitBlt in your magnifier, and from what I can tell, you're stretching that, so I think BitBlt can "see" these windows, where StretchBlt cant, but so far I cant get the mouse into the centre of the magnifier :/ |
It's because of 'CAPTUREBLT' ROP. You can use it with StretchBlt too if the size remains the same, where I believe BitBlt does the job faster, however.
I already explained in this very thread why you can't do both, capturing the Layered windows and centering the mouse over the magnifier.
This was the reason why I made the magnifier out of the capturing region in my magnifier script. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1281
|
Posted: Sat Apr 28, 2007 6:15 am Post subject: |
|
|
I updated the script to use the function form.
And, I combined Magnifier into it too. |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1336
|
Posted: Sat Apr 28, 2007 5:33 pm Post subject: |
|
|
very nice
but the problem is that if you do anything low down on the desktop with the magnifier then it wont be magnified |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1281
|
Posted: Fri Jun 29, 2007 2:30 am Post subject: |
|
|
I added the Color-Inversion option to the Magnifier as it's only 1~2 line addition.
The hotkey for it is ^+Q. |
|
| Back to top |
|
 |
Morz Guest
|
Posted: Wed Apr 30, 2008 4:36 pm Post subject: magnifier / color inversion |
|
|
I'm legally blind. I would love to see your magnifier script with the color inversion included in it. I use a product called ZoomText (aisquared.com) but am looking for a simple portable magnifier that will invert color. I see light text, dark background best. Can you post a copy?
| Sean wrote: | I added the Color-Inversion option to the Magnifier as it's only 1~2 line addition.
The hotkey for it is ^+Q. |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|