Jani S. Posted April 18, 2006 Share Posted April 18, 2006 (edited) Hi you all gurus, I just can't figure it out myself how to use ControlID or CalssNameNN to cotrol for example Windows Media Player. The thing I'd like to do is that I want to use either one of ClassName or ControlID to locate what button will "pressed" next from script. This is what I want to do (example): - Open Media Player Classic (or some other program) - Press File from to menu (CalssName is ScrollBar1) --> Press Open File from menu(ClassName is Edit1) BR, Jani Ps. the topic should be saying: Just Can't Figure Out How To Use CLassNameNN Or ControlID From Script Had one script running background when is was writing topic so it got messed up... Edited April 18, 2006 by Jani S. Link to comment Share on other sites More sharing options...
jefhal Posted April 18, 2006 Share Posted April 18, 2006 Just Can't Figure Out How To Use CLassNameNN Or ControlID From ScriptFirst you want to use the "AutoIt v3 Active Window Info" program that is installed with AutoIt3. Use that to find the Window name, button names, control id's etc. However, with Media Player Classic, all you need to do is send a CTRL-O to open a file dialog: run("c:\program files\media player classic") winwait("Media Player Classic") send("^O") msgbox(1,"Notice","Did it!") To send a controlclick to a button, you can try this: ;run("c:\program files\mediaplayerclassic\mpc.exe");run media player classic - use your path ;winwait("Media Player Classic"); wait until it's open WinActivate("Media Player Classic"); bring up the mpc screen if it's not already up Send("!vO") WinWait("Options") for $i = 1 to 10 controlclick("Options","Open options",1044) Sleep(500) controlclick("Options","Open options",1045) Next ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
Jani S. Posted April 18, 2006 Author Share Posted April 18, 2006 First you want to use the "AutoIt v3 Active Window Info" program that is installed with AutoIt3. Use that to find the Window name, button names, control id's etc. However, with Media Player Classic, all you need to do is send a CTRL-O to open a file dialog: run("c:\program files\media player classic") winwait("Media Player Classic") send("^O") msgbox(1,"Notice","Did it!") To send a controlclick to a button, you can try this: ;run("c:\program files\mediaplayerclassic\mpc.exe");run media player classic - use your path ;winwait("Media Player Classic"); wait until it's open WinActivate("Media Player Classic"); bring up the mpc screen if it's not already up Send("!vO") WinWait("Options") for $i = 1 to 10 controlclick("Options","Open options",1044) Sleep(500) controlclick("Options","Open options",1045) Next Wow, that was fast Now I get it. It was simple as I first thought, but went to wrong direction... Thanks alot! BR, Jani 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