Valuater Posted June 8, 2005 Posted June 8, 2005 when program is ran.. it looks like this when you pass-over it with the mouse... it look like this as you can see this really screws things up is there anything that i can do... a function ????... anything hhheeeellllpppp!!!!!!! 8)
GaryFrost Posted June 8, 2005 Posted June 8, 2005 (edited) Might try labels for the keys behind, it's brutal but might work Example: #include <GUIConstants.au3> GUICreate("My GUI color text"); will create a dialog box that when displayed is centered $Label_1 = GUICtrlCreateLabel("Label1", 180, 100, 40, 170, $SS_SUNKEN + $SS_CENTER, $WS_EX_TRANSPARENT ) $Label_2 = GUICtrlCreateLabel("Label2", 250, 100, 40, 170, $SS_SUNKEN + $SS_CENTER, $WS_EX_TRANSPARENT ) $Button_1 = GUICtrlCreateButton("Button1", 130, 150, 170, 40, $BS_BOTTOM + $BS_CENTER, $WS_EX_TOPMOST) GUISetState() _MouseOver($Button_1) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $Button_1 ConsoleWrite("Selected Button 1" & @LF) Case $msg = $Label_1 ConsoleWrite("Selected Label 1" & @LF) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Func _MouseOver($h_controlID) Dim $opt = Opt("MouseCoordMode",2) Dim $pos = ControlGetPos ( "My GUI color text", "", $h_controlID ) MouseMove($pos[0] + 5, $pos[1] + 5,0) Opt("MouseCoordMode",$opt) EndFunc Edited June 8, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Valuater Posted June 8, 2005 Author Posted June 8, 2005 great effort gafrost....i mean really an effort and i appreciate it but... wow, there are lots of keys to work with - play sounds do actions and ... you know..... and like you said "it's brutal but might work" i would think somebody has made a keyboard before?????? maybe we need to develop a function or ???? in 3.1.1+++ thanks again for trying so hard 8)
GaryFrost Posted June 8, 2005 Posted June 8, 2005 No problem, just put the top buttons before the behind buttons, played with it some more, had bleed through of the labels. $Button_1 = GUICtrlCreateButton("Button1", 130, 150, 170, 40, $BS_BOTTOM + $BS_CENTER) $Label_1 = GUICtrlCreateLabel("Label1", 180, 100, 40, 170, $SS_SUNKEN + $SS_CENTER ) $Label_2 = GUICtrlCreateLabel("Label2", 250, 100, 40, 170, $SS_SUNKEN + $SS_CENTER ) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Valuater Posted June 8, 2005 Author Posted June 8, 2005 i tried the easy way out with this GUICtrlSetState($button_1,$GUI_SHOW) GUICtrlSetState($button_2,$GUI_SHOW) GUICtrlSetState($button_3,$GUI_SHOW) GUICtrlSetState($button_4,$GUI_SHOW) GUICtrlSetState($button_5,$GUI_SHOW) GUICtrlSetState($button_6,$GUI_SHOW) GUICtrlSetState($button_7,$GUI_SHOW) GUICtrlSetState($button_8,$GUI_SHOW) GUICtrlSetState($button_9,$GUI_SHOW) GUICtrlSetState($button_10,$GUI_SHOW) because there are 10 upper/black keys...i put this is the loop... *****ugly***** didnt work
buzz44 Posted June 8, 2005 Posted June 8, 2005 Try refreshing the whole GUI? GUISetState(@SW_SHOW) qq
Valuater Posted June 8, 2005 Author Posted June 8, 2005 Try refreshing the whole GUI?GUISetState(@SW_SHOW)<{POST_SNAPBACK}>Nopper....... but thx 8(
Valuater Posted June 8, 2005 Author Posted June 8, 2005 bumping my head against the wall...........help
TuMbLeWeEd Posted June 8, 2005 Posted June 8, 2005 bumping my head against the wall...........help<{POST_SNAPBACK}>When you have overlapping buttons this will always occur2 solutions:1) split up your bottons, so your white buttons become in fact 2 buttonsI you get my point:All buttons same heigth as the black ones, and fit a row of whites unther themthen you wil have no overlapping buttons, but it will show as a dirty line2) A simple image and one event on mouse down, on the possition of the mouse you determen wich "button" is clicked ("this is mucho trial and error")can be done with an array$BottonArray[$numberoff_buttons - 1][5] representing:$BottonArray[0][0] = note_to_play$BottonArray[0][1] = Xpoint$BottonArray[0][2] = Ypoint$BottonArray[0][3] = Width$BottonArray[0][4] = HeigthAs the black buttons are smaler then the white ones you have to look for the smalest aerea that does comply to your x and y params from the mouse (or split the button's aerea again the same as in the first solution, 2 aerea's for the white buttons)It can be done Hope i explained it a bit so you can understand it (i'm crappy at explaining things) My AutoIt stuffChatBichProjectSelectorWindow control grabberUsefull LinksPort forwarding with routers
Valuater Posted June 8, 2005 Author Posted June 8, 2005 thank you tumbleweed... i tried the first idea before.. and tried to cover the "dirty lines" with labels... but, didn't work i am working on expanding the label idea from gafrost right now... but.... should i need to , i will try the Array idea.... i made need help on this later because i am not effecient with arrays as yet thanks again... 8)
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