Jripe Posted May 12, 2005 Posted May 12, 2005 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?
Blue_Drache Posted May 12, 2005 Posted May 12, 2005 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
MSLx Fanboy Posted May 13, 2005 Posted May 13, 2005 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())
Jripe Posted May 14, 2005 Author Posted May 14, 2005 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.
quaizywabbit Posted May 14, 2005 Posted May 14, 2005 this example uses DllCall() to draw on a window.... expandcollapse popupOpt("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
toxicvn Posted December 18, 2008 Posted December 18, 2008 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
torels Posted December 18, 2008 Posted December 18, 2008 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
Developers Jos Posted December 18, 2008 Developers Posted December 18, 2008 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.787You forgot to ask a question so doubt if you get any good answers. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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