PID -> WindowHandle (stop/restart processes)
TAJTHY Tamás
tajthy@mailbox.hu
Thu Jan 3 23:46:00 GMT 2008
Hi,
2008. 01. 03. cs. 17:03, "Dave Korn" <dave.korn@artimi.com> írta:
> I'd like to stop your mailserver going crazy and sending this post again and
again and again! Is your sysadmin back from the christmas holiday yet?
Sorry for that! This is a free webmail app... I have no infulence on it. :-(
> Are you sure you're using a cygwin build of mencoder and not a win32/mingw
> build?
You are right. It is a mingw build. It seems I'm too lame for that. I tried to
compile it from source but I got a lotta errors. I gave up... :-(
> Signals *ought* to work between two cygwin apps, and if they don't it's
> a bug that could be fixed. They certainly wouldn't be expected to work betwen a
> cygwin and a win32 app.
You are right. I'll try to compile it under cygwin...
>> So as a workaround I installed Win32::GuiTest perl module
>> which implements SendKeys function which can send a ctrl+S/ctrl+Q to the
...
> I googled "HWND from pid" and found this advice:
>http://mail.python.org/pipermail/python-list/2003-March/195226.html
...
> This isn't the PID you're looking for
I put a perl code using Win32::GuiTest into .bash_profile which gets the handle
of the active window. This is written to a file with the PID.
> If EnumWindows isn't convenient (for example if you don't want to or can't
> conveniently use callbacks), you can write a loop that calls FindWindow(0, 0) at
> the start to get the first window and uses GetWindow(old_hwnd, GW_HWNDNEXT) to
> advance to the next one.
In Win32::GuiTest there is a FindWindowLike function which searches thru the main
windows and match against a given pattern.
Thank You for Your help!!!
Good byte!
TT
_____________________________________________________________A legnagyobb TORRENT kereső napi 25000 új letöltés - www.warez.hu
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list