Jump to content

question1: screen capture behind window


Recommended Posts

1st question: I'm aware of _ScreenCapture_CaptureWnd() command, but this command can save anything that is on top of the screen, but not behind other windows. My question is: is it possible to make a screen shot of a window that is behind some other window, and how?

2nd question: Is it possible to retrieve an icon from any window, and how? I mean the icon that is displayed in the top left part of the window.

Link to comment
Share on other sites

To answer you second question you would have to right click on the programs startup then select properties and then go to Shortcuts and change icons. That icon should be in there along with however many goes with that program

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

1st question: I'm aware of _ScreenCapture_CaptureWnd() command, but this command can save anything that is on top of the screen, but not behind other windows. My question is: is it possible to make a screen shot of a window that is behind some other window, and how?

2nd question: Is it possible to retrieve an icon from any window, and how? I mean the icon that is displayed in the top left part of the window.

$win = wingettitle("")

winsetstate($win, @sw_minimize)

_screencapture()

winsetstate($win, @sw_maximize)

that was off my head, untested, and prob. not what you wanted, but if all else fails, be unreasonable :)

[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Link to comment
Share on other sites

To answer your first question there isn't a UDF for screencapturing a behind the windows program so you need to select the application and set it to visible. But you can set the direction on it outta the window and place it back when you got it captured

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

tnx for the help so far.

so, in order to get the window's icon, first I must find it's exe? uhm... I'm a little newbiesh when it comes to this, but how can I retrieve window's exe (startup) file location?

Where you place the file in your directory should be the startup location ie... iexplorer.exe All you have to do is a search on windows platform (windows key + f) then right click of that file name

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

I don't think Windows bothers drawing windows that you can't see... that would be inefficient. It is a 2D world and what you see is what you get.

Lar.

your wrong windows does support anything outside its viewing area then you can't do anything to it, just remember that when you place something out there to return it back else you'll have to ctrl-alt-del and close the program

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

I'm building a "windows manager" and I though I could add window's picture as one feature to my script... I have this prog. called Powertoy http://www.microsoft.com/windowsxp/downloa...ppowertoys.mspx

it's a replacement for Alt+Tab, and in there you can see pictures of all opened windows, the one from behind and the one on front, that's exacly what I need...

Where you place the file in your directory should be the startup location ie... iexplorer.exe All you have to do is a search on windows platform (windows key + f) then right click of that file name

tnx, but that's not what I'm looking for. I would like to get a file location of a working window, for example I start notepad, and notepad window appears on my desktop, I run my script with notepad's handle and I get location of it's exe file. Is it possible, and how?

Edited by sandin
Link to comment
Share on other sites

I'm building an "windows manager" and I though I could add window's picture as one feature to my script...

anyway, if that's not possible is it possible to retrieve window's executable file?

just click start -> search and search everywhere for *.exe every file that has a .exe should appear for you

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

I'm building a "windows manager" and I though I could add window's picture as one feature to my script... I have this prog. called Powertoy http://www.microsoft.com/windowsxp/downloa...ppowertoys.mspx

it's a replacement for Alt+Tab, and in there you can see pictures of all opened windows, the one from behind and the one on front, that's exacly what I need...

tnx, but that's not what I'm looking for. I would like to get a file location of a working window, for example I start notepad, and notepad window appears on my desktop, I run my script with notepad's handle and I get location of it's exe file. Is it possible, and how?

Do you have a script that does that or your asking for one? If you are you have to use "Winlist" and "FileGetLongName" they will answer your questions (check in the functions winlist and filegetlongname in AutoIT Help before you ask)

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

I found a solution:

run("calc.exe")
WinWait("Calculator")
$path = _WinGetPath("Calculator")
MsgBox(0,"",$path)

Func _WinGetPath($Title="", $strComputer='localhost')
    $win = WinGetTitle($Title)
    $pid = WinGetProcess($win)
   $wbemFlagReturnImmediately = 0x10
   $wbemFlagForwardOnly = 0x20
   $colItems = ""
   $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
   $colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_Process WHERE ProcessId = " & $pid, "WQL", _
         $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
   If IsObj($colItems) Then
      For $objItem In $colItems
         If $objItem.ExecutablePath Then Return $objItem.ExecutablePath
      Next
   EndIf
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...