 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Fri Sep 29, 2006 9:41 am Post subject: |
|
|
@majkinetor: You should use "TopDesk" for this as its proven and stable, only $20. I use it very often and dont think about reimplementing it.
http://www.otakusoftware.com/topdesk/
there are similar products out there called "expose clone". the topdesk is quite smooth and responsive.
you might be interested in "DeskMan" which shows all windows as thumbnails all the time over your taskbar.
actually i use them in combination. deskman to give me feedback of what windows are open, and easy activating them with click. and topdesk if i am confused and want to see them all in a different way.
i also like the idea of minimizing windows to desktop (which is also supported by WindowFx from Stardock/Objectdoc) but does not work on my Intel-Graphics card). this way you resize your windows and zoom in instead of only changing the window size and keeping the content.
i have some ideas of using livewindows to simulate a "zoomable" desktop actually you can already to this with livewindows with single windows. as printwindow is to slow for my taste i didnt follow the idea too much.
i have now my gesture-winmove and use my desktop in quarters and halfsizes. so i have exposelike behaviour all the time.
there is one script here which works like expose but only resizing windows without zooming like topdesk.
http://www.autohotkey.com/forum/viewtopic.php?t=1090&highlight=expose
you could also reuse my deskman script to make an expose clone out of it.
simply change the thumbnail sizes and arrange them in grid instead of sidebar.
did you try
http://www.autohotkey.com/forum/viewtopic.php?p=70769#70769
already (the post #70769 is important not the first one ) where you get all active windows shown. you simply need to rearange the layout and you have your expose clone, it even refreshes automatically every second. (you could change this if you like).
i plan to change deskman to BitBlt instead of iview.exe for creating the thumbnails as bitblt should be much faster and you would not need temp files on your harddrive. but as deskman works quite stable i have not much hurry to implement it.
if somebody has demand we could create a ahk-script which emulates the new alt-tab of vista on xp or win2k, also the show thumbnails of active win if you hover the taskbar would not be too hard.
i tried the windows vista-beta version but switched back to xp, as i like it much more and with my own tweaks my desktop is more advanced then vista will ever be the glass effect does not work on "current" grahics cards, but with windowblinds it runns smooth. but i dont use this transparent borders because they are invisible for screenshots which is bad, as i have a printscreen every 15minutes to do my timetracking for work. (a livesaver if you have short memory and missing titlebar is bad.
ps. all my scripts on one page: ( there are some more in the forum)
http://www.holomind.de/wiki/index.php?n=AHKScripts.HomePage
Last edited by holomind on Fri Sep 29, 2006 9:50 am; edited 1 time in total |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Fri Sep 29, 2006 9:48 am Post subject: |
|
|
I fear it would be worse than that, needing OpenGL or DirectX to achieve smooth animation at this scale (full screen). _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Fri Sep 29, 2006 9:55 am Post subject: |
|
|
you also might want to try:
http://www.spheresite.com/
which is similar to xgl in idea, but its more like a gimmic and not usable for daily usage. i used spherexp for a while but rearanging windows manually annoyed me so i wrote deskman and stuck with it for a very long time. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3644 Location: Belgrade
|
Posted: Fri Sep 29, 2006 10:12 am Post subject: |
|
|
Holomid, I wasnt acctually interested in applications doing that, although I will check out the things you mention.
I have my working environment and don't like to change it just cuz it miss this function. I use Stardock on some machines, and experimenting with BBLean + Avedesk cobination recently (only 1mb of RAM to get similar features). I tried them all, more or less in past times. I was actively "skinning" everything in one phase of my life You can see my some of my desktops here & here. Click on the pic for big view
| Quote: | did you try
http://www.autohotkey.com/forum/viewtopic.php?p=70769#70769
already (the post #70769 is important not the first one ) where you get all active windows shown. you simply need to rearange the layout and you have your expose clone, it even refreshes automatically every second. (you could change this if you like).
|
No, I didn't try anything except your Magnifying tool, that is why I am asking. I just want to create that F12 XGL thingy and XGL ALT TAB is ofcourse welcome but it surely can not be done in AHK with all that features like videos playing in thumbnails etc...
| philho wrote: | | I fear it would be worse than that, needing OpenGL or DirectX to achieve smooth animation at this scale (full screen). |
I fear too, but it is not very dynamic so I thought it might be possible without it. I just need to move several rects in the same time to another location, its not like something is going on in rects (XGL of course, presents live view of windows, so if something is going on in it, you can see that on F12 and in ALT TAB) _________________
 |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Fri Sep 29, 2006 10:34 am Post subject: |
|
|
@majikentor: reading your first post. i guess the version with livewindows would be best.
in http://www.deviantart.com/deviation/27555536/ you could put deskman over your taskbar and instead of big icons you could have real thumbnails of active windows.
i quess the animation part would be hard and slow, but you can do many with bitblt but as philho suggested using directx or opengl might be faster. you can even see that using strechblt is much slower than bitblt if you resize and use antialize. (seems there is no hardware acceleration for this, as this would be no effort in directx if its hardware accellerated).
why dont you use topdesk, as you tweak your system already with lots of skins etc. this tools is quite good and seems to be what you need. also it supports refresh of window-contents in realtime.
(i think internally they use something similar to printwindow-dllcall, they even had the same black artefacts in some windows in the beginning).
you even get this filp-3d which is planned for vista. (which i personally dont like. i even use topdesk in grid view and not the original "spatial layout" which places windows randomly.
in deskman windows are "chached" with thumnails and only the active window is screenshotted, so you dont have to toggle through windows. and its quite fast.
you can have "invisible" dc-buffers for offscreendrawing etc.
also you can use the technique of deskman and have a gui which contains images, then you can move the images in the gui and even rescale them.
this should give you nice animation effects.
like
| Code: |
Loop, %maxthumbs%
{
y-=2
; Icon Titlebar
Gui, Add, Pic , gRestoreWin x%x% y%y% w12 h12 vPicB%a_index% ; add dock-slots to gui
y+= 14
; Thumbnail
Gui, Add, Pic , gRestoreWin x%x% y%y% vPic%a_index% ; add dock-slots to gui
x2 := x+15
y2 := y-10
|
you can simply move this vPicB arround in GUI and AHK will do the "animation" for you look in the ahk-documentation how to set the properties of an gui element here the pic and change x,y,h,w
but with replainting the gui very often you will probably get flicker. using bitblt directly would be smoother i guess.
i even have big problems in magnifier with winmove as it lags quite a lot. so i turn of the aiming-frame. gui repaint isnt that fast.
but the example:
http://www.autohotkey.com/forum/viewtopic.php?p=70769#70769
uses a combination of printwindow + bitblt to show it.
you just need to change the target positions and sizes of the windows and you get your f12 effect. you even get live-preview of the windows (will not work with video (if using hardware overlay eg. directx, directdraw, opengl ) but many will work )
perhaps you can use the other expose script to do the window-positioning? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Fri Sep 29, 2006 11:35 am Post subject: |
|
|
Wow, this topic/script is really impressive. Somehow, I hadn't fully appreciated its speed and usefulness until now.
I'd like to bring more attention to this topic by linking to it from the script showcase. However, I think the top post of this topic could use a better presentation so that casual users can more easily download it and get running. For example, I think providing a miniature quick-start at the very top of the first post would make it more accessible and popular:
| Code: | Quick-Start Guide
1) Download ScreenCap.zip (or whatever) and decompress it into a folder of your choice (such as C:\ScreenCap).
(perhaps it should decompress all its helper scripts except the Main one in subdirectory, though this might cause problems if people extract it wrong).
2) Launch ScreenCap.ahk (or whatever the main script is called).
3) Press the Win+C hotkey to make (whatever kind) of screenshot. By default, the images are stored as PNG files in the "xxxx" subfolder of where you ran the script.
4) Press the Win+V hotkey to do (something else). |
Finally, can this utility be easily extended to capture only part of screen like PhiLho's example (maybe it already does)? There might be a big demand for that.
Thanks for sharing your work and expertise. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3644 Location: Belgrade
|
Posted: Fri Sep 29, 2006 11:47 am Post subject: |
|
|
| Quote: | | also you can use the technique of deskman and have a gui which contains images, then you can move the images in the gui and even rescale them. |
Great. This is the way to go !
Alg should look like this:
1. Turn on "display window content while moving" in registry
2. Take the screenshot of windows, make an image, add it to GUI witch contains only that image (no caption, no anything).
3. Hide windows in question and place GUIs on their position
4. Simulate windows message for dragging window by title NC_MOUSEMOVE (this is very smooth) for every gui I created (so we will use Windows GUI engine instead acctuall animation). Every GUI Image is resized on WM_MOVE message according to some function.
5. Set OnClick message to eatch GUI and upon receving do vice-versa, unhide all windows, and set desired on the top of Z-order
6. Return window moving mode to its old value.
About top desk:
I don't like to keep 2 MB Executable in memory just for one function. I intend to create this script, make it mergable, add it to my UTILS pack and run it inside single AHK instance. If I have to install additional program eatch time I need some function, my system would be soon dead. _________________
 |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Fri Sep 29, 2006 1:07 pm Post subject: |
|
|
| Chris wrote: | Wow, this topic/script is really impressive. Somehow, I hadn't fully appreciated its speed and usefulness until now.
|
thanks, actually the speed comes from builtin gdiplus.dll, which now can be used quite easily with ahk. there are tons of functions you can call in gdiplus for image and screenmanipulation. we only scratch the surface with this screenshot tool.
| Chris wrote: |
I'd like to bring more attention to this topic by linking to it from the script showcase. However, I think the top post of this topic could use a better presentation so that casual users can more easily download it and get running.
|
i didnt focus on making yet-another screenshot capture as the world has enough of them. (but using ahk you can adopt it to your needs, eg. the nice auto-date in filename is not possible with the otherwise gread "printkey" software. i now can replace it easily with ahk+gdi, but i am to lazy to do it as printkey is running already if i didnt have a solution i would use ahk.
i make screenshots every 15minutes automatically, so one idea could be to take the screenshot and insert it into outlook calender automatically and then you easily can use it for timetracking and see what you have done all day. (its easier to do this with ahk-scripting than using out-of-the box tools)
| Chris wrote: |
For example, I think providing a miniature quick-start at the very top of the first post would make it more accessible and popular:
|
i put it in first post, which also needs some "beauty up" and the obligatory screenshot like in the other tools is missing ...
so many plans , so little time...
| Chris wrote: |
Finally, can this utility be easily extended to capture only part of screen like PhiLho's example (maybe it already does)? There might be a big demand for that.
|
I changed the url to the more appropriate thread, there is even a comment by myself how to select the region with a little tooltip-layer and mouse-region. currently the two scripts need to be merged.
| Chris wrote: |
Thanks for sharing your work and expertise.
|
you are welcome, ahk is fun, and i like to share my findings. as these things were impossible or only for "real" programmers in visual-studio before things would have been easier if i found ahk earlier. |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Fri Sep 29, 2006 1:28 pm Post subject: |
|
|
| majkinetor wrote: |
Alg should look like this:
...
|
you dont need to move around your windows, you can do this much easier.
a) deskman is already always of top and thus hides all behind it (in my case the taskbar) in your case the whole desktop.
b) make the background of deskman black and you already hide all windows behind.
c) deskman already has all needed thumbnails ( if you want more quality you can save the screenshots in full resolution and let the gui scale it down, using right size+antialize gives better quality i think.
so all you need to do is move the images in deskman you even could have some kind of animation and start with images size w0 h0 and scale them up to your needed size. i would use a gridlayout with floor(square-root(number of windows)) deskman already knows the number of windows, you only have to increasy x by zoomed window-with and then y every time you go beyond the row-size.
d) instead of animation i would set the gui to 100% transparent in the beginning, fill in the images and then fade in the gui until solid (or even less to get a nice effect) the moving of windows is a geek effect not really needed.
e) on click onto an image (deskman does this already) you bring this window to front and hide the gui.
this way you dont have live update of windows but it should be quite fast, as you only have to screenshot one image each second or less, and you can show the gui immediately.
using the other version with printwindow would give you the effect of watching the live-contents of the windows. also it easily gets the screenshots of all windows without moving the windows around.
on my computer getting 10windows a second with printwindow is fast enough. unfortunately the printwindow function has bugs and messes up internet-explorer and firefox as it interferes page-rendering.
but using printwindow could provide the smallest ahk-script as it makes many steps easier. also it does not produce temp-files.
| majkinetor wrote: |
About top desk:
I don't like to keep 2 MB Executable in memory just for one function. I intend to create this script, make it mergable, add it to my UTILS pack and run it inside single AHK instance. If I have to install additional program eatch time I need some function, my system would be soon dead.
|
i think topdesk uses lots more than 2MB ! especially if you cache the images. for quick response (currently topdesk needs 37MB real and 33MB Virtual-(swap).
...
if you read the comments for deskman, one plan is to extend it so it can support:
a) deskman like i use it now
b) have an expose view (grid) like you suggest
c) have an horizontal task-switcher like in os/x or vista.
d) show thumbnails on taskbar on hover
e) show live-contents of the windows in thumbnails (on demand as this is a bit slower or uses cpu)
etc. the core would be the same but only the gui changes. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3644 Location: Belgrade
|
Posted: Fri Sep 29, 2006 2:06 pm Post subject: |
|
|
Thank you, you cleared some things for me.
I will look into deskman as soon as I finish current things I am working on.
| Quote: | | i think topdesk uses lots more than 2MB ! especially if you cache the images. for quick response (currently topdesk needs 37MB real and 33MB Virtual-(swap). |
No comment . _________________
 |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Fri Sep 29, 2006 3:46 pm Post subject: |
|
|
| holomind wrote: | i put [chris's quickstart thing] in first post, which also needs some "beauty up" and the obligatory screenshot like in the other tools is missing ... | I didn't mean to paste it in exactly as I'd typed it: I think parts of it are wrong or silly because I was just guessing . Anyway, it's not a high priority, so take your time updating it. |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Sat Sep 30, 2006 8:43 am Post subject: |
|
|
@majkinetor: you will need a gui with gridlayout, and guess what, the gesture_movewin.ahk already has a gui like that, you only need to skale it
instead of adding text/labels to the gui add pictures. ..
the screenshot looks like a grid
http://www.autohotkey.com/forum/viewtopic.php?t=12524&highlight=gesture
you even can see thumbnails of windows in it (which are fake;) |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
|
| Back to top |
|
 |
Landvermesser
Joined: 03 Nov 2004 Posts: 51
|
Posted: Mon Oct 09, 2006 4:45 pm Post subject: |
|
|
Problem: the memory usage after 20 full screenshots is more as 100 Mb.
Solution: Stop GDI+ after each screenshot.
| Code: | #v::
SaveImage_Full:
counter_f := counter_f +1
FormatTime, myTime, , yyyyMMdd_hhmmss
fileNameDestP = screens\S_%myTime%_%counter_f%_%A_ScreenWidth%x%A_ScreenHeight%.png
If (GDIplus_Start() != 0)
Goto GDIplusError
; Copy BMP from DC
DllCall( "gdi32.dll\BitBlt"
, "uint", hdc_buffer_full, "int", 0, "int", 0, "int", A_ScreenWidth, "int", A_ScreenHeight
, "uint", hdc_frame_full, "int", 0, "int", 0, "uint", 0x00CC0020 )
DllCall( "GDIplus\GdipCreateBitmapFromHBITMAP", uint, hbm_buffer_full, uint, 0, uintp, bitmap )
; Save to PNG
If (GDIplus_GetEncoderCLSID(pngEncoder, #GDIplus_mimeType_png) != 0)
Goto GDIplusError
noParams = NONE
If (GDIplus_SaveImage(bitmap, fileNameDestP, pngEncoder, noParams) != 0)
Goto GDIplusError
; ---- Added -----
GDIplus_Stop()
Return |
_________________ My AHK project: http://landvermesser.tripod.com/ |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Mon Oct 09, 2006 7:08 pm Post subject: |
|
|
@landvermesser: this sound reasonable. at that time i didnt understand much of philho's code and was only happy that "it worked".
windows is quite bad in memory-management and your chance to make it leak is quite easy.
i also did manage to crash my system by quicky making "bmp" which eats your memory very fast (as it is very fast and has not delay with compression).
freeing the memory with gdi-stop is the solution.
@all: please use landvermessers "bugfix" in the meantime, i will update the post#1 when i find time. |
|
| 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
|