davidkim Posted December 2, 2012 Share Posted December 2, 2012 (edited) Smart phone style background png slide....mouse drag move left / rightslide.... slide3.zipbug patch => right move ...image blank..Edit Funcexpandcollapse popupFunc WM_SETCURSOR($hWnd, $iMsg, $iWParam, $iLParam) $iLParamhigh = BitShift($iLParam, 16) ;HiWord $iLParamlow = BitAND($iLParam, 0x0000FFFF) ;LoWord If $hWnd = $GUI And $iLParamlow = 1 And $iLParamhigh > 512 Then Switch $iLParamhigh Case $WM_LBUTTONDOWN If $now_xPos > 1920 Then $now_xPos -= 1680 $np2 = $now_xPos Case $WM_LBUTTONUP If $np2 > 1920 Then $np2 -= 1680 If $np2 < -240 Then $np2 += 1680 $now_xPos = $np2 ;Next mouse button down .... $x1 = 0 $x2 = 0 EndSwitch EndIf EndFunc ;==>WM_SETCURSOR Func _freeView($x1) If $x1 <> $thisXpos Then $thisXpos = $x1 Local $hGraphic, $hImage $hImage = _GDIPlus_ImageClone($gui_png) $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage) If $x2 = 0 Then $x2 = $x1 ; first click is non action If $x2 > $x1 Then $gap = $x2 - $x1 $x2 = $x1 $np2 += $gap; int( Round($gap * 2,0) ) < ==move speed.. $now_xPos = $np2 ; now background position backup ElseIf $x2 < $x1 Then $gap = $x1 - $x2 $x2 = $x1 $np2 -= $gap $now_xPos = $np2 ; now background position backup ElseIf $x1 = $x1 Then ConsoleWrite(' first click' & @CRLF) EndIf If $np2 > (1680-240) Then ; // if background move left..over $new = $np2 - 1680 ;; background position is over background width _GDIPlus_GraphicsDrawImageRectRect($hGraphic, $slide_png, $np2, 0, 240, 337, 26, 84, 240, 337) _GDIPlus_GraphicsDrawImageRectRect($hGraphic, $slide_png2, $new, 0, 240, 337, 26, 84, 240, 337) ElseIf $np2 > -1679 Then ; // if background move right..over $minusX = 1680 $new = $np2 + $minusX ConsoleWrite('$np2:' & $np2 & ' new:' & $new & @CRLF) _GDIPlus_GraphicsDrawImageRectRect($hGraphic, $slide_png, $np2, 0, 240, 337, 26, 84, 240, 337) _GDIPlus_GraphicsDrawImageRectRect($hGraphic, $slide_png2, $new, 0, 240, 337, 26, 84, 240, 337) Else _GDIPlus_GraphicsDrawImageRectRect($hGraphic, $slide_png, $np2, 0, 240, 337, 26, 84, 240, 337) EndIf _WinAPI_UpdateLayeredWindowEx($GUI, _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage), 255, 1) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hImage) EndIf EndFunc ;==>_freeViewchange this func.....add code... If $np2 < -240 Then $np2 += 1680change code... ElseIf $np2 > -1679 Then ; // if background move right..over Edited December 3, 2012 by davidkim I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks. Link to comment Share on other sites More sharing options...
wakillon Posted December 2, 2012 Share Posted December 2, 2012 Interesting ! but drag and move fails... it return to background 1 if i click on background 2 or 7 AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
davidkim Posted December 2, 2012 Author Share Posted December 2, 2012 Interesting !but drag and move fails...it return to background 1 if i click on background 2 or 7 test by windows 7 ... test ok...are your use os? I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks. Link to comment Share on other sites More sharing options...
wakillon Posted December 2, 2012 Share Posted December 2, 2012 I'm on Win 7 too Is there a Mouse position ( x, y ) for drag and move I have succeed to go to the third background but laboriously ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
davidkim Posted December 3, 2012 Author Share Posted December 3, 2012 bug patch func new write.......top post view... I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks. Link to comment Share on other sites More sharing options...
wakillon Posted December 3, 2012 Share Posted December 3, 2012 bug patch func new write.......top post view...Always drag and move problems mainly with touch pad. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
davidkim Posted December 4, 2012 Author Share Posted December 4, 2012 Always drag and move problems mainly with touch pad. do not test was touch pad..this source is mouse drag / mouse up / mouse down sample.... I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks. 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