Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/10/2011 in all areas

  1. TarwadaC4, Perhaps like this: #include <guiconstantsex.au3> ; Create a flag which is set when the mouse if over the button $fOver = False $hGUI = GUICreate("Test", 500, 500) $hButton = GUICtrlCreateButton("Noisy", 10, 10, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton ; Play this sound when the button is pressed SoundPlay("C:WindowsMediachimes.wav") EndSwitch $aCInfo = GUIGetCursorInfo() ; If we are over the button If $aCinfo[4] = $hButton Then ; And the mouse has just gone over the button If $fOver = False Then ; Play this sound SoundPlay("C:WindowsMediatada.wav") ; But set the flag to prevent the sound playing more than once $fOver = True EndIf Else ; We are no longer over teh button so clear the flag $fOver = False EndIf WEnd Now go and read the Help file about all the functions I used. You need to look at that Help file a lot more before posting - most of the answers are in there! M23 Edit: End of the queue or what!
    1 point
  2. My advice would be to start with the examples in the Help file and learn how to structure AutoIt code. It's great you have ideas but looking back through you previous questions, they could have been avoided by looking at the examples and searching the forum. Without knowing much about AutoIt your ideas will just stay as ideas. Therefore I will provide a simple example to your question, in the hope that you will go away and study the help file. Good luck. #include <GUIConstantsEx.au3> _Main() Func _Main() Local $aArray, $hGUI, $iLabel $hGUI = GUICreate("Press Esc to Get Pos") $iLabel = GUICtrlCreateLabel("Hover over me.", 10, 10, 100) GUISetState(@SW_SHOW, $hGUI) While 1 $aArray = GUIGetCursorInfo($hGUI) If Not @error Then If $aArray[4] = $iLabel Then Beep(500, 100) ; SoundPlay or Beep. EndIf EndIf Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc ;==>_Main
    1 point
  3. TarwadaC4, Take a look at MrCreatoR's GUICtrlOnHover UDF - it lets you run functions when over a control. M23 Edit: Good evening guinness!
    1 point
  4. Look at GUIGetCursorInfo and SoundPlay. Examples can be found either on the forum or in the Help file.
    1 point
  5. Valik

    Latest Beta

    I defer these questions to trancexx since she is more familiar with the code now. I do not have issue with 64-bit hex digits being supported, however, it should probably wait until after 3.3.8. The last time somebody tried to add support for that AutoIt took a big thick one up the pooper and Jon and I were not exactly thrilled. While trancexx is a far better programmer than the person who did that... still, better safe than sorry. Also no lube.
    1 point
×
×
  • Create New...