Jump to content

Path of active window


Recommended Posts

I would like to get the path of an active window!

This quote is an update - 6th July 2006

The active window is an open folder, not a program ... so I need the path of the folder returned!

This may or may not be available as part of the window text (depending on a user's folder options).

I know how to get the name of the active window, but cannot find a method to determine it's path.

I need this for a current update to my 'Context Options' program, so that a user could set a hotkey to call up a dialog to create a folder (or folders, etc) in the currently active window.

ANY HELP WOULD BE GREATLY APPRECIATED!

Context Options

Maybe a new function - 'WinGetPath', would be a great idea ... anybody feel clever enough!

Please note, that I only give kisses to women & children!

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

I can't test this at the moment but I think you have to get the window handel and use that to get the processhandel and then get information about the process. Somewhere in-there you should get the full path and commandline to the process running the window. :D

Link to comment
Share on other sites

Thanks Uten & gafrost

Have Done & will do!

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

This did not quite supply what I needed - see my comments

Path of an open/existing window

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Still no success here!

See the latest tries, etc here

Path of an open/existing window

Gee it doesn't take long to get buried pages deep here!

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

The first post has an added quote, so that people can see at first glance what I require ... there seems to be some misunderstanding over the type of window ... nearly all answers so far talk about a program window (such as notepad).

I wish that Explorer.exe returned a path for a specific window ... kind of like the way it's been suggested that notepad does.

ALL & ANY HELP, IDEAS, ETC is always appreciated!

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Explorer->tools->Folder Options->view->Display the full path in titlebar ???

Thanks Uten

You are perfectly correct ... however, you probably missed this line in my first post -

This may or may not be available as part of the window text (depending on a user's folder options).

Further to that, I've gone ahead and completed my program, that relies on the user having their full path in the address bar (same scenario as titlebar ... I personally only have it displayed in the address bar, but each to their own). If the program doesn't find a ":" as the second character in the title name, then the user is prompted to change their settings. This works, but is not in my opinion very professional.

I'll post my program, and an even more exciting offshoot, when I can get some more space here at the forum, or if I can get my homepage to tell me how many times my programs are being downloaded.

Hopefully I have enough space, so that I can update the version of my Context Options program, which is the main program in question above?

For those who have been folowing this post, or who have indeed downloaded an earlier version of my program, they might like to see the finished (but hopefully not final) version ... which has many improvements, and mostly works quite well.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Probably a stupid idea, but couldn't you just GuiCtrlRead the combobox called "Address"?

Alzo

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

Probably a stupid idea, but couldn't you just GuiCtrlRead the combobox called "Address"?

Alzo

Thanks marfdaman

But errrrr, please read the above again, it says -

Further to that, I've gone ahead and completed my program, that relies on the user having their full path in the address bar (same scenario as titlebar ... I personally only have it displayed in the address bar, but each to their own).

I think you'll find that even though you call it a combo, and it looks like one, my code says something like "Edit1" - this is gleaned using the AutoIt Window Info program!

But hey thanks for taking the time!

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Sorry, missed that :

That's OK man!

HAPPY CODING!

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

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