AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

real expose clone
Goto page Previous  1, 2, 3 ... , 14, 15, 16  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
holomind



Joined: 11 Mar 2006
Posts: 297
Location: Munich, Germany

PostPosted: Thu Apr 17, 2008 9:18 am    Post subject: Re: Display of Saga Reply with quote

StreetRider wrote:
Question?

Could the screen be captured as a image and then presented in your program?

Maybe with a command line utility.


in theory it might work, but there are not many "free" screencapture tools able to grab directx, video or opengl.
its possible to save an image and load it into the hdc to display it as a thumbnail inside of expose.
i guess its not possible to capture directx "offscreen" so you would see your program (saga) in fullscreen while it is caputured. it would destroy the expose experience.

in os like windows-vista or mac osx or compiz on linux it would be easier , because there all windows are opengl or directx and have each another window-buffer. so you can even show a minimized video while it is playing. windows-2000/xp only has one "screen" where it paints to.
the printwindow-funktion kind of is another screen where a "temporary" desktop is captured.

there is a similar program to expose-clone , i called DeskMan (Desktop-Manager) which uses the iview.exe to capture an image and then display it as thumbnails. (actually expose-clone evolved from deskman..)
http://www.autohotkey.com/forum/viewtopic.php?t=8597

(unfortunately this also cant grab screens from directx or opengl, because irvanview does not support it. also it loops through all windows once the capture the windows. and has no live-update, but only refreshes the active window, and "remembers" the hidden ones. )

in theory it should be possible to do directx or opengl-screencapture in ahk with the help of DllCall, but nobody managed it yet.

similar to this one, but quite a bit more complicated using directx or opengl.
http://www.autohotkey.com/forum/viewtopic.php?t=12012
Back to top
View user's profile Send private message Visit poster's website
airjrdn



Joined: 25 Feb 2008
Posts: 33

PostPosted: Thu Apr 17, 2008 2:58 pm    Post subject: Reply with quote

holomind wrote:
Quote:

here's everything from Spy when mousing over SQL:
Code:

>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
Microsoft SQL Server Management Studio
ahk_class wndclass_desked_gsk
...
>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<
ClassNN:   WindowsForms10.Window.8.app.0.378734a9
Text:   
Color:   0xEFF4F5  (Blue=EF Green=F4 Red=F5)
...


Only one window shows up in the taskbar, regardless of the number of mdi child windows open within management studio.

Expose only shows the main window, none of the children.


ok, now i understand it a bit better, the simple solution to filter only the windows does not work.

at least we now have the correct window-title and ahk_class which is not too bad. which means you can filter by these values later.

perhaps it works to set "detecthiddenwindows, on" which should also list the "other" MDI windows. perhaps this is only a kind of desktop-manager where the all mdi-windows are hidden (but existent) and only the active one is shown.

printwindow (which is used by the expose script) only works with visible windows and not with minimized. but it works with windows which are offscreen.

perhaps this helps to find the next step..
http://www.autohotkey.com/forum/topic22616.html

this might be usefull, as it lists all active processes (which might include the mdi subwindows)
http://de.autohotkey.com/docs/commands/Process.htm#ListEx

manual for detecthiddenwindows:
http://www.autohotkey.com/docs/commands/DetectHiddenWindows.htm

and winget with lists might also be helpful: (section "List" )
http://www.autohotkey.com/docs/commands/WinGet.htm

one idea would be to list "all" windows. then filter by class_id, then loop through these windows. by (remember current position) unminimize, move offscreen so its invisible, capture printwindow, move back to position and minimize again. (or similar where you can capture the windows and let them be invisible offscreen at the same time).

you should try
Code:

DetectHiddenWindows, On

at the begin of the script. perhaps then the hidden windows appear (at least as black windows.) perhaps you get "lots" of black windows this way...

good luck


Here's what I've found so far:

This:
detecthiddenwindows, on
WinGetTitle, Title, A
MsgBox, The active window is "%Title%".

