Jump to content

Recommended Posts

Posted

Hi there,

I am trying to make a window focusing script. I have so many windows opened in my taskbar. But among these, i need to toggle focus of only two purticular windows. So i planned to make script.  Title of the first window is in english and it is a constant title. But title of the second window is in my native language + english. And it will change time to time. That means i need to open more than one file in that window. So i need to find the handle of window2 each time my script runs. But wingethandle function takes a title parameter. Unfortunately title of that window is in my native language + English. AutoIt can't display my language correctly. It will show some ????? for my native language text. Please help. How to fix this.

  Reveal hidden contents

 

Posted

Hi,

Thanks. Let me try. 

  Reveal hidden contents

 

Posted

Or use the PID and then the likes of _WinAPI_EnumProcessWindows().

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Hi 

TouchOdeath,

WinTitleMatchMode gives me "1". I need either window handle or classname

  Reveal hidden contents

 

Posted
Hi guinness,

How to find the PID of a program. Any built in function ?

  Reveal hidden contents

 

Posted

ProcessExists()?

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

tools > au3info. Once you open au3info, you have two tabs basically, window tab, and control tab. It will tell you all the handles, classnames, etc. In this case you need the window tab. Use au3info in conjunction with wingethandle, winwait, winwaitactive, there are more as well.

Use those in conjunction with wintitlematchmode, which specifies how you want to search for the window.

if you want the pid, you can just do $pid = winwait('sometitle','') or $pid = wingethandle, $pid = winwairactive, etc.

If the above doesn't help, then I suggest you learn how to properly read the help files that come with autoit, they are structured in a way that even a beginner can easily understand them.

Posted

Are you sure the likes of WinWait return a process identifier aka PID?

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Hi,

Thank you guinnes & TouchODeath. Let me try your ideas.

  Reveal hidden contents

 

Posted
  On 1/11/2015 at 6:26 PM, kcvinu said:

Hi,

Thank you guinnes & TouchODeath. Let me try your ideas.

OK, but just so you know WinWait(), WinGetHandle() (as mentioned above) don't return a PID, WinGetProcess() does though.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Hi 

TouchOdeath

Solved. Actually i didn't knew about what is the WinTitleMatchMode. A few minutes ago, i have read about it. And now i understood how to do this. It's working now. Thanks a lot.

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

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