Sign in to follow this  
Followers 0
Jripe

Writing over the screen

9 posts in this topic

I'm working on a script that will draw lines over a full screen program and make the line stay there. Is it possible to do that?

Share this post


Link to post
Share on other sites



I'm working on a script that will draw lines over a full screen program and make the line  stay there. Is it possible to do that?

<{POST_SNAPBACK}>

Try looking up the GUICtrlCreateLine script that was written a while ago. If you make a transparent window overlay, I'm sure you could draw the GUI lines on it.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

Ok, thanks a lot :(

Share this post


Link to post
Share on other sites

You could look into using a DirectX library. I wouldn't know any specifics, I barely like doing AutoIt GUIs :(


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

You could look into using a DirectX library.  I wouldn't know any specifics, I barely like doing AutoIt GUIs :(

<{POST_SNAPBACK}>

I'll try this too :( Thanks for the idea.

Share this post


Link to post
Share on other sites

this example uses DllCall() to draw on a window....

Opt("WinWaitDelay",1)
Opt("WinTitleMatchMode",4)

Send("#r")
WinWait("Run")
$hwnd = WinGetHandle("Run","")
for $i = 1 to 10
OutlineControl("Run","","Static1",0xFFFF00)
Sleep(500)
DLLCall("user32.dll","int","InvalidateRect","hwnd",$hwnd,"int",0,"int",1)
sleep(250)
next
for $i = 1 to 10
OutlineControl("Run","","Button1",0xFF00FF)
Sleep(500)
DLLCall("user32.dll","int","InvalidateRect","hwnd",$hwnd,"int",0,"int",1)
sleep(250)
Next
for $i = 1 to 10
OutlineControl("Run","","Button2",0x00FF00)
Sleep(500)
DLLCall("user32.dll","int","InvalidateRect","hwnd",$hwnd,"int",0,"int",1)
sleep(250)
Next
for $i = 1 to 10
OutlineControl("Run","","Button3",0xFF0000)
Sleep(500)
DLLCall("user32.dll","int","InvalidateRect","hwnd",$hwnd,"int",0,"int",1)
Sleep(250)
Next
Func OutlineControl($l_szTitle,$l_szText,$l_szControl,$color)
   $l_hWnd = ControlGetHandle($l_szTitle,$l_szText,$l_szControl)
   $l_hWndDad = WinGetHandle($l_szTitle,$l_szText)
 $l_rect = ControlGetPos($l_szTitle,$l_szText,$l_szControl)
   $l_hdc = DLLCall("user32.dll","int","GetDC","hwnd",$l_hWndDad)
   $pen = DLLCall("gdi32.dll","int","CreatePen","int",0,"int",10,"int",$color)
   DLLCall("gdi32.dll","int","SelectObject","int",$l_hdc[0],"int",$pen[0])
   DLLCall("gdi32.dll","int","MoveToEx","int",$l_hdc[0],"int",$l_rect[0],"int",$l_rect[1],"int",0);startpos x/y
   DLLCall("gdi32.dll","int","LineTo","int",$l_hdc[0],"int",$l_rect[0] + $l_rect[2],"int",$l_rect[1]);top line
   DLLCall("gdi32.dll","int","LineTo","int",$l_hdc[0],"int",$l_rect[0] + $l_rect[2],"int",$l_rect[1]+$l_rect[3]);right line
   DLLCall("gdi32.dll","int","LineTo","int",$l_hdc[0],"int",$l_rect[0],"int",$l_rect[1]+$l_rect[3]);bottom line
   DLLCall("gdi32.dll","int","LineTo","int",$l_hdc[0],"int",$l_rect[0],"int",$l_rect[1]);left line
   Sleep(150)

 $l_hdc = DLLCall("user32.dll","int","ReleaseDC","hwnd",$l_hWndDad,"int",$l_hdc[0])
EndFunc

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

Writing over the screen.au3 (38) : ==> Subscript used with non-Array variable.:

DLLCall("gdi32.dll","int","MoveToEx","int",$l_hdc[0],"int",$l_rect[0],"int",$l_rect[1],"int",0)

DLLCall("gdi32.dll","int","MoveToEx","int",$l_hdc[0],"int",$l_rect^ ERROR

>Exit code: 1 Time: 8.787

Share this post


Link to post
Share on other sites

Excuse me... what about the graphics control and GDIPlus ?


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites

Writing over the screen.au3 (38) : ==> Subscript used with non-Array variable.:

DLLCall("gdi32.dll","int","MoveToEx","int",$l_hdc[0],"int",$l_rect[0],"int",$l_rect[1],"int",0)

DLLCall("gdi32.dll","int","MoveToEx","int",$l_hdc[0],"int",$l_rect^ ERROR

>Exit code: 1 Time: 8.787

You forgot to ask a question so doubt if you get any good answers.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0