vin1 Posted April 19, 2013 Share Posted April 19, 2013 is it possible to make a window or desktop zoom out tool like the magnifier tool in windows 7 zoom out to 25% of the original size Link to comment Share on other sites More sharing options...
jdelaney Posted April 19, 2013 Share Posted April 19, 2013 (edited) you mean zoom in, right? example of taking screenshot, stretching it (zoom in)...if you really do want zoom out modify the $iZoomRatio to a decimal...like .25 note: I did not add in all the #includes, you will have to do that AutoItSetOption ( "MouseCoordMode",1 ) $gsFILE_Background = "c:\screenshot.bmp" $iWidth = 300 $iHeight = 300 $iZoomRatio = .75 Local $pos = MouseGetPos() _ScreenCapture_Capture($gsFILE_Background, $pos[0]-$iWidth/$iZoomRatio, $pos[1]-$iHeight/$iZoomRatio, $pos[0]+$iWidth/$iZoomRatio, $pos[1]+$iHeight/$iZoomRatio) GUICreate("ZoomIn", $iWidth, $iHeight) ; will create a dialog box that when displayed is centered $hwndBackground = GUICtrlCreatePic($gsFILE_Background, 0, 0, $iWidth, $iHeight) GUISetState(@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed $iPriorX = $pos[0] $iPriorY = $pos[1] While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Local $pos = MouseGetPos() If $pos[0]<>$iPriorX Or $iPriorY<>$pos[1] Then _ScreenCapture_Capture($gsFILE_Background, $pos[0]-$iWidth/$iZoomRatio, $pos[1]-$iHeight/$iZoomRatio, $pos[0]+$iWidth/$iZoomRatio, $pos[1]+$iHeight/$iZoomRatio) ;~ GUICtrlDelete($hwndBackground) ;~ $hwndBackground = GUICtrlCreatePic($gsFILE_Background, 0, 0, $iWidth, $iHeight) GUICtrlSetImage ( $hwndBackground, $gsFILE_Background ) $iPriorX = $pos[0] $iPriorY = $pos[1] EndIf WEnd GUIDelete() Edited April 19, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 19, 2013 Moderators Share Posted April 19, 2013 vin1, I wrote this a while ago - it might give you some ideas: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> #include <Misc.au3> Opt("GUICloseOnESC", 0) HotKeySet("{ESC}", "On_Exit") Global $hMag_GUI, $hMagDC, $hDeskDC, $hPen, $oObj, $aMouse_Pos[2], $iLast_Mouse_X = 0, $iLast_Mouse_Y = 0 ; Create GUI $hMag_Win = GUICreate("MAG", 100, 100, 0, 0, $WS_POPUP) GUISetState(@SW_SHOW, $hMag_Win) $hMag_GUI = WinGetHandle("MAG") ; Get device context for Mag GUI $hMagDC = _WinAPI_GetDC($hMag_GUI) If @error Then Exit ; Get device context for desktop $hDeskDC = _WinAPI_GetDC(0) If @error Then _WinAPI_ReleaseDC($hMag_GUI, $hMagDC) Exit EndIf ; Create pen $hPen = _WinAPI_CreatePen($PS_SOLID, 5, 0x7E7E7E) $oObj = _WinAPI_SelectObject($hMagDC, $hPen) While 1 ; Check if cursor has moved $aMouse_Pos = MouseGetPos() If $aMouse_Pos[0] <> $iLast_Mouse_X Or $aMouse_Pos[1] <> $iLast_Mouse_Y Then ; Redraw Mag GUI Loupe($aMouse_Pos) ; Reset position $iLast_Mouse_X = $aMouse_Pos[0] $iLast_Mouse_Y = $aMouse_Pos[1] EndIf WEnd Func On_Exit() ; Clear up Mag GUI _WinAPI_SelectObject($hMagDC, $oObj) _WinAPI_DeleteObject($hPen) _WinAPI_ReleaseDC(0, $hDeskDC) _WinAPI_ReleaseDC($hMag_GUI, $hMagDC) GUIDelete($hMag_GUI) Exit EndFunc ;==>On_Exit Func Loupe($aMouse_Pos) Local $iX, $iY ; Fill Mag GUI with 5x expanded contents of desktop area (10 pixels around mouse) DllCall("gdi32.dll", "int", "StretchBlt", _ "int", $hMagDC, "int", 0, "int", 0, "int", 100, "int", 100, _ "int", $hDeskDC, "int", $aMouse_Pos[0] - 10, "int", $aMouse_Pos[1] - 10, "int", 20, "int", 20, _ "long", $SRCCOPY) ; Keep Mag GUI on screen If $aMouse_Pos[0] < (@DesktopWidth - 120) Then $iX = $aMouse_Pos[0] + 20 Else $iX = $aMouse_Pos[0] - 120 EndIf If $aMouse_Pos[1] < (@DesktopHeight - 150) Then $iY = $aMouse_Pos[1] + 20 Else $iY = $aMouse_Pos[1] - 120 EndIf WinMove($hMag_GUI, "", $iX, $iY, 100, 100) EndFunc ;==>Loupe Please ask if you have any questions. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
jdelaney Posted April 19, 2013 Share Posted April 19, 2013 (edited) Duh, that makes sense to wait for the cursor to move...save some cpu edit: misappropriated into mine as well Edited April 19, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
vin1 Posted April 19, 2013 Author Share Posted April 19, 2013 thank you both Link to comment Share on other sites More sharing options...
AZJIO Posted April 19, 2013 Share Posted April 19, 2013 vin1 screen_magnifier_v1__ Siao UEZ greenmachine http://www.autoitscript.com/forum/index.php?showtopic=24154&view=findpost&p=168674 AZJIO http://autoit-script.ru/index.php/topic,4710.msg34075.html#msg34075 My other projects or all Link to comment Share on other sites More sharing options...
vin1 Posted April 23, 2013 Author Share Posted April 23, 2013 Actually i wanted there to be a configuration option like the windows 7 magnifier options. zoom ability from 25% to 400%. windows 7 magnifier has that option of 25% zoom rate but somehow it doesnt work at less than 100% zoom even if you set it to 25%. im interested in an option of 25% zoom on the entire screen (full screen) because it will zoom out if less than 100%. Link to comment Share on other sites More sharing options...
vin1 Posted April 24, 2013 Author Share Posted April 24, 2013 bump Link to comment Share on other sites More sharing options...
guinness Posted April 24, 2013 Share Posted April 24, 2013 Are you creating this yourself or do you want someone to create if for you? Why are you also reinventing the wheel? UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
water Posted April 24, 2013 Share Posted April 24, 2013 bumpPlease wait at least 24 hours before bumping a thread. This is no 24 hours support forum! My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
UEZ Posted April 24, 2013 Share Posted April 24, 2013 @vin1: did you have a closer look to the examples? One of them has the feature applied indirectly! Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Bert Posted April 24, 2013 Share Posted April 24, 2013 What happens when you hold down the ctrl key and use your scroll wheel on your mouse to change the size of the information being displayed in the window? I do this all the time. The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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