{"id":1119,"date":"2010-03-08T09:46:11","date_gmt":"2010-03-08T09:46:11","guid":{"rendered":"http:\/\/www.mjtnet.com\/blog\/?p=1119"},"modified":"2010-03-08T09:46:16","modified_gmt":"2010-03-08T09:46:16","slug":"screen-magnifier-in-only-34-lines-of-code","status":"publish","type":"post","link":"https:\/\/www.mjtnet.com\/blog\/2010\/03\/08\/screen-magnifier-in-only-34-lines-of-code\/","title":{"rendered":"Screen Magnifier In Only 34 Lines of Code"},"content":{"rendered":"<p>Check out this screen magnifier, written by <a href=\"http:\/\/www.mjtnet.com\/usergroup\/profile.php?mode=viewprofile&#038;u=492\">Dick Lockey<\/a> in only 34 lines of <a href=\"http:\/\/www.mjtnet.com\/macro_scheduler.htm\">Macro Scheduler<\/a> code. \u00a0 Paste it into a macro, hit run and then as you move the mouse around your screen you&#8217;ll see a 5x magnification of the cursor area.<\/p>\n<pre class=\"macroscript\" name=\"code\">Dialog>Dialog1\r\n   Caption=5X Magnify\r\n   Width=800\r\n   Height=500\r\n   Top=500\r\n   Left=48\r\nEndDialog>Dialog1\r\nShow>Dialog1\r\n  LibFunc>user32,GetDC,HDC1,Dialog1.handle\r\n  LibFunc>user32,GetDC,HDC3,0\r\n\r\nLabel>Loop\r\n  GetDialogAction>Dialog1,res1\r\n  If>res1=2\r\n    Exit>0\r\n  EndIf\r\n  GetCursorPos>CurX,CurY\r\n  Sub>CurX,80\r\n  Sub>CurY,50\r\n  Wait>0.01\r\n  LibFunc>Gdi32,StretchBlt,SBres,HDC1,0,0,800,500,HDC3,CURX,CURY,160,100,13369376\r\n  GoSub>DrawLine,Dialog1.handle,1,0,390,250,410,250\r\n  GoSub>DrawLine,Dialog1.handle,1,0,400,240,400,260\r\nGoto>Loop\r\n\r\nSRT>DrawLine\r\n  LibFunc>user32,GetDC,HDC,%DrawLine_var_1%\r\n  LibFunc>gdi32,CreatePen,Penres,0,%DrawLine_var_2%,%DrawLine_var_3%\r\n  LibFunc>gdi32,SelectObject,SOPres,hdc,Penres\r\n  Libfunc>gdi32,MoveToEx,mtres,HDC,%DrawLine_var_4%,%DrawLine_var_5%,0\r\n  LibFunc>gdi32,LineTo,ltres,hdc,%DrawLine_var_6%,%DrawLine_var_7%\r\n  LibFunc>gdi32,DeleteObject,DOres,Penres\r\n  LibFunc>user32,ReleaseDC,RDCres,HDC_1,HDC\r\nEND>DrawLine<\/pre>\n<p>Yes, <a href=\"http:\/\/www.mjtnet.com\/usergroup\/viewtopic.php?p=26753\">as Dick Says<\/a>, you get one of these with Windows.  But it&#8217;s kind of cool to see you can do the same thing with Macro Scheduler, and the code might come in handy elsewhere.  <\/p>\n<p>Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Check out this screen magnifier, written by Dick Lockey in only 34 lines of Macro Scheduler code. \u00a0 Paste it into a macro, hit run and then as you move the mouse around your screen you&#8217;ll see a 5x magnification of the cursor area. Dialog>Dialog1 Caption=5X Magnify Width=800 Height=500 Top=500 Left=48 EndDialog>Dialog1 Show>Dialog1 LibFunc>user32,GetDC,HDC1,Dialog1.handle LibFunc>user32,GetDC,HDC3,0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,6],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/1119"}],"collection":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/comments?post=1119"}],"version-history":[{"count":4,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/1119\/revisions"}],"predecessor-version":[{"id":1123,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/1119\/revisions\/1123"}],"wp:attachment":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/media?parent=1119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/categories?post=1119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/tags?post=1119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}