 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
holomind
Joined: 11 Mar 2006 Posts: 299 Location: Munich, Germany
|
Posted: Mon Oct 02, 2006 2:12 pm Post subject: |
|
|
| majkinetor wrote: | I have faster computer
2x3GHZ
I wait about 2 seconds. |
then its your "requested" animations, fade in / out etc.
printwindows() should be less than 1 sec for 6windows.
you can speed it up by setting strechblitmode to 0 instead of 4, but then you get ugly pictures.
remember this is "oldstyle" gdi and not directx or opengl which is used in mac/os and xgl (you know where the name comes from [X]-Server -Open[GL ?! ) they also have a completely different way of drawing windows (os/x , xgl) as they draw windows into texture-buffer of your graphics card. this is not at all GDI. after many years microsoft realized that this is the future and now also implements a similar thing called winFx (not to mistake with windowFx from stardock) and also paint into graphicscard buffer. but they do it very badly.
if i would know more about directx or opengl , i could make a vista gui 10x faster than vista (even directx-8 would be enough i think).
but we playing GDI-Plus game here
perhaps i should get a book about directx and learn a bit about it. i guess you also can call it with dllcalls. i have an idea to have zoomable windows similar to expose but all the time. printwindow is to slow so one would need to find a way to redirect window-painting not to desktop-hdc but into framebuffer, and off you go. hello xgl on windows.
in linux its much easier as you have the X-Server and can do funny things with the framebuffers. there isnt a similar thing in windows. the closest is terminal-service and vnc, but they are slow compared to X-Server in realtime. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3589 Location: Belgrade
|
Posted: Mon Oct 02, 2006 2:21 pm Post subject: |
|
|
I will try to tweek code a little. Speed is most imoprtant, fancy stuff comes after it. I think you should set defaults to suit higher speed and setup gui can do the rest if somebody enjoy cool looking animation.
I didn't explore all possible solutions to this problem, to go to DX and OpenGL imediatelly.
BTW, I don't know how fast is WinFX but I heard XGL is making it look like a shame. On 3GHZ 64b machine, XGL is consuming 1% with constantly rotating cube (U hold right/left arrow all the time) on ATI Radeon 6800PRO. This configuration is pretty standard nowdays...
I guess time will come for porting XGL to windows since it is already planned. It is still alpha version in Linux world, so I guess when time comes to release final build, somebody might do it for Win. After all, this is the best desktop manager ever.... _________________
 |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 299 Location: Munich, Germany
|
Posted: Mon Oct 02, 2006 2:31 pm Post subject: |
|
|
| majkinetor wrote: | I will try to tweek code a little. Speed is most imoprtant, fancy stuff comes after it. I think you should set defaults to suit higher speed and setup gui can do the rest if somebody enjoy cool looking animation.
|
i disagree, a bit of animation makes it more "cool" even if you dont notice. but you can speed it up if its getting "annoying". if you have a new thingy you try all buttons, but if you use it for long term you will turn off unneeded gimmics. i used windowfx from stardock for a while. for some reason i didnt start it, and was amazed how fast my computer is "without" it
| Quote: |
I didn't explore all possible solutions to this problem, to go to DX and OpenGL imediatelly.
|
oh, if you talk about speed your way to go is directx (opengl is still not as good supported) gdi is quite fast (2d) but when it comes to scaling and other stuff you need a hardware acellerated engine.
| Quote: |
BTW, I don't know how fast is WinFX but I heard XGL is making it look like a shame. On 3GHZ 64b machine, XGL is consuming 1% with constantly rotating cube (U hold right/left arrow all the time) on ATI Radeon 6800PRO. This configuration is pretty standard nowdays...
|
did you try vista-beta, then you know XGL is many times faster, WinFX is bloatware. it even does not "install" !!! on my gfx card which is only 1year old. XGL should run also with older gfx cards (unfortunately the intel-gfx cards are to buggy and i never managed to see real xgl but only demos)
expose is so fast on mac, as the windows are already drawn into gfx-card framebuffer, and all expose does is scale the windows with some opengl-cards , a piece of cake for a 3d-accelerated card. thats why it so so *snappy*, this gdi will never come close.
| Quote: |
I guess time will come for porting XGL to windows since it is already planned. It is still alpha version in Linux world, so I guess when time comes to release final build, somebody might do it for Win. After all, this is the best desktop manager ever.... |
the word "beta" and "best ..ever" does not work in the same sentence
xgl is nice and funny but not even usable in terms of productive environment. os/x is stable and proven, until xgl is similar in stability i will wait with discussion about xgl again  |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 3941 Location: Pittsburgh
|
Posted: Mon Oct 02, 2006 11:59 pm Post subject: |
|
|
Version 0.6 works perfectly for me, so I cleaned up the code a little, making it smaller and slightly faster.
Edit:Removed the code. Use the improved version.
Last edited by Laszlo on Thu Oct 05, 2006 7:38 pm; edited 1 time in total |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10463
|
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3589 Location: Belgrade
|
Posted: Tue Oct 03, 2006 10:41 am Post subject: |
|
|
2 Lazslo
I tried your version and it works even better.
One bug: Some windows are out of screen here, I can just see small parts
Also, my Opera had freezed interface after using the script...
Does anyone plan to extend this with proper setup gui, selection etc ?
If not, I will take that job onmyself. I am just wondering so we don't do the same work. _________________
 |
|
| Back to top |
|
 |
not-logged-in-daonlyfreez Guest
|
Posted: Tue Oct 03, 2006 12:25 pm Post subject: |
|
|
I took Laszlo's version, and created a wallpaper version. The fade-in/fade-out is slow though. Dunno if it can be done more smoothly and more speedy.
+ Added Esc-key to close the window
+ Added wallpaper background
+ Added transparent fade-in/fade-out
| Code: | #SingleInstance force
#NoEnv
SetBatchLines -1
SetWinDelay 0
OnExit handle_exit
; config
fade_delay = 0 ; msec to wait for next animation frame
fade_steps = 4 ; steps in animation, 2 = fast, 10 = slow (smooth)
fadeout_steps = 4
min_w = 110 ; min width of windows to be shown
min_h = 110 ; min height of windows to be shown (hides taskbar etc)
trans_color = #998877
translevel = 255 ; transparency of end of animation
translevel_start = 0 ; transparency of start of animation (see offscreen painting)
translevel_stop_solid= 0 ; 0/1 turn off transparency at end of fade_in to hide background
scale_thumb_space = 1
live_repaint = 1000 ;1000 ; msec repaint the windows in expose mode, 0 = off
;init values
gui_active = 0 ; gui is hidden at startup
pics_added = 0 ; onclicks are not yet registered
Return
+F12::
handle_exit:
Gosub destroy_gui
ExitApp
GuiEscape:
Goto destroy_gui
Return
!r::Reload
F12::
MButton::
If gui_active = 1 ; toggle off if already active
GoTo destroy_gui
gui_active = 1 ; show gui
GoSub calculate_sizes ; sets "cols" , "rows"
If (num_win = "" or num_win = 1) ; do nothing if no active windows
Return ; or only 1
GoSub create_wall ; create bgwindow with current wallpaper
GoSub create_gui ; prepare gui to draw onto it
GoSub draw_thumbnails
GoSub fade_in
SetTimer draw_thumbnails, %live_repaint%
Return
create_wall:
RegRead, wall_path, HKCU, Control Panel\Desktop, Wallpaper
Gui, 2:Destroy
Gui, 2:+AlwaysOnTop -Caption
Gui, 2:Add, Picture, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%, %wall_path%
Gui, 2:Show, Hide NA x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%
Return
calculate_sizes:
num_win := get_wins()
cols := ceil( sqrt( num_win ))
rows := ceil( sqrt( num_win ))
If (cols * (rows-1) >= num_win )
rows--
thumb_w := A_ScreenWidth // cols
thumb_h := A_ScreenHeight // rows
ratio_of_screen := A_ScreenWidth / A_ScreenHeight * rows / cols
Return
draw_thumbnails:
pos_x := 0
pos_y := 0
win_now := 0
task_ids =
Loop %ids% ; ids has been set up in calculate_sizes
task_ids := task_ids "," ids%a_index%
Sort task_ids, D, ; keep positions of thumbnails
Loop Parse, task_ids, `,
{
task_id = %A_LoopField%
WinGetTitle title, ahk_id %task_id%
WinGetPos,,, w, h, ahk_id %task_id%
If (!is_excluded_win() ) { ; small windows not shown (eg taskbar)
win_now++
task_ids_%win_now% := task_id ; for activation
if !pics_added
Gui Add, Pic, gActivateWin x%pos_x% y%pos_y% w%thumb_w% h%thumb_h% vPic%win_now% ; register "onclick"
sleep 10 ; prevent missing windows
pwin := DllCall("PrintWindow", UInt,task_id, UInt,hdc_buffer, UInt,0)
ratio_of_win := w / h
if ( scale_thumb_space ) {
if ( ratio_of_win < ratio_of_screen ) { ; tall window
thumb_h2 := thumb_h
thumb_w2 := thumb_w * ratio_of_win / ratio_of_screen
} Else { ; wide window
thumb_w2 := thumb_w
thumb_h2 := thumb_h / ratio_of_win * ratio_of_screen
}
}
x1 := pos_x + (thumb_w - thumb_w2 ) / 2
y1 := pos_y + (thumb_h - thumb_h2 ) / 2
DllCall("gdi32.dll\StretchBlt"
, UInt, hdc_frame
, Int, x1
, Int, y1
, Int, thumb_w2
, Int, thumb_h2
, UInt, hdc_buffer
, Int, 0
, Int, 0
, Int, w
, Int, h
, UInt, 0xCC0020) ; SRCCOPY
pos_x += thumb_w
if ( pos_x >= A_ScreenWidth ) {
pos_x :=0
pos_y += thumb_h
}
} ; If !excluded
} ; Loop task_ids
pics_added := 1
Return
is_excluded_win() {
Global
Return w < min_w or h < min_h or title ="Expose" or title =""
}
fade_in:
Loop %fade_steps% {
intrans := A_Index * translevel / fade_steps
WinSet, TransColor, %trans_color% %intrans%
;Sleep %fade_delay%
}
If translevel_stop_solid
WinSet Transparent, off
intrans =
Return
fade_out:
Loop %fadeout_steps% {
outtrans := translevel - A_Index * translevel / fadeout_steps
WinSet, TransColor, %trans_color% %outtrans%
;Sleep %fade_delay%
}
outtrans =
Return
get_wins() {
Local x
WinGet ids, list,,,Program Manager ; all active windows-tasks (processes)
Loop %ids% {
task_id := ids%a_index% ; id of this window
WinGetTitle title, ahk_id %task_id%
WinGetPos,,, w, h, ahk_id %task_id%
If !is_excluded_win() ; small windows not shown (eg taskbar)
x++
}
Return x
}
create_gui:
Gui Destroy ; clear old stuff if expose hotkey is running in background
Gui +AlwaysOnTop +LastFound
Gui Color, %trans_color%
WinSet, TransColor, %trans_color%
Gui -Caption
WinSet, Transparent, %translevel_start% ; %translevel%
Gui Show, w%A_ScreenWidth% h%A_ScreenHeight% x0 y0, Expose
WinGet hw_frame, id, Expose
hdc_frame := DllCall( "GetDC"
, UInt, hw_frame )
DllCall( "gdi32.dll\SetStretchBltMode"
, "uint", hdc_frame
, "int", 4 ) ; Halftone better quality with stretch
hdc_buffer := DllCall("gdi32.dll\CreateCompatibleDC"
, UInt, hdc_frame) ; buffer
hbm_buffer := DllCall("gdi32.dll\CreateCompatibleBitmap"
, UInt,hdc_frame
, Int,A_ScreenWidth
, Int,A_ScreenHeight)
DllCall( "gdi32.dll\SelectObject"
, UInt,hdc_buffer
, UInt,hbm_buffer)
pics_added := 0
Return
ActivateWin:
StringReplace pos, A_GuiControl, Pic ; find the clicked pic-id
task_id := task_ids_%pos%
WinActivate ahk_id %task_id%
destroy_gui:
SetTimer draw_thumbnails, OFF
GoSub fade_out
Gui Destroy
Gui, 2:Destroy
gui_active := 0
pics_added := 0
DllCall("gdi32.dll\DeleteObject", UInt,hbm_buffer)
DllCall("gdi32.dll\DeleteDC", UInt,hdc_frame )
DllCall("gdi32.dll\DeleteDC", UInt,hdc_buffer)
Return |
|
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3589 Location: Belgrade
|
Posted: Tue Oct 03, 2006 1:19 pm Post subject: |
|
|
very good daonlyfreez
However, this script is stil unusable since it block my mouse after usage.
That is, problem persist even when I close the script down.... One of the windows simply is not responding to mouse clicks.... _________________
 |
|
| Back to top |
|
 |
not-logged-in-daonlyfreez Guest
|
Posted: Tue Oct 03, 2006 1:41 pm Post subject: |
|
|
| Yes, if you click on the background window with the wallpaper. Will fix it. |
|
| Back to top |
|
 |
daonlyfreez
Joined: 16 Mar 2005 Posts: 740 Location: Berlin
|
Posted: Tue Oct 03, 2006 2:04 pm Post subject: |
|
|
+ If you don't click on a picture, but on the wallpaper background, or if you press Esc or if you press F12 again, Expose will fade out, and the previous active window will be activated
Still needed:
+ speedup
+ settings GUI
| Code: | #SingleInstance force
#NoEnv
SetBatchLines -1
SetWinDelay 0
SetControlDelay 0
Process, Priority,, High
RegRead, wall_path, HKCU, Control Panel\Desktop, Wallpaper
Gui, 3:Destroy
Gui, 3:+AlwaysOnTop -Caption
Gui, 3:Add, Picture, gClickedOnWall x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%
, %wall_path%
Gui, 3:Show, Hide x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%, ehm
OnExit handle_exit
; config
fade_delay = 0 ; msec to wait for next animation frame
fade_steps = 3 ;4 ; steps in animation, 2 = fast, 10 = slow (smooth)
fadeout_steps = 3 ;4
min_w = 110 ; min width of windows to be shown
min_h = 110 ; min height of windows to be shown (hides taskbar etc)
trans_color = #998877
translevel = 255 ; transparency of end of animation
translevel_start = 0 ; transparency of start of animation (see offscreen painting)
translevel_stop_solid= 0 ; 0/1 turn off transparency at end of fade_in to hide background
scale_thumb_space = 1
live_repaint = 1000 ;1000 ; msec repaint the windows in expose mode, 0 = off
;init values
gui_active = 0 ; gui is hidden at startup
pics_added = 0 ; onclicks are not yet registered
Return
+F12::
handle_exit:
Gosub destroy_gui
ExitApp
GuiEscape:
Goto destroy_gui
Return
!r::Reload
F12::
MButton::
If gui_active = 1 ; toggle off if already active
GoTo destroy_gui
WinGetTitle, prev_active_title, A
;WinGet prev_active_id, id, A
; msgbox % prev_active_id
gui_active = 1 ; show gui
GoSub calculate_sizes ; sets "cols" , "rows"
If (num_win = "" or num_win = 1) ; do nothing if no active windows
Return ; or only 1
Gui, 3:Show
; GoSub create_wall ; create bgwindow with current wallpaper
GoSub create_gui ; prepare gui to draw onto it
GoSub draw_thumbnails
GoSub fade_in
SetTimer draw_thumbnails, %live_repaint%
Return
create_wall:
RegRead, wall_path, HKCU, Control Panel\Desktop, Wallpaper
Gui, 2:Destroy
Gui, 2:+AlwaysOnTop -Caption
Gui, 2:Add, Picture, gClickedOnWall x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%
, %wall_path%
Gui, 2:Show, Hide NA x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%
Return
calculate_sizes:
num_win := get_wins()
cols := ceil( sqrt( num_win ))
rows := ceil( sqrt( num_win ))
If (cols * (rows-1) >= num_win )
rows--
thumb_w := A_ScreenWidth // cols
thumb_h := A_ScreenHeight // rows
ratio_of_screen := A_ScreenWidth / A_ScreenHeight * rows / cols
Return
draw_thumbnails:
pos_x := 0
pos_y := 0
win_now := 0
task_ids =
Loop %ids% ; ids has been set up in calculate_sizes
task_ids := task_ids "," ids%a_index%
Sort task_ids, D, ; keep positions of thumbnails
Loop Parse, task_ids, `,
{
task_id = %A_LoopField%
WinGetTitle title, ahk_id %task_id%
WinGetPos,,, w, h, ahk_id %task_id%
If (!is_excluded_win() ) { ; small windows not shown (eg taskbar)
win_now++
task_ids_%win_now% := task_id ; for activation
if !pics_added
Gui 1:Add, Pic, gActivateWin x%pos_x% y%pos_y% w%thumb_w% h%thumb_h% vPic%win_now% ; register "onclick"
sleep 10 ; prevent missing windows
pwin := DllCall("PrintWindow", UInt,task_id, UInt,hdc_buffer, UInt,0)
ratio_of_win := w / h
if ( scale_thumb_space ) {
if ( ratio_of_win < ratio_of_screen ) { ; tall window
thumb_h2 := thumb_h
thumb_w2 := thumb_w * ratio_of_win / ratio_of_screen
} Else { ; wide window
thumb_w2 := thumb_w
thumb_h2 := thumb_h / ratio_of_win * ratio_of_screen
}
}
x1 := pos_x + (thumb_w - thumb_w2 ) / 2
y1 := pos_y + (thumb_h - thumb_h2 ) / 2
DllCall("gdi32.dll\StretchBlt"
, UInt, hdc_frame
, Int, x1
, Int, y1
, Int, thumb_w2
, Int, thumb_h2
, UInt, hdc_buffer
, Int, 0
, Int, 0
, Int, w
, Int, h
, UInt, 0xCC0020) ; SRCCOPY
pos_x += thumb_w
if ( pos_x >= A_ScreenWidth ) {
pos_x :=0
pos_y += thumb_h
}
} ; If !excluded
} ; Loop task_ids
pics_added := 1
Return
is_excluded_win() {
Global
Return w < min_w or h < min_h or title ="Expose" or title =""
}
fade_in:
Loop %fade_steps% {
intrans := A_Index * translevel / fade_steps
WinSet, TransColor, %trans_color% %intrans%, ahk_id %hw_frame%
Sleep %fade_delay%
}
If translevel_stop_solid
WinSet Transparent, off
intrans =
Return
fade_out:
Loop %fadeout_steps% {
outtrans := translevel - A_Index * translevel / fadeout_steps
WinSet, TransColor, %trans_color% %outtrans%, ahk_id %hw_frame%
Sleep %fade_delay%
}
outtrans =
Return
get_wins() {
Local x
WinGet ids, list,,,Program Manager ; all active windows-tasks (processes)
Loop %ids% {
task_id := ids%a_index% ; id of this window
WinGetTitle title, ahk_id %task_id%
WinGetPos,,, w, h, ahk_id %task_id%
If !is_excluded_win() ; small windows not shown (eg taskbar)
x++
}
Return x
}
; *** Create Expose Gui
create_gui:
Gui 1:Destroy ; clear old stuff if expose hotkey is running in background
Gui 1:+AlwaysOnTop +LastFound
Gui 1:Color, %trans_color%
WinSet, TransColor, %trans_color%
Gui 1:-Caption
WinSet, Transparent, %translevel_start%
Gui 1: Show, w%A_ScreenWidth% h%A_ScreenHeight% x0 y0, Expose
WinGet hw_frame, id, Expose
hdc_frame := DllCall( "GetDC"
, UInt, hw_frame )
DllCall( "gdi32.dll\SetStretchBltMode"
, "uint", hdc_frame
, "int", 4 ) ; Halftone better quality with stretch
hdc_buffer := DllCall("gdi32.dll\CreateCompatibleDC"
, UInt, hdc_frame) ; buffer
hbm_buffer := DllCall("gdi32.dll\CreateCompatibleBitmap"
, UInt,hdc_frame
, Int,A_ScreenWidth
, Int,A_ScreenHeight)
DllCall( "gdi32.dll\SelectObject"
, UInt,hdc_buffer
, UInt,hbm_buffer)
pics_added := 0
Return
; *** Actions on selection made
; on click on picture
ActivateWin:
StringReplace pos, A_GuiControl, Pic ; find the clicked pic-id
clicked_on_pic_id := task_ids_%pos%
clicked_on_pic = true
; -- continue
; on click on wallpaper
ClickedOnWall:
WinActivate, ahk_id %hw_frame%
; -- continue
; fade out
destroy_gui:
SetTimer draw_thumbnails, OFF
GoSub fade_out
Gui, 3:Hide ; fixed background GUI
Gui, 2:Destroy ; wallpaper background GUI
Gui, 1:Destroy ; Expose GUI
gui_active := 0
pics_added := 0
DllCall("gdi32.dll\DeleteObject", UInt,hbm_buffer)
DllCall("gdi32.dll\DeleteDC", UInt,hdc_frame )
DllCall("gdi32.dll\DeleteDC", UInt,hdc_buffer)
If clicked_on_pic = true
WinActivate ahk_id %clicked_on_pic_id%
Else
WinActivate, %prev_active_title%
clicked_on_pic_id =
clicked_on_pic = false
prev_active_id =
Return
; /*** Actions on selection made |
_________________ (sorry, homesite offline atm)
Last edited by daonlyfreez on Tue Oct 03, 2006 3:22 pm; edited 1 time in total |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3589 Location: Belgrade
|
Posted: Tue Oct 03, 2006 2:35 pm Post subject: |
|
|
I am trying another approach wich will be real time with live preview if it turn out to work.
Windows API is supporting something called world transformations.
You can set the transformation matrix to the DC. Transformation matrix is 2x3 matrice containing rotation, scale and translation factors.
So, basicly windows can do it on the fly, and we will not be dealing with bitmpas but with minituarised version of windows itself witch can then be aranged like normal windows. The side effect is live preview of video and things like that... plus, it will be real time.
Lets hope it works...
If anobody wants to examine this approach, I suggest searching around SetWorldTransform function on MSDN.
BTW, some windows are still out the screen
BTW2, exlusions are absolutely needed - People don't want to select Gtalk, winamp witch is always on top in the corner etc... _________________
 |
|
| Back to top |
|
 |
daonlyfreez
Joined: 16 Mar 2005 Posts: 740 Location: Berlin
|
Posted: Tue Oct 03, 2006 3:56 pm Post subject: |
|
|
For settings, I can think of the following:
Background:
- use fixed background color -> set color
- use transparent background -> set transparency level
- use fixed picture -> set picture path
- use current wallpaper
Effects:
- use fade-in -> set speed
- use fade-out -> set speed
- use live-update -> set update interval
Exclude:
- exclude windows smaller than -> set max. width and max. height
- exclude specific windows -> set windows to exclude
Hotkeys/triggers:
- set hotkey/triggers for 'normal' mode (trigger could be screen corner)
- set hotkey/triggers for 'application' mode (show only windows of active application)
If you don't own a Mac, here is a demo video of Apple's Expose:
http://www.apple.com/macosx/theater/expose.html
Any more ideas?
@majkinetor: Nice. If you can get that to work, it might even be possible to make it look even more like Apple's... (I like the mouseover effects, and the moving of the windows) _________________ (sorry, homesite offline atm) |
|
| Back to top |
|
 |
Terrapin
Joined: 15 Aug 2005 Posts: 107 Location: North Carolina
|
Posted: Tue Oct 03, 2006 4:16 pm Post subject: |
|
|
Hi Everyone. This is the first time I've been here since this one started. I am really amazed at what you have done, and the work you are doing together. The only Expose clone I've tried is called 'Exposer' and I found it to be more hassle than helper. I apologize for only trying what seems to be the most recent, daonlyfreez'. It works wonderfully. I did run across several glitches (in opening about 20 windows), but none of them were a problem at all, and seemed to have to do with the apps probably doing strange things. In Eudora which is MDI, everything worked fine. In Paint Shop Pro, which opens images within it's window, the open images seem to get caught in various stages of redraw, in the thumbnails. I opened two instances of Winamp, and no problems there, other than the 'old' winamp-style window appeared in the thumbnails, in addition to the 'modern skin'. The wallpaper had first one, then two groups (very small) of pixels which were always white, when in thumbnail view. I only say these things to help you if you want to further develop.
I was running it on an AMD64 3700+. I will try it later on AMD64 dual core 4200. The one I ran it on has two gigs, the other has only one but much faster ram. Both are connected to a dual-display, through a KVM switch. The secondary display... nothing changed at all there, but windows on it were 'captured' (thumbnailed). I really think this might be my preference, rather than having the thumbnails use the entire desktop.
One very unknown little app's window did not get captured for a while. Once it started getting captured, it seemed to work fine. I'm told it is coded in Delphi, the only other thing is that it's window opens across the middle of my desktop, thus spanning the two displays. Maybe this was the reason. It is a front-end for several audio-related command-line utilities.
I think this could really go far. I would encourage you all to work on it and develop. I could see the taskbar being possibly toggled off (hidden).
It ran quite quickly, in animated mode. Fine for me. Media Player gave it big problems, I don't use media player so... Word and Outlook gave no problems. I really did have all sorts of apps and windows open. Hard to believe all this was done with such a small amount of code. I realize that the GDI+ does a lot of it.
I wish I could volunteer to do the config gui, I am good at them I think, but I don't get things done very quickly. I will be a beta tester instead.
Thank you all, and Holomind especially who (I *think*) started all this with the screen captures and LiveWindows and the originals of this.
Bob |
|
| Back to top |
|
 |
Terrapin
Joined: 15 Aug 2005 Posts: 107 Location: North Carolina
|
Posted: Tue Oct 03, 2006 8:00 pm Post subject: |
|
|
Maybe this is some sort of contribution, not sure. Tooltips, don't seem to work very well for indicating the 'focused' window, as they don't size to what you see, for one thing, and for another, they don't let clicks through if they overlay. But, here is my code for it anyway, and it works other than those things. And, I think the taskbar, maybe, is being included... I get an extra 'invisible' item after the third one.
| Code: | GoSub fade_in
GoSub setup_tabs ; Terrapin's
SetTimer draw_thumbnails, %live_repaint%
Return
setup_tabs: ; the rest is mine (Terrapin)
WinGet, Items, ControlListHwnd, ahk_id %hw_frame%
Loop, Parse, Items, `n
WinGetPos, ItemX%a_Index%, ItemY%a_Index%, ItemW%a_Index%, ItemH%a_Index%, ahk_id %a_LoopField%
Tooltip, ., 1, 1, 18
WinGet, hiliteID, ID, ahk_class tooltips_class32
WinSet, Transparent, 60, ahk_id %hiliteID%
WinMove, ahk_id %hiliteID%, , %ItemX1%, %ItemY1%, %ItemW1%, %ItemH1%
SelItem := 1
return
#IfWinExist, Expose
Tab::
SelItem++
If SelItem > %num_win%
SelItem := 1
WinMove, ahk_id %hiliteID%, , % ItemX%SelItem%, % ItemY%SelItem%, ItemW%SelItem%, ItemH%SelItem%
return
Enter::
clicked_on_pic_id := task_ids_%SelItem%
clicked_on_pic := true
Tooltip, , , , 18
goto, destroy_gui
#IfWinExist
|
|
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 3941 Location: Pittsburgh
|
Posted: Tue Oct 03, 2006 9:41 pm Post subject: |
|
|
| majkinetor wrote: | | I am trying another approach which will be real time with live preview if it turn out to work. Windows API is supporting something called world transformations. | I am curious, but cannot take on the job. If you have something to try, I will test it.
| majkinetor wrote: | | some windows are still out the screen | In an earlier version I noticed that | Code: | | WinGetPos,,, w, h, ahk_id %task_id% | returned wrong dimensions. If the title of the window was inquired first, these w and h values became right. With a TrayTip in the right place could you check if the off-screen windows reported the right size? If they are wrong, some dummy window access commands before WinGetPos might help, like WinWait.
@Terrapin: Little numbers (0,1..9,a,b,...z) in the top left corners of the fields of the thumbnail matrix could be very useful for keyboard users: just type in the number to activate the corresponding window. If you want, you can color the number of the selected window red, and the arrow keys and Tab, Shift-Tab would move the selection. |
|
| 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
|