Saeljfkklhen Posted December 3, 2006 Share Posted December 3, 2006 Hiya! I just stumbled across this language and it caught my eye. I'm new to it so bear with me Is there any way to preform a function along the lines of "WinActivate", like possibly a "ProcessActivate" function that works off of the Process ID instead of the name of the process? My problem is the (my first really) script i'm trying to iron out will have multiple instances of the same executable, and also separate executables with no discernable differences (None that I could find with the AutoIt Window tool...) So I was wondering, is it possible to refer to a process by its ID? I found "_ProcessGetName" but it seems to me as if that wouldn't help after the fact. Also, is there any way to determine when a program would be ready to accept input? As in, "WinWaitActive" almost works, yet on good occasion there is a period of "lag" that i'm unable to predict in length. The only workaround I have found is to just add an extra "Sleep" for 10 seconds or so... So I know I might be asking alot here, but could someone help me out? Please? Link to comment Share on other sites More sharing options...
jpm Posted December 3, 2006 Share Posted December 3, 2006 Hiya! I just stumbled across this language and it caught my eye. I'm new to it so bear with me Is there any way to preform a function along the lines of "WinActivate", like possibly a "ProcessActivate" function that works off of the Process ID instead of the name of the process? My problem is the (my first really) script i'm trying to iron out will have multiple instances of the same executable, and also separate executables with no discernable differences (None that I could find with the AutoIt Window tool...) So I was wondering, is it possible to refer to a process by its ID? I found "_ProcessGetName" but it seems to me as if that wouldn't help after the fact.Also, is there any way to determine when a program would be ready to accept input? As in, "WinWaitActive" almost works, yet on good occasion there is a period of "lag" that i'm unable to predict in length. The only workaround I have found is to just add an extra "Sleep" for 10 seconds or so...So I know I might be asking alot here, but could someone help me out? Please? In fact PID cannot select the right windows. You have to use WinGetHandle of the appropriate windows corresponding to your process and just use it in your Win... functions. Link to comment Share on other sites More sharing options...
theguy0000 Posted December 3, 2006 Share Posted December 3, 2006 since one process can have multiple windows, it is not possible to choose a window just by giving the PID The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 3, 2006 Moderators Share Posted December 3, 2006 http://www.autoitscript.com/forum/index.ph...st&p=254077 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 More sharing options...
jpm Posted December 3, 2006 Share Posted December 3, 2006 http://www.autoitscript.com/forum/index.ph...st&p=254077Pretty good if really needed Link to comment Share on other sites More sharing options...
theguy0000 Posted December 3, 2006 Share Posted December 3, 2006 http://www.autoitscript.com/forum/index.ph...st&p=254077cool The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Helge Posted December 3, 2006 Share Posted December 3, 2006 http://www.autoitscript.com/fileman/users/Helge/udfs/_ProcessGetHWnd.au3 is a UDF I made once for issues like this. It can return HWnds forall of the process' windows or it can return a single one. You can also specify a titleto match. 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