Jump to content

Need Help On Creating A Simple Script


Recommended Posts

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 DEVICE

The Surround: CREATIVE SB LIVE SERIES

here 2 screenshots i took to understand it more easy:

http://img97.imageshack.us/img97/9454/16ql.jpg

http://img97.imageshack.us/img97/1181/24eu1.jpg

I 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 forum

Thanks alot

Hendrik

Link to comment
Share on other sites

  • Moderators

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 window

1 = 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

  • Moderators

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

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