Madza91 Posted November 21, 2007 Share Posted November 21, 2007 How to detect MouseUp ??? Is possible? [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Nahuel Posted November 21, 2007 Share Posted November 21, 2007 You mean.. how to know if the mouse has moved upwards? Link to comment Share on other sites More sharing options...
Madza91 Posted November 21, 2007 Author Share Posted November 21, 2007 i don't know [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Nahuel Posted November 21, 2007 Share Posted November 21, 2007 You don't know what you want..? Link to comment Share on other sites More sharing options...
NELyon Posted November 21, 2007 Share Posted November 21, 2007 He means if the mouse is clicked down, to detect when the person releases the button... I think Link to comment Share on other sites More sharing options...
Madza91 Posted November 21, 2007 Author Share Posted November 21, 2007 ;/ man.. i not speak english very well and not understand all ... i want to click on the pic. and when let the mouse to make another button or to show hiden... look this: expandcollapse popup#include <GUIConstants.au3> $GUI = GUICreate("My GUI") $ic = GUICtrlCreatePic("1.jpg",0,0,100,23) GUICtrlSetState(-1, $GUI_DISABLE) $b = GUICtrlCreatePic("2.jpg",0,0,100,23) GUICtrlSetState(-1,$GUI_HIDE) $2 = GUICtrlCreatePic("3.jpg",0,0,100,23) GUICtrlSetState(-1,$GUI_HIDE) GUISetState() While 1 $m = GUIGetMsg() If $m = -3 then Exit $c = GUIGetCursorInfo($GUI) If $c[4] = $ic Then GUICtrlSetState( $b, $GUI_SHOW) GUICtrlSetState( $ic, $GUI_HIDE) ;Sleep(100) $c = GUIGetCursorInfo($GUI) While $c[4] = $b If GUIGetMsg() = $b Then Do_Function() $c = GUIGetCursorInfo($GUI) WEnd GUICtrlSetState( $2, $GUI_HIDE) GUICtrlSetState( $b, $GUI_HIDE) GUICtrlSetState( $ic, $GUI_SHOW) EndIf WEnd Func Do_Function() GUIGetCursorInfo($GUI) GUICtrlSetState( $2, $GUI_SHOW) MsgBox(0x0, "tset", "OK..... ", 3) EndFunc but in this code is when click you see msg but i want to see msg when let the left click, understand me ? :| [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Nahuel Posted November 21, 2007 Share Posted November 21, 2007 ;Detect if mouse moves upwards: $OriginalPos=MouseGetPos(1) While 1 $newPos=MouseGetPos(1) If $newPos < $OriginalPos Then MsgBox(0,"","UP!") $OriginalPos=MouseGetPos(1) Else $OriginalPos=MouseGetPos(1) EndIf Sleep(25) WEnd ;Detect if mouse primary button was released: #include <Misc.au3> While 1 If _IsPressed(01) Then Do Sleep(25) Until Not _IsPressed(01) MsgBox(0,"","Mouse button released!") EndIf WEnd Link to comment Share on other sites More sharing options...
Madza91 Posted November 21, 2007 Author Share Posted November 21, 2007 ... no mouse up .. MouseUp("left") to detect when is not pushed left click enymore :/ [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Nahuel Posted November 21, 2007 Share Posted November 21, 2007 Did you see the second code? expandcollapse popup#include <GUIConstants.au3> #include <Misc.au3> $GUI = GUICreate("My GUI") $ic = GUICtrlCreatePic("1.jpg",0,0,100,23) GUICtrlSetState(-1, $GUI_DISABLE) $b = GUICtrlCreatePic("2.jpg",0,0,100,23) GUICtrlSetState(-1,$GUI_HIDE) $2 = GUICtrlCreatePic("3.jpg",0,0,100,23) GUICtrlSetState(-1,$GUI_HIDE) GUISetState() While 1 $m = GUIGetMsg() If $m = -3 then Exit $c = GUIGetCursorInfo($GUI) If $c[4] = $ic Then GUICtrlSetState( $b, $GUI_SHOW) GUICtrlSetState( $ic, $GUI_HIDE) ;Sleep(100) $c = GUIGetCursorInfo($GUI) While $c[4] = $b If GUIGetMsg() = $b Then Do_Function() $c = GUIGetCursorInfo($GUI) WEnd GUICtrlSetState( $2, $GUI_HIDE) GUICtrlSetState( $b, $GUI_HIDE) GUICtrlSetState( $ic, $GUI_SHOW) EndIf WEnd Func Do_Function() GUIGetCursorInfo($GUI) GUICtrlSetState( $2, $GUI_SHOW) _MouseUp() MsgBox(0x0, "tset", "OK..... ", 3) EndFunc ;Detect if mouse primary button was released: Func _MouseUp() While 1 If _IsPressed(01) Then Do Sleep(25) Until Not _IsPressed(01) Return EndIf WEnd EndFunc You fix it so it works only for your script. Chiitus 1 Link to comment Share on other sites More sharing options...
Madza91 Posted November 21, 2007 Author Share Posted November 21, 2007 Im so stupid... ... tnx man [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Nahuel Posted November 21, 2007 Share Posted November 21, 2007 haha, you are not stupid man Glad it works. Link to comment Share on other sites More sharing options...
Madza91 Posted November 21, 2007 Author Share Posted November 21, 2007 me too tnx one more time [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
lian Posted November 29, 2007 Share Posted November 29, 2007 Great ! I was searching for a thing like this. Thank you Nahuel. French user - my blog: http://li.an.free.fr/blog 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