Copiar Imagen Topic is solved

Esta sección es para preguntas sobre programación/scripting usando AutoHotkey.

Moderator: Flipeador

HECRAM

Copiar Imagen

Post by HECRAM » 20 Jun 2023, 11:41

Saludos, Sé que será muy simple para muchos mi petición, espero puedan suplir mi ignorancia. De ninguna manera he podido asignar a cualquier tecla la funcion de copiar pantalla y pueda pegar la misma en cualquier programa de office. no encuentro scripts parecidos. alguien puede ayudarme por favor.

garry
Posts: 3795
Joined: 22 Dec 2013, 12:50

Re: Copiar Imagen  Topic is solved

Post by garry » 22 Jun 2023, 15:01

example CaptureScreen.ahk from LinearSpoon :
https://autohotkey.com/board/topic/121619-screencaptureahk-broken-capturescreen-function-win-81-x64/

o un ejemplo con Irfanview :

Code: Select all

;----------------------------
#Requires AutoHotkey v1.1.33
#Warn
#Singleinstance,force
setworkingdir,%a_scriptdir%
irfan=%a_programfiles%\IrfanView\i_view64.exe
ifnotexist,%irfan%
 {
 run,https://www.irfanview.com/
 exitapp
 }
SetTitleMatchMode, 2
screenshots=%a_desktop%\SCREENSHOTS                    ;- screencopy here
;screenshots:="C:\users\" . a_username . "\downloads"
ifnotexist,%screenshots%
  filecreatedir,%screenshots%
wa:=A_screenwidth,ha:=A_screenHeight,xx:=100
return
;-----------------
~$printscreen::                                      ;- printscreen button
F1=%screenshots%\%A_now%_screenshot.png
  runwait, "%irfan%" "/capture=0 /convert=%F1%"      ;- whole screen
try,  
  run,%F1%  
return
;-----------------
~$!printscreen::                                     ;- alt+printscreen button
F1=%screenshots%\%A_now%_screenshot.png
  runwait, "%irfan%" "/capture=2 /convert=%F1%"      ;- only active window
try,  
  run,%F1%  
return
;-----------------
*~^!$printscreen::                                   ;- ctrl+alt+printscreen button
  F1=%screenshots%\%a_now%_CROP_screenshot.bmp
  WinGetPos,x1,y1,w1,h1,A     ;- x y w h from active window
  x:=(w1*11)//xx ,y:=(h1*1)//xx,w:=(w1*30)//xx,h:=(h1*40)//xx                        ;- picture area to copy from active window
  ;AA=/capture=3 /crop=(%x%,%y%,%w%,%h%) /resize=(1400,) /aspectratio /convert=%F1%  ;- resize
  AA=/capture=3 /crop=(%x%,%y%,%w%,%h%) /aspectratio /convert=%F1%                   ;- not resize
  runwait,%irfan% %AA%
try,  
  run,%F1%
return
;========================== END script PrintScreen ===============

Post Reply

Return to “Pedir Ayuda”