Dizzy Posted December 3, 2005 Share Posted December 3, 2005 Hi, i'm looking for a way to get the control id or better the handle of a specific explorer window (not IE). I would start a new local explorer (run ("explorer")) but i have no unique title. So can i give or get the handle just at the start? If i say "kill explorer" i will close all other explorer Is there a little peace of code? Thx Jens Link to comment Share on other sites More sharing options...
peethebee Posted December 3, 2005 Share Posted December 3, 2005 Hi! 2 points: 1. you can change the Windows Explorer's settings in the options to start a new process for every new window. 2. check the Return vlaue of the Run function: ... Return Value Success: The PID of the process that was launched. ...Source: The official help file. You should have a look at it a bit more often... The solution looks e.g. like this: $my_explorer = Run("explorer.exe") sleep(5000) ProcessClose($myexplorer) Code not tested. I hope, it helps you, peethebee vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Link to comment Share on other sites More sharing options...
Valuater Posted December 3, 2005 Share Posted December 3, 2005 i have set the title to control it like this Run( "explorer.exe " & $temp_folder & "", "", @SW_MAXIMIZE) Sleep(500) WinWaitActive("") WinSetTitle("", "", "*XPClean Menu* - " & $Fname) 8) Link to comment Share on other sites More sharing options...
peethebee Posted December 3, 2005 Share Posted December 3, 2005 Hi! @Valuater: Does the Exporer not show the actual path in the title bar? This would mean, that changing the dir would reset your title modiffication. Moreover my solution is more secure. But nevertheless in many other cases your one would do it perfectly, Valuater. peethebee vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Link to comment Share on other sites More sharing options...
Valuater Posted December 3, 2005 Share Posted December 3, 2005 thats true... when you change "folders" that would change the title 8) Link to comment Share on other sites More sharing options...
Dizzy Posted December 4, 2005 Author Share Posted December 4, 2005 Hi, i've tried the code of peethebee and it works fine. Thx Jens Link to comment Share on other sites More sharing options...
peethebee Posted December 4, 2005 Share Posted December 4, 2005 Hi! I'm pleased that I could help. Reading the help file completely could have probably avoided this question... But anyway, stay with AutoIt. peethebee vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now