HardCopy Posted June 20, 2005 Share Posted June 20, 2005 Ive got a Button thats a little tricky to click on! expandcollapse popup;;; Requires Autoit Beta 3.1.1.48 ;;; Created : June2005 - HardCopy ;;; Unclickable Ok Button #include <GuiConstants.au3> l Opt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client dim $pos , $mxc , $myc, $bxc=115, $byc=260 GuiCreate("Chase ME", 300, 300,150,150 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $button_1 = GUICtrlCreateButton("Ok", $bxc, $byc, 75, 25) GUISetState() while 1 $pos = MouseGetPos() $mxc=$pos[0] $myc=$pos[1] ; ToolTip($mxc & " " & $myc,$mxc,$myc) if ($mxc >= $bxc) And ($mxc <= $bxc+75) Then if ($myc>=$byc) and ($myc<=($byc+25)) Then randpos() Sleep(10) GUICtrlSetPos ( $button_1, $bxc,$byc,75,25 ) EndIf EndIf $msg = GUIGetMsg() Select case $msg = $button_1 ExitLoop case $msg=$GUI_EVENT_CLOSE ExitLoop EndSelect Sleep(1) WEnd func randpos() $bxc=random(10,225) $byc=random(10,275) EndFunc HardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
layer Posted June 20, 2005 Share Posted June 20, 2005 Haha! Had loads of fun with that ! FootbaG 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