corganno Posted October 11, 2008 Share Posted October 11, 2008 the other day i was looking around the forms and i found a program called Follower.exe. it makes a little tan box follow your courser. i want the sorce code because i want to play around with it. maby change color? anyone have sorce code? evryones retarded, but its how retarded that makes us different Link to comment Share on other sites More sharing options...
martin Posted October 11, 2008 Share Posted October 11, 2008 the other day i was looking around the forms and i found a program called Follower.exe. it makes a little tan box follow your courser. i want the sorce code because i want to play around with it. maby change color? anyone have sorce code?It sounds quite simple. Create a popup winwdow, set the background colour to what you want, keep getting the mouse position and WInMove the popup window to be some distance from the cursor. #include <windowsconstants.au3> $g = GUICreate("",30,30,0,0,$WS_POPUP) GUISetBkColor(0xffaa00) GUISetState() WinSetTrans($g,"",120) while 1 $mp = MouseGetPos() winmove($g,"",$mp[0] + 10,$mp[1] + 20) WEnd Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Innovative Posted October 12, 2008 Share Posted October 12, 2008 I dont really think you can find the source here.. How did you know it was made in autoit o.O Link to comment Share on other sites More sharing options...
martin Posted October 12, 2008 Share Posted October 12, 2008 (edited) good, but the box moves at a certen speed and will only go up/down and diagonal like its chaseing your mouse but you can outrun itSomething like this perhaps. expandcollapse popup;by martin for Nahuel, modified to make icon chase the cursor #include <GuiConstants.au3> #include <windowsconstants.au3> Global Const $WS_EX_COMPOSITED = 0x2000000 Const $maxx = 2, $maxy = 2;<- change to affect speed HotKeySet("{ESC}", "QuitApp") Global $Startx, $Starty, $Endx, $Endy, $aM_Mask, $aMask, $nc Global $gw=192,$gh=110 $Main_Gui = GUICreate("nahuel", $gw, $gh, 100, 20, $WS_POPUP, BitOr($WS_EX_COMPOSITED,$WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) GUICtrlCreatePic("au301.bmp",0,0,192,110,-1);,$GUI_WS_EX_PARENTDRAG) Opt("PixelCoordMode", 2) GUISetState() setTrans() WinSetTrans("nahuel","",170) $lastPos = MouseGetPos() winmove($Main_Gui,"",$lastPos[0] + 15,$lastPos[1] + 25) adlibenable("chase",12);<--change to affect speed While 1 $Msg = GUIGetMsg() Switch $Msg Case - 3 Exit EndSwitch WEnd Func setTrans() $aM_Mask = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", 460, "long", 460) $rct = DllStructCreate("int;int;int;inr", $aM_Mask[0]) $TestCol = PixelGetColor(1, 1);<----------------------------set coords for your test colour here ;anything on the window which is the same colour as $TestCol will become transparent $Startx = -1 $Starty = -1 $Endx = 0 $Endy = 0 For $i = 0 To $gw;the window width For $j = 0 To $gh;the window height If PixelGetColor($i, $j) = $TestCol And $j < $gh Then If $Startx = -1 Then;start a new region $Startx = $i $Starty = $j $Endx = $i $Endy = $j Else;region already started so extend the end $Endx = $i $Endy = $j EndIf Else;not testcol or at end of line If $Startx <> -1 Then addRegion() $Startx = -1 $Starty = -1 EndIf Next Next DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $Main_Gui, "long", $aM_Mask[0], "int", 1) EndFunc;==>setTrans Func addRegion() $aMask = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", $Startx, "long", $Starty, "long", $Endx + 1, "long", $Endy + 1) $nc += 1 ConsoleWrite($nc & ', ') DllCall("gdi32.dll", "long", "CombineRgn", "long", $aM_Mask[0], "long", $aMask[0], "long", $aM_Mask[0], "int", 3) EndFunc;==>addRegion Func QuitApp() Exit EndFunc;==>QuitApp func chase() $mp = MouseGetPos() $newx = $mp[0] + 15 if Abs($newx - $lastpos[0]) > $maxx Then $newx = $lastpos[0] + $maxx * ($newx - $lastpos[0])/(Abs($newx - $lastpos[0])) $newx = Int($newx) EndIf $newy = $mp[1] + 25 if Abs($newy- $lastpos[1]) > $maxy Then $newy = $lastpos[1] + $maxy * ($newy - $lastpos[1])/(Abs($newy - $lastpos[1])) $newy = int($newy) EndIf if $newx <> $lastpos[0] Or $newy <> $lastpos[1] then winmove($Main_Gui,"",$newx,$newy) $lastPos[0] = $newx $lastPos[1] = $newy EndFunc You need this bitmap in the script folder. EDIT:Changed to use the AutoIt icon Edited October 12, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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