Jump to content

Scripting to change a directory in Windows Explore


Recommended Posts

Guest CUStaffer
Posted

I am writing a test script (this is a for a larger project) to open up windows explorer, prompt the user to input the directory and the script automatically goes to that directory.

I don't know the syntax for the changing the directory. I use the "FileChangeDir" it did not seem to do much. Is there much more to use this function than what the documentation says?

Posted

This should do the trick

#include <GUIConstants.au3>


$Window=Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & "XPCleanMenu.HostRocket.com\down.html")
;$Window=Run("iexplorer.exe"); used for testing
Sleep(1000)
WinWaitActive("","",20)
Sleep(1000)
$Input = InputBox("Find", "Type in what you would like to Search for   ","C:\Program Files\Autoit3")
Sleep(300)
Send("{TAB}")
Send($Input)
sleep(500)
Send("{ENTER}")

Check it out.........

Enjoy

NEWHeader1.png

Guest CUStaffer
Posted

thanks a lot for the response! I'm gonna test the codes out and see what works well for me.

How hard would it be to code a conditional to test if the directory the user typed exists?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...