AutoHotkey Community

It is currently May 27th, 2012, 7:49 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 83 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject:
PostPosted: September 29th, 2006, 10:41 am 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
@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/viewtop ... ght=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/viewtop ... 0769#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 ... s.HomePage


Last edited by holomind on September 29th, 2006, 10:50 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2006, 10:48 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
I fear it would be worse than that, needing OpenGL or DirectX to achieve smooth animation at this scale (full screen).

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2006, 10:55 am 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2006, 11:12 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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/viewtop ... 0769#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)

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2006, 11:34 am 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
@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/viewtop ... 0769#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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2006, 12:35 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2006, 12:47 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2006, 2:07 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2006, 2:28 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2006, 3:06 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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 .

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2006, 4:46 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 30th, 2006, 9:43 am 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
@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/viewtop ... ht=gesture
you even can see thumbnails of windows in it (which are fake;)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 1st, 2006, 12:18 am 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
@majkinetor: see my new script / thread for a real expose-clone.

http://www.autohotkey.com/forum/viewtop ... 1324#81324

is it like you had in mind ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 9th, 2006, 5:45 pm 
Offline

Joined: November 3rd, 2004, 11:24 am
Posts: 51
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/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 9th, 2006, 8:08 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
@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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 83 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Cristi®, Google [Bot], nothing and 10 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group