Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Find window by name and close it

by kanegr (Acolyte)
on Sep 03, 2008 at 22:46 UTC ( [id://708880]=perlquestion: print w/replies, xml ) Need Help??

kanegr has asked for the wisdom of the Perl Monks concerning the following question:

How would you find a window by its name and close it in perl? There's an example that works perfectly in vb http://www.vbforums.com/archive/index.php/t-254242.html and it seems to be using features available to perl as well Anyone that can convert that to perl real quick?

Replies are listed 'Best First'.
Re: Find window by name and close it
by GrandFather (Saint) on Sep 03, 2008 at 23:01 UTC

    You may find that Win32::GuiTest has the tools you need to get the job done.


    Perl reduces RSI - it saves typing
      Hey look at that, got it to work. Thanks any ways. I guess I just needed some time with it. Help appreciated

        You should post the code that works for the benefit of anyone else who has a similar issue.


        Perl reduces RSI - it saves typing
Re: Find window by name and close it
by Lawliet (Curate) on Sep 03, 2008 at 22:51 UTC
    "Anyone that can convert that to perl real quick? "

    Yes, but anyone willing to for someone who does not know how to post a question effectively? It is bad manners to simply ask people to code for you. Unless you are offering money. In that case, there are plenty of other websites.

    I am sure there are people willing to simply assist you with your initial question though.

    I'm so adjective, I verb nouns!

    chomp; # nom nom nom

Re: Find window by name and close it
by ady (Deacon) on Sep 04, 2008 at 05:23 UTC
    Cut/Paste of code, where future readers may find the spare parts to get their vehicle running (on MSWin).
    * Using utilities from Sysinternals
    * Test environment, so 'fake' logon credentials here ...

    Best regards,
    Allan Dystrup
Re: Find window by name and close it
by Erez (Priest) on Sep 04, 2008 at 06:43 UTC

    I recommend AutoIt when in need to manipulate Windows GUI elements explicitly. It's a more Windows-GUI oriented tool, and for a specific job might be easier to use than Perl.

    Stop saying 'script'. Stop saying 'line-noise'.
    We have nothing to lose but our metaphors.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://708880]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2024-04-24 10:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found