Produces:
Code:

---------------------------
DetectMDIWindows.ahk
---------------------------
The text is:
Find and Replace

MsoDockLeft

MsoDockRight

MsoDockTop

Unified Find

MsoDockBottom

Fi&nd what:

sql

sql

>

Re&place with:

@strout

@strout

>

&Look in:

Current Document

   

Find &options

&o

Match &case

Match &whole word

Search &up

Search &hidden text

Us&e:

Syntax:

Regular expressions

&Find Next

&Replace

Replace &All

&Bookmark All

MsoDockLeft

MsoDockRight

MsoDockTop

Menubar

Standard

SQL Editor

Text Editor

MsoDockBottom

Ready       Ln 1 Col 1 Ch 1       INS

Object Explorer

MsoDockLeft

MsoDockRight

MsoDockTop

SQL Server Object Explorer

MsoDockBottom

Properties

Property Browser

Current query window options:

PropertyGrid

Description Pane

Current Status

Current query execution status.

PropertyGridView

Connected.

PropertyGridToolBar

ssas1.ACERecon - SQLQuery10.sql*

ssas1.ACERecon - SQLQuery10.sql*

ssas1.ACERecon - SQLQuery8.sql*

ssas1.ACERecon - SQLQuery8.sql*

Messages

shellTextViewControl1

ssas1.ACERecon - C:\cache\Temporary Internet Files\OLK45\Partition.sql

ssas1.ACERecon - C:\cache\Temporary Internet Files\OLK45\Partition.sql

Messages

shellTextViewControl1

Execution plan

+

+

+

Solution Explorer

Solution Explorer

Output

MsoDockLeft

MsoDockRight

MsoDockTop

Output Window

MsoDockBottom


---------------------------
OK   
---------------------------


This:
WinGetTitle, Title, A
MsgBox, The active window is "%Title%".

Produces:
Code:

---------------------------
DetectMDIWindows.ahk
---------------------------
The active window is "Microsoft SQL Server Management Studio".
---------------------------
OK   
---------------------------


This:
Code:

F9::
; lists mdi windows as controls called dockingview1, 2, and 3
    MouseGetPos, xpos, ypos
    Msgbox, The cursor is at X%xpos% Y%ypos%.
   
    ; This example allows you to move the mouse around to see
    ; the title of the window currently under the cursor:
    #Persistent
    SetTimer, WatchCursor, 100
    return
   
    WatchCursor:
    MouseGetPos, , , id, control
    WinGetTitle, title, ahk_id %id%
    WinGetClass, class, ahk_id %id%
    ;ToolTip, ahk_id %id%`nahk_class %class%`n%title%`nControl: %control%
    msgbox ahk_id %id%`nahk_class %class%`n%title%`nControl: %control%
    return


Produces:
Code:

---------------------------
DetectMDIWindows.ahk
---------------------------
ahk_id 0x72045a
ahk_class wndclass_desked_gsk
Microsoft SQL Server Management Studio
Control: DockingView1
---------------------------
OK   
---------------------------
Back to top
View user's profile Send private message
IN2ITive



Joined: 15 Apr 2008
Posts: 17

PostPosted: Thu Apr 17, 2008 8:19 pm    Post subject: Reply with quote

Sorry to jump in here but I also have a question.

First off, amazing script that has really made my life at work so much easier. I use the Expose Clone as a way to monitor virtual machines running automation software against my company's applications, running in remote desktop connections. Because we have so many vm's I use VirtuaWin and have remote desktop connections spread across virtual desktops.

Anayway, the problem I was encountering is that the Expose Clone was not recognizing windows on other virtual desktops other than the one I was currently on. So if I was on virtual desktop 1 I only got the windows from virtual desktop 1, not 2-10.

I found a way that I could shutdown VirtualWin, which would place all windows back to the user's desktop. I do this:
Code:

Check_VirtuaWin:
  Run, %ComSpec% /c "C:\Program Files\VirtuaWin\virtuawin.exe" -msg 1039 0 0
