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, 10:33 am
  • 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: How to make SC go to the last file?  (Read 3853 times)

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
How to make SC go to the last file?
« on: November 30, 2013, 01:31 AM »
as per title, i have a custom ahk script running after each capture (post-capture options). after the script runs, SC auto-refreshes the thumbnail panel and does not set focus on the latest captured file. is there anything i can do about it?

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: How to make SC go to the last file?
« Reply #1 on: November 30, 2013, 01:36 AM »
is there some reason SC is changing the focused file?  it would refresh the thumbnail panel if a new file was created by your script in that directory, but it shouldnt change the focus..   are you deleting that last captured file perhaps?

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: How to make SC go to the last file?
« Reply #2 on: November 30, 2013, 01:49 AM »
ok, that makes sense. the script renames certain newly captured files.

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: How to make SC go to the last file?
« Reply #3 on: November 30, 2013, 02:02 AM »
if you invoke "ScreenshotCaptor.exe filepath" it should switch to the file you specify.

but i may be able to fix sc behavior to by default do the thing you want if you tell me a little bit more about what's happening and what you would like to happen instead.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: How to make SC go to the last file?
« Reply #4 on: November 30, 2013, 03:26 AM »
this is the format i use in the "File Naming Template":
%quickfield%%windowtitle%_%customdate%_%num%

1. i wanted to fine-tune the filenames further so i wrote a custom ahk script to do that as part of the post-capture options.
2. this script parses the newly captured filenames and rename them if it is matches the list of word i want to exclude.
3. after renaming is done, SC refreshes the thumbnail panel and somehow loses the focus on the last captured file.
4. now when i toggle SC's main window, no file has the focus, necessitating a scroll down the panel for the latest file.
5. i would to avoid #3 if possible.
6. in the meantime i will try out your suggestion of calling "ScreenshotCaptor.exe filepath" within the script after renaming is done.

thanks again!

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: How to make SC go to the last file?
« Reply #5 on: November 30, 2013, 03:27 AM »
I'll see if i can't detect an external rename of the currently selected file and switch to it.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: How to make SC go to the last file?
« Reply #6 on: November 30, 2013, 04:55 AM »
thanks, let me know either way.

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: How to make SC go to the last file?
« Reply #7 on: November 30, 2013, 05:18 AM »
I've also tested passing a filename on the commandline and that works fine, so you should be able to use that method too.