Sign in to follow this  
Followers 0
LimeSeed

Guitar Tuner

4 posts in this topic

So i have an image of the 6 strings that i have made the background of my gui image, but how do i get it so that when i click the different strings the corresponding sounds play, is there any way to make like an invisible button?

post-24960-1232419844_thumb.jpg


global $warming = true

Share this post


Link to post
Share on other sites



Use Labels over the strings

#include <GUIConstantsEx.au3>

$hGui = GUICreate(":-D", 200, 300)
GUICtrlCreatePic(@ScriptDir & "\GuitarBoard.jpg", 0, 0, 200, 300)
GUICtrlSetState(-1, $GUI_DISABLE)
$E1 = GUICtrlCreateLabel("", 10, 0, 7, 265)
$A1 = GUICtrlCreateLabel("", 43, 0, 7, 265)
$D1 = GUICtrlCreateLabel("", 78, 0, 7, 265)
$G1 = GUICtrlCreateLabel("", 113, 0, 7, 265)
$B1 = GUICtrlCreateLabel("", 147, 0, 7, 265)
$E2 = GUICtrlCreateLabel("", 181, 0, 7, 265)
For $i = $E1 To $E2
    GUICtrlSetBkColor($i, -2)
Next    
GUISetState(@SW_SHOW, $hGui)

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $E1
            Beep(300, 600)
        Case $A1
            Beep(400, 600)
        Case $D1
            Beep(500, 600)
        Case $G1
            Beep(600, 600)
        Case $B1
            Beep(700, 600)
        Case $E2
            Beep(800, 600)
    EndSwitch
WEnd

Cheers

Share this post


Link to post
Share on other sites

thanks! made it!


global $warming = true

Share this post


Link to post
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
Sign in to follow this  
Followers 0