realkiller Posted November 16, 2006 Share Posted November 16, 2006 i dont know if this is a dumb question but how can i change a bunton (normal syle), i wanna make my own buntons with pictures that i created using photshop how can i do that? Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
Rad Posted November 16, 2006 Share Posted November 16, 2006 Bunton = Button? (Its pretty bad if you spelled that wrong and you didnt in your code :S) I suggest using GUICtrlCreatePic() rather than a button, it still sends $msg when its clicked on. I could help you with making it 'glow' or whatever when you hover over it, even with sounds if you want to get that deep into it. And someone made a suggestion for using images as buttons, putting a label over them so you still can write text. Whether your buttons have or dont have text.. idk... but you can figure that out Link to comment Share on other sites More sharing options...
realkiller Posted November 16, 2006 Author Share Posted November 16, 2006 (edited) can you make a example please with code for hover/onclick and sound that would be great if you could do that that is my code what i have until now expandcollapse popup;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< login 24 Help tool >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Local $Password = "timmy" Do $sPass = InputBox("Security Check", "Enter your password:", "", "*") If $sPass = $Password Then MsgBox(0, "Access Granted", "Thank you, you have logged in successfully.", 1) Else MsgBox(0, "Access Denied", "Sorry, you did not enter the correct password." & @CRLF & "Try Again.") EndIf Until $sPass = $Password ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< login 24 Help tool >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #include <GUIConstants.au3> Opt("WinTitleMatchMode", 2) GUICreate("24 Help V1.2", "956", "24", "", "", $WS_POPUPWINDOW, $WS_EX_TOPMOST) GUISetHelp("notepad") $ISIS = GUICtrlCreateButton("ISIS", 22, -1, 85, 25, 0) $Rollercoaster = GUICtrlCreateButton("Rollercoaster",128, -1, 95, 25, 0) $SupportCenter = GUICtrlCreateButton("Support Center", 244, -1, 95, 25, 0) $CSpire = GUICtrlCreateButton("C-Spire", 360, -1, 85, 25, 0) GUICtrlCreateDate(@YEAR & "/" & @MON & "/" & @MDAY, 448, -1, 185) $Avaya = GUICtrlCreateButton("Avaya", 658, -1, 85, 25, 0) $Clairify = GUICtrlCreateButton("Clairify", 763, -1, 85, 25, 0) $Lotus = GUICtrlCreateButton("Lotus", 871, -1, 85, 25, 0) $Pic1 = GUICtrlCreatePic(@ScriptDir & "\rood.gif", 2, 1, 21, 21) $Pic2 = GUICtrlCreatePic(@ScriptDir & "\rood.gif", 108, 1, 21, 21) $Pic3 = GUICtrlCreatePic(@ScriptDir & "\rood.gif", 224, 1, 21, 21) $Pic4 = GUICtrlCreatePic(@ScriptDir & "\rood.gif", 340, 1, 21, 21) $Pic4 = GUICtrlCreatePic(@ScriptDir & "\rood.gif", 637, 1, 21, 21) $Pic4 = GUICtrlCreatePic(@ScriptDir & "\rood.gif", 742, 1, 21, 21) $Pic4 = GUICtrlCreatePic(@ScriptDir & "\rood.gif", 849, 1, 21, 21) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $ISIS Run("Notepad.exe") GUICtrlSetImage($Pic1,@ScriptDir & "\groen.gif") Case $Rollercoaster Run("Calc.exe") GUICtrlSetImage($Pic2,@ScriptDir & "\groen.gif") Case $SupportCenter Run("Freecell.exe") GUICtrlSetImage($Pic3,@ScriptDir & "\groen.gif") Case $CSpire Run("MSPaint.exe") GUICtrlSetImage($Pic4,@ScriptDir & "\groen.gif") Case $Avaya GUICtrlSetImage($Pic4,@ScriptDir & "\groen.gif") Case $Clairify GUICtrlSetImage($Pic4,@ScriptDir & "\groen.gif") Case $Lotus GUICtrlSetImage($Pic4,@ScriptDir & "\groen.gif") EndSwitch If Not ProcessExists("Notepad.exe") Then GUICtrlSetImage($Pic1,@ScriptDir & "\rood.gif") If Not ProcessExists("Calc.exe") Then GUICtrlSetImage($Pic2,@ScriptDir & "\rood.gif") If Not ProcessExists("Freecell.exe") Then GUICtrlSetImage($Pic3,@ScriptDir & "\rood.gif") If Not ProcessExists("MSPaint.exe") Then GUICtrlSetImage($Pic4,@ScriptDir & "\rood.gif") WEnd Edited November 16, 2006 by realkiller Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
Rad Posted November 16, 2006 Share Posted November 16, 2006 Its a bit strange and flickery but you get the idea right? I changed all the 'rood' to 'red' and 'groen' to 'green', you can change those back if you speak a different language or something, it confused me though lol Heres a media player i started and never finished, it has image and sound effects check it out: (Put rad.au3 into your autoit3/beta/include folder) Feel free to laugh at my terribly unorganized code =)buntons_lol.zipRMP.zip Link to comment Share on other sites More sharing options...
realkiller Posted November 16, 2006 Author Share Posted November 16, 2006 thx for your help so far but one more thing the case function doesnt work anymore if i click on a bunton that i madeit doesnt open for exaple notepad.exe Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
Paulie Posted November 16, 2006 Share Posted November 16, 2006 thx for your help so far but one more thing the case function doesnt work anymore if i click on a bunton that i madeit doesnt open for exaple notepad.exeLets Double Post!!!!http://www.autoitscript.com/forum/index.php?showtopic=36359 Link to comment Share on other sites More sharing options...
realkiller Posted November 16, 2006 Author Share Posted November 16, 2006 that wont help me;( Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 16, 2006 Share Posted November 16, 2006 Or you can attempt to search for Xskin by valuater in the scrips and scraps. Link to comment Share on other sites More sharing options...
Valuater Posted November 16, 2006 Share Posted November 16, 2006 (edited) Actually there is a way to handle this with _ControlHover() there are many demos and one great one by Dhilip see "All My Programs" in my signature below 8) Edited November 16, 2006 by Valuater Link to comment Share on other sites More sharing options...
Rad Posted November 17, 2006 Share Posted November 17, 2006 if _ControlHover does what it sounds like, moves the mouse over a control... that isnt helpful... But otherwise isnt it the same as this: Func _ControlIsActive($vControl) Local $temp $temp = GUIGetCursorInfo() If $vControl = $temp[4] Then Return 1 Else Return 0 EndIf EndFunc Func _ControlGetActive() Local $temp $temp = GUIGetCursorInfo() Return $Temp[4] EndFunc Just if _controlgetactive() = $button then highlightbutton() Same thing for the sound Link to comment Share on other sites More sharing options...
Valuater Posted November 18, 2006 Share Posted November 18, 2006 (edited) if _ControlHover does what it sounds like, moves the mouse over a control... that isnt helpful... But otherwise isnt it the same as this: Func _ControlIsActive($vControl) Local $temp $temp = GUIGetCursorInfo() If $vControl = $temp[4] Then Return 1 Else Return 0 EndIf EndFunc Func _ControlGetActive() Local $temp $temp = GUIGetCursorInfo() Return $Temp[4] EndFunc Just if _controlgetactive() = $button then highlightbutton() Same thing for the sound 1 No _ControlHover() does NOT move the mouse over a control 2 _ControlHover() will tell you when the mouse.... A is over a control B has left the control C Has clicked on a control D has released the click on a control 3 _ControlHover() will find "1" control out of all the added controls that did the above #2 4 If I have explained this correctly, you will understand why your above code is NOT similar 8) Edited November 18, 2006 by Valuater 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