Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 07, 2016, 04:45:51 AM
  • Proudly celebrating 10 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: close folders  (Read 10606 times)

ajlewis

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
close folders
« on: January 07, 2009, 10:21:29 AM »
I'm new here so excuse this if it has appeared already.
When I open a folder and execute a file the containing folder remains open. Is there a simple script to close the folder when I launch a file?
Thanks!  :)

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: close folders
« Reply #1 on: January 09, 2009, 09:48:50 PM »
:) Try RunToClose!

RunToClose - DoubleClicking a file in Explorer closes Explorer afterwards.

You'll find the downloads and more info at 1 Hour Software by Skrommel.

Skrommel
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,408
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: close folders
« Reply #2 on: January 10, 2009, 03:44:06 PM »
Skrommel's on fire again  :huh: :huh: :huh:  :Thmbsup: :Thmbsup: :Thmbsup:

AndyM

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 616
    • View Profile
    • Donate to Member
Re: close folders
« Reply #3 on: January 10, 2009, 05:06:01 PM »
Is there a simple script to close the folder when I launch a file?
This is simple.  Hold down the Left Control key and Right Click on an object.  The object opens and the parent window closes.  The folder always closes but sometimes the file doesn't open (it's a timing thing), which can be irritating.  But it is simple  ;D
;CloseParent.ahk
;
;In an Explorer Window, hold down Left-Control and RightClick on a
;folder,shortcut,or file.  The folder/shortcut/file will open/run
;and the Explorer Window will close.
;
;If you LeftControl-RightClick anyplace other than an object,
;eg a window background, the window will close, very handy
;
;sometimes the timing doesn't work, hence the sleeps

#SingleInstance,Force
#Persistent
Menu,Tray,Tip,CloseParent

LControl & RButton::
MouseGetPos,xpos,ypos,ParentWin
sleep, 100
MouseClick,Left,%xpos%,%ypos%,2
sleep, 200
Winclose,ahk_id %ParentWin%
return