Printscreen part of screen

Advanced Macro Recorder/Editor.

Moderator: Pulover

AgentKoos
Posts: 1
Joined: 08 Feb 2021, 03:30

Printscreen part of screen

08 Feb 2021, 03:44

I found Pulover over the weekend and my mind is blown. All the feautures that I needed and way more.
One problem. I can't for the life of me figure out how to take a screenshot of a part of the screen. At the moment I use the recording function. Everything is recorded except the keyboard combos for screencapture.

I tried cntr+PrintScr for shareX
I tried Windows+shift+s for the Windows Snipping tool.
I can't figure out to use the built in feature from Pulover.

When I recorded everything and playback everything works upto the screen capture bit.

So basically what I need to do is screen capture a part of the screen and then paste it into a word doc.
Any help will be greatly appreciated.
garry
Posts: 3795
Joined: 22 Dec 2013, 12:50

Re: Printscreen part of screen

08 Feb 2021, 09:21

example with irfanview
;- Short info to irfanview :
;- ctrl+r =resize in x%
;- How to crop ( a part from screen ) :
;- use left mouse button to draw a rectangle on the picture
; then ctrl+y and Save picture as ...

Code: Select all

;- https://www.irfanview.com/
;-----------------------------------------------------------------
;- Short info to irfanview :
;- ctrl+r =resize in x%
;- How to crop :
;- use left mouse button to draw a rectangle on the picture
;     then ctrl+y and Save picture as ...
;-----------------------------------------------------------------
;------------------ printscreen ----------------------------------
*~$printscreen::
SetTitleMatchMode, 2
screenshots=%a_desktop%\SCREENSHOTS
ifnotexist,%screenshots%
  filecreatedir,%screenshots%
irfan      =C:\Program Files\IrfanView\i_view64.exe
ifexist,%irfan%
    {
   runwait, "%irfan%" "/capture=0 /convert=%screenshots%\%A_now%_screenshot.png"
   ;runwait, "%irfan%" "/capture=0 /convert=%screenshots%\%A_now%_screenshot.bmp"
   run,%screenshots%
   return
    }
return
;---------------------------------
/*
https://www.irfanview.com/
--- capture values:
0 = whole screen
1 = current monitor, where mouse is located
2 = foreground window
3 = foreground window - client area
4 = rectangle selection
5 = object selected with the mouse
6 = start in capture mode (can't be combined with other commandline options)
*/
;==============================================================
a defined part of a picture

Code: Select all

;- https://www.irfanview.com/
;- this script save screen as picture jpg/png... ( crop defined x y w h )
#warn
#NoEnv
#Singleinstance,force
setworkingdir,%a_scriptdir%
;Coordmode,pixel,client
Coordmode,mouse,window
;--------------------------------------
!0::   ; press ALT+0 = whole  window 
!3::   ; press ALT+3 = active window client area
;-*~$printscreen::  
;---------------------------------------
Modus:= SubStr(A_ThisHotkey,2,1)
;---------------------------------------
extx=png             ;- example convert / save as / with this extension
titleNew=%a_now%.%extx%   
;---------------------------------------
;--- calculate x y w h as procent ----------
wa:=A_screenwidth,ha:=A_screenHeight,xx:=100
if (modus=0)  ;- whole screen
   x:=(wa*40)//xx,y:=(ha*0)//xx,w:=(wa-x),h:=(ha*50)//xx 
if (modus=3 or modus=2 )       ;- Active Window
   {
   WinGetPos,x1,y1,w1,h1,A     ;- x y w h from active window
   ;x:=(w1*40)//xx,y:=(h1*0)//xx,w:=w1-x  ,h:=(h1*50)//xx              ;- right top
   ypos:=15
   x:=(w1*20)//xx,y:=(h1*ypos)//xx,w:=w1-x-x,h:=(h1*(100-2*ypos))//xx  ;- in middle
   }
;-------------------------------------------
Destination=%a_desktop%\TEST_IRFAN
IfNotExist, %Destination%
  FileCreateDir, %Destination%
F1=%destination%\%titleNew%
PR=%A_ProgramFiles%\IrfanView\i_view64.exe
AA=/capture=%modus% /crop=(%x%,%y%,%w%,%h%) /convert="%F1%"
runwait,%PR% %AA%
try
 run,%F1%
catch e 
{
xxx:=e.Message
msgbox, 262208,ERROR,Error=`n%xxx%
exitapp
}
return
;-----------
esc::exitapp
;===========================================
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Printscreen part of screen

08 Feb 2021, 09:28

You can make use of the included GDI+ Library functions.

:arrow: https://www.macrocreator.com/docs/Faq.html#can-i-take-screenshots-during-playback
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)

Return to “Pulovers Macro Creator”

Who is online

Users browsing this forum: No registered users and 15 guests