#include <GUIConstants.au3> #include <Misc.au3> $win = WinGetTitle( "" ) $pos = WinGetPos( $win ) $Object = ObjCreate("iTunes.Application") $Form1 = GUICreate("auto tunes", 45, 15, $pos[2]+$pos[0]-(@DesktopWidth/10), $pos[1]+4, BitOR ($WS_POPUP,$WS_BORDER)) $Button1 = GUICtrlCreateButton("<<", 0, 0, 15, 15, 0) $Button2 = GUICtrlCreateButton(">", 15, 0, 15, 15, 0) $Button3 = GUICtrlCreateButton(">>", 30, 0, 15, 15, 0) GUISetState(@SW_SHOW) WinActivate( $win ) AdlibEnable( "move" ) While 1 $nMsg = GUIGetMsg() Select Case $GUI_EVENT_CLOSE = $nMsg Exit Case $Button1 = $nMsg Or _IsPressed("B1") $Object.PreviousTrack Case $Button2 = $nMsg Or _IsPressed("B3") $Object.PlayPause Sleep(300) Case $Button3 = $nMsg Or _IsPressed("B0") $Object.NextTrack EndSelect WEnd Func move() WinSetOnTop( HWnd($Form1), "", 1 ) $win = WinGetTitle( "" ) If $win = "Program Manager" Or $win = "Start Menu" Then WinMove( HWnd($Form1), "", @DesktopWidth-@DesktopWidth/18, @DesktopHeight-@DesktopHeight/15) ElseIf $win = "auto tunes" Or $win = "" Then ;do nothing Else $pos = WinGetPos( $win ) WinMove( HWnd($Form1), "", $pos[2]+$pos[0]-(@DesktopWidth/10), $pos[1]+4 ) EndIf EndFunc
Edited by www.CyberZeroCool.com, 25 November 2006 - 06:26 PM.