Return


I do this once the hotkey to do the "Exposing" is pressed. Works fine.

Then one the exit sequence I restart virtuawin. Because of window rules within that software my windows then go back to their proper virtual desktop. The problem I have is that one this restart I get a command window that will not go away, I have to close it manually. I'm wondering if anyone has any ideas why?

Code:

Restart_VirtuaWin:
Run, %ComSpec% /c "C:\Program Files\VirtuaWin\virtuawin.exe"
Return



Also, I was wondering Holomind if you forsee any issues with trying to include your screen magnifier script with the expose? I usually have about 8-12 windows displayed in the expose and as expected it is small. I can see that the automation is continuing, just not exactly what it is doing Smile
Having the screen magnifier on the expose screen would solve this issue.

Sorry for the long-winded post!
Thanks.
Back to top
View user's profile Send private message
holomind



Joined: 11 Mar 2006
Posts: 297
Location: Munich, Germany

PostPosted: Thu Apr 17, 2008 10:03 pm    Post subject: Reply with quote

IN2ITive wrote:
Sorry to jump in here but I also have a question.

Questions are good, its nice to see how expose is used by different people...

Quote:
First off, amazing script that has really made my life at work so much easier.


Thanks

Quote:
I use the Expose Clone as a way to monitor virtual machines running
...


the problem is, that the other windows are either hidden or minimized by you virtual-desktop-manager. this could perhaps be circumvented also with the detecthiddenwindows option, i'm not sure.
The solution to close and restart your virtualmanager looks good to me, perhaps not the most efficient way to do it. you could also try other virtualmanagers, perhaps the use a differnt technique (like moving out of view instead of hiding or minimizing). as long as the window is "open" it can be captured with printwindow, even if it is moved outside of your physikal monitor.

this raises the idea to extend expose to simulate "spaces" also like the virtual-desktopmanager of mac-osx.
actually it would be realtively easy to build a virtual-desktop-manager with ahk, (and i quess there are even some in this forum already). because all you need to do is remember the position of the windows (which you get by the winget...program manager) like in this script and on moving to the other screen you hide all windows and "move" or unhide=show the active windows for this screen. some buttons and hotkeys for toggling screens and you are done. with the help of expose you could even have a visual version of the desktop (there is also a dual-panel manager script in this forum)...

i personally use "scalable framework" from microsoft as desktop-manager, which is kind of mixture of virtual-desktops and expose and works quite good for me. perhaps i could reimplement it in expose and then tweak it for my needs (actually scalable framework is not supported since 2005..)


Quote:
...desktop. The problem I have is that one this restart I get a command window that will not go away, I have to close it manually. I'm wondering if anyone has any ideas why?

thats weird, but which window do you get ? perhaps its a hidden window of some other programm which gets unhidden if you restart your virtual manager.
you can easily close this window automatically with ahk, if this window is the topmost you simly say.
Code:
Winclose , A
(or look for WinClose in ahk manual)
which will close the active window, or you close it by ahk_class or window-title. you can use the window-spy like described in the 2 posts before this.


Quote:
...

Also, I was wondering Holomind if you forsee any issues with trying to include your screen magnifier script with the expose? I usually have about 8-12 windows displayed in the expose and as expected it is small. I can see that the automation is continuing, just not exactly what it is doing Smile
Having the screen magnifier on the expose screen would solve this issue.

it is even easier, as the windows are actually "scaled down" you even could make each "thumbnail" fullscreen or even zoom.

i guess i even experimented with this feature already, but it was not usable.

if i remember correctly all windows are buffered already in several hdcs. so you can repaint the hdc at any time. (or you can simply repaint the needed window with printwindow and copy the output to the "thumbnail".

in one version in the wiki i have a version where you even can "click" on the minimized window and it will actually transfer the click to the real window. (using getmouse xy and then call click new-x, new-y) .

you could also change the script a bit and then rightclick on one thumbnail and then repaint it "zoomed" (e.g.50%) and move it back with rightclick, then use leftclick (or middleclick) again to chose the window and switch to it.

the parts for this feature are already in the forum, they only need to be rearranged and combined...

when i find some freetime and motivation i will try to include the "zoom" thumb under cursor function. (which is avaliable in the commercial expose-clone "TopDesk" )

i guess i would get the motivation if i "clone" the scalable-framework into a new expose version. also i try since a long time to make this compatible with directx or opengl. which would be awsome... technically it must be possible with ahk, but i didnt find a way to do it. actually the ahk sourcecode is avaliable so one can build directx or opengl-functions into ahk, when needed (but i'm not so good at c++) .

Quote:

Sorry for the long-winded post!
Thanks.

its even longer Wink added with crazy new ideas...
Back to top
View user's profile Send private message Visit poster's website
holomind



Joined: 11 Mar 2006
Posts: 297
Location: Munich, Germany

PostPosted: Thu Apr 17, 2008 10:09 pm    Post subject: Reply with quote

airjrdn wrote:

Produces:
Code:

---------------------------
DetectMDIWindows.ahk
---------------------------
ahk_id 0x72045a
ahk_class wndclass_desked_gsk
Microsoft SQL Server Management Studio
Control: DockingView1
---------------------------
OK   
---------------------------


its nice you try to analyse the windows, but we are not too much further.
(the first information from window-spy contained nearly the same info.)

it seems using detecthiddenwindows, does not help much. because then you would use it already Wink

it looks like your "mdi" windows are not separate windows but "controls" in one master-window. like "DockingView1"...

i doubt a bit that its possible to show them with expose.

is there a free or trialversion of this sql-managment-studio, so i can try it for my self ? perhaps you have an url at eg. an microsoft.com webpage.

you should also try if you can "unhide" your mdi-windows with this programm (also ahk script):
http://www.donationcoder.com/Software/Skrommel/index.html#ShowDialogsToo
Back to top
View user's profile Send private message Visit poster's website
airjrdn



Joined: 25 Feb 2008
Posts: 33

PostPosted: Fri Apr 18, 2008 2:37 pm    Post subject: Reply with quote

Well, I tried. Razz

There's a free version of SQL Server, but I don't think it comes with the Mangement Studio tool.

I was hoping ControlMove would be able to handle the moving of the DockingViewX controls, but I'm very new to AHK, so if you're pretty sure AHK won't do it, I won't waste any time trying to figure it out.
Back to top
View user's profile Send private message
holomind



Joined: 11 Mar 2006
Posts: 297
Location: Munich, Germany

PostPosted: Sat Apr 19, 2008 12:27 pm    Post subject: Reply with quote

i found "thinBasic" today, which has great support for OpenGL with easy basic -syntax.

This gives me the oportunity to rewrite the expose-clone and use opengl to do some fancy animations with the thumbnails. perhaps i can even manage to get live repaint inside and opengl window. (as like in sphereXP).

perhaps its also possible to make screengrabs of running video or hardware-accellerated programms (like directx-games) now that i can use opengl.

some little preview: noting big, but hdc-copy/mirror in thinbasic.
http://community.thinbasic.com/index.php?topic=1690.msg12270

perhaps there even is a way to use the thinbasic TBGL.dll (opengl wrapper) and call it with DllCalls from inside AHK, which would enable OpenGl for AHK for the first time.

greetings
holomind
Back to top
View user's profile Send private message Visit poster's website
Elesar



Joined: 28 Jun 2007
Posts: 69

PostPosted: Sun Apr 20, 2008 10:01 pm    Post subject: Reply with quote

Just as an FYI:

This does not work on my computer.

I am running LiteStep and RocketDock instead of using Explorer, so there might be conflicts there.

Upon running the script, the icon shows in the tray, but #Tab doesn't do anything, just de-selects my current window. I also tried modifications to the hotkey layout, and that didn't help either.

LiteStep Info:
Version: 0.24.7
Skin: Dreaming of ... 2
Website: litestep.net

RocketDock Info:
Version: 1.3.5
Skin: CrystalXP.net
Website: rocketdock.com

I use this script at work and I love it, would like to be able to use it at home too.
Back to top
View user's profile Send private message
holomind



Joined: 11 Mar 2006
Posts: 297
Location: Munich, Germany

PostPosted: Sun Apr 20, 2008 10:12 pm    Post subject: Reply with quote

Its very probable it does not work with litestep, which makes much changes in windows, and changes the way the desktop works. i guess they even replace the shell32.dll.

you could try if http://www.otakusoftware.com/topdesk/ works in combination of litestep.
Back to top
View user's profile Send private message Visit poster's website
airjrdn



Joined: 25 Feb 2008
Posts: 33

PostPosted: Sun Apr 20, 2008 10:16 pm    Post subject: Reply with quote

I'm running RocketDock at work and this works w/it, so that's not the problem. I do have it hidden until the mouse goes to the top of the screen though.
Back to top
View user's profile Send private message
holomind



Joined: 11 Mar 2006
Posts: 297
Location: Munich, Germany

PostPosted: Sun Apr 20, 2008 10:28 pm    Post subject: Reply with quote

airjrdn wrote:
I'm running RocketDock at work and this works w/it, so that's not the problem. I do have it hidden until the mouse goes to the top of the screen though.


Rocketdock ist not the problem. rocketdock also will be filtered in expose because of its width.

Litestep is the problem. as it changes core windows-functions.

http://en.wikipedia.org/wiki/LiteStep
"" LiteStep is a Windows shell replacement ""
which means things like messing around with hdc will not work. the "windowmanager" is not windows any more. perhaps simply

Winget,....Program Manager
is broken in LiteStep..
Back to top
View user's profile Send private message Visit poster's website
Elesar



Joined: 28 Jun 2007
Posts: 69

PostPosted: Sun Apr 20, 2008 11:21 pm    Post subject: Reply with quote

Hmm, alright then, I figured it was LiteStep, but wasn't 100% on it.

Too bad, I will just have to look into some other software solutions then. Just trying to get the most I can for free Razz
Back to top
View user's profile Send private message
holomind



Joined: 11 Mar 2006
Posts: 297
Location: Munich, Germany

PostPosted: Mon Apr 21, 2008 9:33 pm    Post subject: Reply with quote

Good News,

with the help of Eros and Psch, we managed to get BitBlt into an OpenGL-texture. This means i have now all pieces to rewrite the expose-clone in OpenGL, which will enable nice animations and should be more efficient.

(this enables open-source versions of expose, flip-3d, ShereXP, perhaps a screenloupe where the scaling is done in the 3d-engine (muuch faster than bltblt) etc. One step nearer to Compiz-XGL on Windows-XP )

Also the Move-In and Move-Out animation can be very smooth with Opengl, not to compare with StrechBlt. Although it will be combined with GDI+, because its management of "Windows" after all.

The new Version will be in the thinBasic Forum, but will take some time to evolve, but "technicaly" a prove of concept is done.

http://community.thinbasic.com/index.php?topic=1690.msg12301

Greetings
holomind
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Tue Apr 22, 2008 12:35 am    Post subject: Reply with quote

OpenGL can/must be done without relying on an external application.
Back to top
holomind



Joined: 11 Mar 2006
Posts: 297
Location: Munich, Germany

PostPosted: Tue Apr 22, 2008 2:31 am    Post subject: Reply with quote

Anonymous wrote:
OpenGL can/must be done without relying on an external application.


Funny Comment, of course because its only api-calls, like 90% of Windows programming, what do you think that DllCalls are ?

But thinbasic makes it much easier Wink

Visit the Link on the previous Post to see a prove-of-concept "Flip3d" (Vista) Clone. (very experimental)

Expose-Clone with hardware-acceleration will be comming in the future, its not impossible any more.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... , 14, 15, 16  Next
Page 15 of 16

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group