Hendricius Posted April 4, 2006 Share Posted April 4, 2006 I am totally new to programming.I want to create a script wich switches between my 2 audio inputs, a headset and a Dolby 5.1 Surround Sound System.The Headset is named: C-MEDIA USB DEVICEThe Surround: CREATIVE SB LIVE SERIEShere 2 screenshots i took to understand it more easy:http://img97.imageshack.us/img97/9454/16ql.jpghttp://img97.imageshack.us/img97/1181/24eu1.jpgI first simply used this script:MouseClick( "left", 45,752,1,0)MouseClick( "left", 291,465,1,10)Sleep(1000)Send("{S 5}, {ENTER}")Sleep(500)MouseClick( "left", 314,186,1,10)MouseClick( "left", 458,257,1,10)MouseClick( "left", 302,285,1,10)MouseClick( "left", 454,570,1,10)MouseClick( "left", 316,569,1,10)Sleep(200)Send("!{F4}")But The Sound Window in Systemcontrols Always Moves so that doesn't work.I Tried this then: ControlClick("Eigenschaften von Sounds und Audiogeräte", "Audio", "ComboBox1"), But she script won't even run. Would be nice if you could hook me up with some hints, wich i know you guys have.Then i Discovered some more options in the AutoIT v.3 Active Window like "Hidden Window Text", but I don't know the Commands how to use that. The script must switch to the Hidden Window Text "Audio" that should propably fix my problems. What i wonderd about too is, if the Windows have coordinates in it self. Means: That whereever the Windows are, that the the coordinates in that window for buttons are the same.Feel free to add me in msn: laggingtime@hotmail.com if you want to help me or just post in this forumThanks alotHendrik Link to comment Share on other sites More sharing options...
Valuater Posted April 4, 2006 Share Posted April 4, 2006 if you want to use mouse movements... put this at the top of your script Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client 8) Link to comment Share on other sites More sharing options...
Hendricius Posted April 4, 2006 Author Share Posted April 4, 2006 thanks and what exactly does it do ? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 4, 2006 Moderators Share Posted April 4, 2006 thanks and what exactly does it do ?It's in the help file...MouseCoordMode Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:0 = relative coords to the active window1 = absolute screen coordinates (default)2 = relative coords to the client area of the active window 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...
Hendricius Posted April 4, 2006 Author Share Posted April 4, 2006 yay thanks alot guys . But where can i see the coordinates for the active window ? Link to comment Share on other sites More sharing options...
Valuater Posted April 4, 2006 Share Posted April 4, 2006 try thishttp://www.autoitscript.com/forum/index.ph...9&hl=get+color#color, coordinates etc8) Link to comment Share on other sites More sharing options...
Hendricius Posted April 4, 2006 Author Share Posted April 4, 2006 thanks alot, and my last question. It works ! No more annoying clicking How can I let a msg box pop up wich tells me what card was selected? Link to comment Share on other sites More sharing options...
Valuater Posted April 4, 2006 Share Posted April 4, 2006 what do you mean by "Card"? 8) Link to comment Share on other sites More sharing options...
Hendricius Posted April 4, 2006 Author Share Posted April 4, 2006 what do you mean by "Card"?8)the screenshots above I posted. there is one C MEDIA USB DEVICE and another one CREATIVE SB LIVE!.I want a message box to open wich tells me wich of those is selected.Thanks Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 4, 2006 Moderators Share Posted April 4, 2006 Look at ControlCommand() and "GetCurrentSelection", "" in the help file. 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...
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