Jump to content

help closing window with batch file


Guest jerblaster23
 Share

Recommended Posts

Guest jerblaster23

hi I am trying to close a window using "autoit-v3.0.81-beta" I created a batch file with WinKill("My Documents") as a test and it's not working. does anyone know what I'm doing wrong.

click here for a little more info. I was refured here by another forum or here's a copy past also

Is there a way simular to using the windows taskill command

TASKKILL /F /IM Notepad.exe /T

only that can kill a application? the progam I am trying to kill doesn't show up (when I click ctr+alt+del) under process but it shows up under applications. it runs from explorer.exe and I don't want to end that. I am trying to run this through a batch file. thanks

Report Offensive Message For Removal

Response Number 1

Name: CyberSlug

Date: December 18, 2003 at 12:37:56 Pacific

Subject: kill application with batch file

Reply:

Ideas:

1) tskill explorer stops but also restarts explorer

2) The free scripting language AutoIt lets you kill a window based on it's title (and optionally text in case many windows have the same name). You'd create a script containing the line

WinKill ( "title", ["text"] )

and compile it into an executable which you can call from your batch file.

Good Luck

Report Offensive Follow Up For Removal

Response Number 2

Name: jerblaster23

Date: December 19, 2003 at 13:30:09 Pacific

Subject: kill application with batch file

Reply:

ok here's what I tried. I downloaded the file. I extracted the file upx and placed it in the drive. than as I test I opened my domunemts to try and close it, than ran the command

cd c:\

upx winkill("my documents")

and it runs it through the progam but I says file not found along with a bunch of other info about the progam.

have you ever tried this progam? am I doing it right? or did I download the wrong progam?

Report Offensive Follow Up For Removal

Response Number 3

Name: CyberSlug

Date: December 19, 2003 at 18:33:38 Pacific

Subject: kill application with batch file

Reply:

You will want to create and save a text file (using notepad or similar) that contains the line

WinKill("My Documents"). Then, create a shortcut to

AutoIt3.exe nameOfThatTextFile

It's easier if you download the installer version (the exe file from here). It associates text files with an AU3 extension to be run by AutoIt, and allows you to compile the script into a stand-alone executable.

If you have any more questions specific to AutoIt, you can ask them

Report Offensive Follow Up For Removal

Response Number 4

Name: CyberSlug

Date: December 19, 2003 at 18:35:16 Pacific

Subject: kill application with batch file

Reply:

Oops, the last part of my message got chopped here:

You can ask questions at

http://www.hiddensoft.com/forum

Link to comment
Share on other sites

Hi again :-)

Oops, WinKill doesn't work. WinClose("My Documents") is the one.

And just to reiterate: Create a text file with that line, and save the text file with .AU3 extension. Then double click the file to run it.

Hope that helps

P.S. Try

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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...