Sign in to follow this  
Followers 0
realkiller

Buntons

11 posts in this topic




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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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

;<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 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 by realkiller

Share this post


Link to post
Share on other sites

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

RMP.zip

Share this post


Link to post
Share on other sites

Or you can attempt to search for Xskin by valuater in the scrips and scraps.

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#11 ·  Posted (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 by Valuater

NEWHeader1.png

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