LimeSeed Posted January 20, 2009 Posted January 20, 2009 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? global $warming = true
BrettF Posted January 20, 2009 Posted January 20, 2009 Well maybe you could split the image up per string? Otherwise check out using GUIGetCursorInfo. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
smashly Posted January 20, 2009 Posted January 20, 2009 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
LimeSeed Posted January 20, 2009 Author Posted January 20, 2009 thanks! made it! global $warming = true
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