Jump to content

Using Windows Search for Intranet


Recommended Posts

Hi, I'm new to this forum but have been playing with AutoIt for a few weeks now but I'm finding a few hiccups at present. I'm working on a project to use the standard Search function in Windows to search an Intranet for information based on text placed into a search box.

Basically we have an intranet site that contains a main page that has a text box for people to enter a keyword/topic they are looking for. From there I want them to press the "Search" button on the intranet page, this will then start my AutoIt exe. I want the exe to copy the text from the text box, and paste it into the "All or part of the file name" section of search with an * either side. I need it to change the "Look in" option to "J:\KC-SAFETY\HSEQ INTRANET\DOCUMENTATION\" and then press "Search".

So far I've managed to create script to open the search function, select the "All files and folders" when you first open search and enter some of the location into the "Look in" box. For some reason some of the location disappears. See below for script. Sorry for the directional stuff, its the only way I can figure out what each section is for while I'm learning. If anyone would be willing to help me write this I'd really appreciate it.

; Run Explorer

Run("explorer.exe")

; Wait for My Documents window to appear

WinWaitActive("My Documents")

; Now that the My Documents window is active select Search function

Send("{BROWSER_SEARCH}")

; Wait for My Documents window to appear

WinWaitActive("My Documents")

;Now to select what type of search needs to happen

ControlClick("My Documents","","[iD:5502]")

; Wait for My Documents window to appear

WinWaitActive("My Documents")

;Set the location of the search J:\KC-Safety\HSEQ INTRANET\DOCUMENTATION

ControlClick("My Documents","","Edit4")

SEND("J:\KC-Safety\HSEQ INTRANET\DOCUMENTATION")

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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