Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #Region ### START Koda GUI section ### Form=
- #Include <Misc.au3> ;Pour _IsPressed
- #include <WindowsConstants.au3>
- $a = 0
- $b = 0
- $left = 100
- $up = 100
- $droid = @ScriptDir &"\android.jpg"
- $Form1 = GUICreate("Form1", 250, 350, 350, 200, BitOR($WS_POPUP,$WS_CLIPSIBLINGS))
- $Pic1 = GUICtrlCreatePic($droid, $left, 100, $up, 100)
- GUISetState(@SW_SHOW)
- GUISetState (@SW_MAXIMIZE, $Form1)
- GUISetBkColor(0x000000)
- HotKeySet("$","stop")
- While 1
- If _IsPressed("25") Then _gauche() ;
- If _IsPressed("27") Then _droite()
- If _IsPressed("26") Then _haut()
- If _IsPressed("28") Then _bas()
- WEnd
- Func stop()
- Exit
- EndFunc
- func _bas()
- $up = $up+10
- GUICtrlSetPos($pic1,$left,$up)
- Sleep(1)
- If $up = 770 Then
- $up = 0
- GUICtrlSetPos($pic1,$left,$up)
- Sleep(1)
- Else
- EndIf
- EndFunc
- Func _haut()
- $up = $up-10
- GUICtrlSetPos($pic1,$left,$up)
- Sleep(1)
- If $up = 0 Then
- $up = 770
- GUICtrlSetPos($pic1,$left,$up)
- Sleep(1)
- Else
- EndIf
- EndFunc
- Func _droite()
- $left = $left+10
- GUICtrlSetPos($pic1,$left,$up)
- Sleep(1)
- If $left = 1020 Then
- $left = 0
- GUICtrlSetPos($pic1,$left,$up)
- Sleep(1)
- Else
- EndIf
- EndFunc
- Func _gauche()
- $left = $left-10
- GUICtrlSetPos($pic1,$left,$up)
- Sleep(1)
- If $left = 0 Then
- $left = 1020
- GUICtrlSetPos($pic1,$left,$up)
- Sleep(1)
- Else
- EndIf
- EndFunc
- ;telecharger l'image android pour que sa marche.:http://www.2shared.com/photo/cT8G6tr-/android.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement