Jump to content

WinExists("DATA") gets other windows with similar title


Recommended Posts

I'm creating an application to stop and start another application once a run-time error occurs. In one of my servers there is an app called (DataTransfer) which is used as an interface between two other apps. Everytime (DataTransfer) crashes it throws a run-time exception. I looked at the window info and the title is "DATA". I couldn't get any other info. So I though of using the WinExists method. The problem that I'm running into is that the original application title is "Data Transfer". Whenever I use WinExists("DATA") it picks up the original application text and not the run-time msg box. I looked at the AutoITSetOption("WinTitleMatchMode",3). This is suppose to match the word in the title. At least that's what I understood. Can anybody help?

Applicaiton Title = "Data Transfer" - This app is always running

Exception Msgbox title = "DATA" - Only comes up when there is an run-time error.

Link to comment
Share on other sites

try using StringRegExp to exclude everything except "DATA" :)

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

  • Moderators

I'm creating an application to stop and start another application once a run-time error occurs. In one of my servers there is an app called (DataTransfer) which is used as an interface between two other apps. Everytime (DataTransfer) crashes it throws a run-time exception. I looked at the window info and the title is "DATA". I couldn't get any other info. So I though of using the WinExists method. The problem that I'm running into is that the original application title is "Data Transfer". Whenever I use WinExists("DATA") it picks up the original application text and not the run-time msg box. I looked at the AutoITSetOption("WinTitleMatchMode",3). This is suppose to match the word in the title. At least that's what I understood. Can anybody help?

Applicaiton Title = "Data Transfer" - This app is always running

Exception Msgbox title = "DATA" - Only comes up when there is an run-time error.

Well the window has to have a Class, you could just use that (Located under Title: in autoit info tool).

You could find the windows handle off the before you run your app, and make sure that it excludes that one.

You could match PIDs from the window to see if it matches the correct executable.

The list goes on.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...