topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 1:56 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Interaction with ScreenClippings AHK Script  (Read 6114 times)

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Interaction with ScreenClippings AHK Script
« on: January 02, 2016, 09:46 AM »
Recently I found an AHK script called ScreenClippings.

It has a feature where you can capture a portion of the screen and it becomes a floating panel.
This is very useful if you need to use the area as a reference.  Sometimes I do this in certain dialogue windows and then I use the information somewhere else.

Also, I like being able to capture an area by this scripts hotkey: hold win key and draw with the mouse.  To me this is a much better way than pushing a hotkey and then drawing.  The ahk script allows me to draw the box immediately and not have to wait for the crosshair lines to appear.  I just draw the box and the image is captured - it's so fast.

Maybe ScreenshotCaptor could do these things too?

Also, a weird thing happens.  When I use the script to capture an area (by holding win+ctrl and drawing a box) then ScreenshotCaptor thinks I'm trying to capture a particular object (SC's hotkey is alt+printscreen), but I haven't pushed either alt or the printscreen key!  Weird!

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Interaction with ScreenClippings AHK Script
« Reply #1 on: January 02, 2016, 10:06 PM »
Also, a weird thing happens.  When I use the script to capture an area (by holding win+ctrl and drawing a box) then ScreenshotCaptor thinks I'm trying to capture a particular object (SC's hotkey is alt+printscreen), but I haven't pushed either alt or the printscreen key!  Weird!

that happens because the script is sending the alt+printscreen combo internally in this function, SCW_Win2Clipboard (line 7 below). cool script btw!

Code: Autohotkey [Select]
  1. SCW_Win2Clipboard(KeepBorders=0) {
  2.    /*   ;   does not work for layered windows
  3.    ActiveWinID := WinExist("A")
  4.    pBitmap := Gdip_BitmapFromHWND(ActiveWinID)
  5.    Gdip_SetBitmapToClipboard(pBitmap)
  6.    */
  7.    Send, !{PrintScreen} ; Active Win's client area to Clipboard
  8.    if !KeepBorders
  9.    {
  10.       pToken := Gdip_Startup()
  11.       pBitmap := Gdip_CreateBitmapFromClipboard()
  12.       Gdip_GetDimensions(pBitmap, w, h)
  13.       pBitmap2 := SCW_CropImage(pBitmap, 3, 3, w-6, h-6)
  14.       Gdip_SetBitmapToClipboard(pBitmap2)
  15.       Gdip_DisposeImage(pBitmap), Gdip_DisposeImage(pBitmap2)
  16.       Gdip_Shutdown("pToken")
  17.    }
  18. }

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: Interaction with ScreenClippings AHK Script
« Reply #2 on: January 02, 2016, 11:37 PM »
I disabled alt+printscreen combo in ScreenshotCaptor and the problem went away.
It's funny though, because when it first happened I was really surprised - I had never used SC to capture a control before and I thought it was something produced by the script!  Then I saw the SC icon somewhere and got to thinking.
Funny!

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Interaction with ScreenClippings AHK Script
« Reply #3 on: January 03, 2016, 01:46 AM »
I disabled alt+printscreen combo in ScreenshotCaptor and the problem went away.
It's funny though, because when it first happened I was really surprised - I had never used SC to capture a control before and I thought it was something produced by the script!  Then I saw the SC icon somewhere and got to thinking.
Funny!

It's a good thing you noticed the flashing ScreenshotCaptor icon and problem solved.