topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday April 19, 2024, 4:25 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: X marks the spot  (Read 2631 times)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
X marks the spot
« on: May 09, 2010, 01:56 PM »
Many times I just want to open one Explorer window to something simple
like "t:\temp" or whatnot.  I found I was opening ReOpen to get the input
line, then typing "t:\temp" to go there.  Which is ok via hotkey.. but I
came up with this little macro so that I could click an icon on my taskbar
and have it come up to C:\ with the cursor in the edit line.  That way
I can just type where I want to go.

I compiled it to x.exe and added an X icon for myself but you can make
whatever customizations you like on your own system.  The numbers work
well on my 4x3 monitor using 1280x1024 resolution but you may want to
experiment to zero things in on your monitor.

The AutoIt3 script just launches "C:\" to get an explorer window.
It moves and sizes the window, then clicks the mouse in the Edit control.
Just start typing to go someplace other than C:.

If you change the window size or use a radically different screen res. then
you'll probably need to experiment with the MouseClick numbers to get the
mouse cursor into the edit control.

;run to open an Explorer Window at C:
;with caret in the edit control. To
;switch to another folder, just type
;it in.
;
;adjust the numbers to suit your monitor
;and screen res. Also you may need to
;adjust Sleep to the speed of your
;PC.
;
;MilesAhead
;
AutoItSetOption("MouseCoordMode",0)
ShellExecute("C:\")
Sleep(250)
WinMove("C:\","",200,140,900,700)
MouseClick("left",300,40)




MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: X marks the spot
« Reply #1 on: May 10, 2010, 08:18 PM »
btw I know this thing is clunky. But for some reason it makes me smile when I watch the mouse pointer move lazily toward the edit box.  Like the hamsters are tired. :)