topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 6:08 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: "Incorrect" filename for "Grab selected region"  (Read 12103 times)

sba

  • Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 57
    • View Profile
    • Donate to Member
"Incorrect" filename for "Grab selected region"
« on: February 19, 2013, 06:47 AM »
Most often, when capturing a region I get a filename where %windowtitlepure% is replaced by an empty string.

Today I got something strange: this got expanded to the "massaged window title" of some window that was on my desktop, not even belonging to the app (IE) I captured a region from...

What's the official spec for how %windowtitlepure% is supposed to be expanded?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #1 on: February 19, 2013, 06:57 AM »
This is good timing because I'm about to release a new beta for testing and maybe I can fix this..

I suspect that Grab Selected Region is getting the info of the active foreground window, regardless of what are of the screen you select.  Can you verify that?

-jesse

sba

  • Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 57
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #2 on: February 19, 2013, 07:02 AM »
Seems to be indeed something like that.

Except when the active window is a Windows Explorer window, in which case %windowtitlepure% expands to an empty string. That's also the case BTW if you capture the entire active Windows Explorer window (whereas I would expect this to be the window's caption i.e. the full path to the directory in my case).
 


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #3 on: February 19, 2013, 07:10 AM »
Ok let me see If maybe i can't improve that.

sba

  • Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 57
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #4 on: February 19, 2013, 07:12 AM »
you probably meant "if I can improve that"  ;)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #5 on: February 19, 2013, 02:27 PM »
sba,

I have uploaded a new beta to:

There are quite a few changes in the new version, including some major revamping of active window selection code responsible for the behavior you've identified.  I'm hoping the new version will fix your problem and also do a better job of highlighting the active window when doing things like region captures, etc.  But i've changed enough that it's possible I broke something so I hope to get some good beta tester reports.

Can you let me know how it works for you?
« Last Edit: February 20, 2013, 12:37 AM by mouser »

sba

  • Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 57
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #6 on: February 20, 2013, 12:19 AM »
Well... the EXE is 3.08.01....

Wrong URL, I would say  ;)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #7 on: February 20, 2013, 12:37 AM »
arg! i forget to use the beta urls.. fixed!  try again please.

sba

  • Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 57
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #8 on: February 20, 2013, 04:18 AM »
Seems to work way better.

What's the logic? If the region intersects with a window, you use that window's caption?

What if it intersects with more than one window?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #9 on: February 20, 2013, 04:59 AM »
if some part of the active foreground window is within the captured region, that is used.

if not, it tries to guess which window should be treated as the "active"/foreground window within the capture -- first by looking at cursor location, then at center of capture.

when it finds one, it uses that info for the caption and memo, but then also tries to find the largest contained subwindow to actively select -- which can be useful for performing blur effects, etc.

sba

  • Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 57
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #10 on: March 28, 2013, 07:59 AM »
I just noticed (off-topic? do you want a new thread?) that "Grab Active Window" (with the 3.15.01 beta) yields an incorrect filename for console applications: the title of the window which is just "below" the upper-left corner of the console (current) window/application is used instead.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #11 on: March 28, 2013, 08:02 AM »
Hi sba,

Can you give me more details -- and maybe some screenshots?

The only time SC should have to "guess" at the window to use is if its a region capture or if there was no window active at time of initiation of the capture.  But if you are performing an Active Window Capture of the foreground window, it should be grabbing it properly.

sba

  • Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 57
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #12 on: March 28, 2013, 09:59 AM »
Here's a very simple scenario I just played with 4.00

- start Notepad
- maximize it
- start CMD
- move it about the middle of the screen, in front of the maximized Notepad
- hit Alt+PrtSc
- the resulting filename is

Screenshot of 'Untitled - Notepad' on 2013-03-28.png

whereas I would expect

Screenshot of C:WindowsSystem32Cmd.exe' on 2013-03-28.png

or something.


(I hate to say, I still have no clue as to how to attach a file to a forum post here...)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #13 on: March 28, 2013, 10:07 AM »
When I do that it labels mine correctly as from the command prompt not notepad.. What operating system are you using?
Anyone else see this behavior?  Can you experiment a bit more and see if it's related to some setting?
I wonder if it's getting confused while trying to do background removal on win vista/7?

sba

  • Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 57
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #14 on: March 28, 2013, 11:16 AM »
OS is 64-bit Windows 7 Pro

Don't have pre-Windows 7 OSes here to test with.

What are you running?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #15 on: March 28, 2013, 11:21 AM »
I'm on xp pro still.. Just got a confirmation from other user on win7 about this issue.. i think it's getting confused about the active window when doing aero transparency capture attempt.  I will try to hunt it down.

cmpm

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 2,026
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #16 on: March 28, 2013, 11:29 AM »
(I hate to say, I still have no clue as to how to attach a file to a forum post here...)

Click "Preview" next to "Post" before you post and you can add attachments from that screen.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #17 on: March 29, 2013, 04:41 AM »
Can you guys try the newly uploaded version (same official url), and let me know if it solves the problem?

cmpm

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 2,026
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #18 on: March 29, 2013, 05:30 AM »
Seems to be working, w7 pro here

cmpm

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 2,026
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #19 on: March 29, 2013, 05:33 AM »
cmd with notepad maximized

edit
ha!, blurred my name in cmd, but not sc
no big deal,
Clay

edit2- i was doing selected region...


sba

  • Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 57
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #20 on: March 29, 2013, 05:34 AM »
works for me too, 64-bit Windows 7 Pro

Filename is

Screenshot of 'C__Windows_system32_cmd.exe' on 2013-03-29.png


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #21 on: March 29, 2013, 05:38 AM »
Excellent.  Thanks!  :Thmbsup:

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #22 on: March 29, 2013, 05:50 AM »
I hate to say, I still have no clue as to how to attach a file to a forum post here...

here's a more in-depth description of how, with screenshots:
https://www.donation....msg310672#msg310672
Tom

sba

  • Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 57
    • View Profile
    • Donate to Member
Re: "Incorrect" filename for "Grab selected region"
« Reply #23 on: March 29, 2013, 07:26 AM »
Glad to have been helpful in improving the product.

Now I have to fire a new thread to complain about the UI changes  ;) I now have to click twice to get the filename (or image) to the clipboard after a capture instead of only one previously...