Jump to content

Search the Community

Showing results for tags 'draw rectangle on screen'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. i almost have a working example... i found the example script online for drawing a simple square then i added MouseGetPos() this almost works, but the rectangle changes size as your mouse moves around, im trying to keep a consistant size... edit _WinAPI_DrawRect($left, $top, $bottem, $right, 0x0000CC) I hate making the post and fixing my script a few minutes later... been a few years since i played with autoit... still love it ;-) #include #include Global $tRect While 1 $fov = MouseGetPos() $top = $fov[1] - 100 $bottem = $fov[1] + 100 $left = $fov[0] - 50 $right = $fov[0] + 50 ; refresh desktop _WinAPI_RedrawWindow(_WinAPI_GetDesktopWindow(), $tRect, 0, BitOR($RDW_INVALIDATE, $RDW_ALLCHILDREN)) _WinAPI_DrawRect($left, $top, $bottem, $right, 0x0000CC) Sleep(10) WEnd Func _WinAPI_DrawRect($start_x, $start_y, $iWidth, $iHeight, $iColor) Local $hDC = _WinAPI_GetWindowDC(0) ; DC of entire screen (desktop) $tRect = DllStructCreate($tagRECT) DllStructSetData($tRect, 1, $start_x) DllStructSetData($tRect, 2, $start_y) DllStructSetData($tRect, 3, $iWidth) ; x-coordinate of the lower-right corner of the rectangle DllStructSetData($tRect, 4, $iHeight) ; y-coordinate of the lower-right corner of the rectangle Local $hBrush = _WinAPI_CreateSolidBrush($iColor) _WinAPI_FrameRect($hDC, DllStructGetPtr($tRect), $hBrush) ; clear resources _WinAPI_DeleteObject($hBrush) _WinAPI_ReleaseDC(0, $hDC) EndFunc ;==>_WinAPI_DrawRect
×
×
  • Create New...