Valuater Posted March 3, 2005 Share Posted March 3, 2005 newbie, can i get a little help here? this works but its real slow, is there an easier way? $files= "txt" $filetype = ('\') $winexplor = @WindowsDir & "\explorer.exe " Run ($winexplor & " " & @HomeDrive & $filetype,"",@SW_MAXIMIZE ) Sleep(500) send("{F3}") sleep(3000) send("{l}") sleep(1000) send ("{*}") send("{.}") send($files) sleep(1000) send("{enter}") thanks... Link to comment Share on other sites More sharing options...
Andre Posted March 3, 2005 Share Posted March 3, 2005 ControlSend ? What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
ZeDMIN Posted March 3, 2005 Share Posted March 3, 2005 newbie, can i get a little help here?this works but its real slow, is there an easier way?$files= "txt"$filetype = ('\')$winexplor = @WindowsDir & "\explorer.exe "Run ($winexplor & " " & @HomeDrive & $filetype,"",@SW_MAXIMIZE )Sleep(500)send("{F3}")sleep(3000)send("{l}")sleep(1000)send ("{*}")send("{.}")send($files)sleep(1000)send("{enter}")thanks...<{POST_SNAPBACK}>I don't really get the sense of send("{l}")? And why are there so many Sleeps in it? No wonder it is slow Link to comment Share on other sites More sharing options...
Blue_Drache Posted March 3, 2005 Share Posted March 3, 2005 (edited) newbie, can i get a little help here?this works but its real slow, is there an easier way?$files= "txt"$filetype = ('\')$winexplor = @WindowsDir & "\explorer.exe "Run ($winexplor & " " & @HomeDrive & $filetype,"",@SW_MAXIMIZE )Sleep(500)send("{F3}")sleep(3000)send("{l}")sleep(1000)send ("{*}")send("{.}")send($files)sleep(1000)send("{enter}")thanks...<{POST_SNAPBACK}>Ok, based on your code, you want a search function for all files named *.txt in your @HomeDrive.explorer.exe is on the default path, so we'll start by simplifiying the command to start your explorer.RunWait(@ComSpec & " /c " & 'explorer "' & @HomeDrive & '\"',"",@SW_HIDE)Right, now let's see if the Windows Titlebar changes at all when we hit "F3"...Nope, it doesn't...and since explorer is a bear to work with, this idea gets discarded into the trash can....OK, new approach.... how about using DOS and redirecting the command's output into a text file? RunWait(@ComSpec & " /c " & 'dir "' & @HomeDrive & '\*.txt" > "' & @TempDir & '\dir.txt"',"",@SW_HIDE)This command will only search the @homedrive. If you want the entire system, use a space and a /s after the dir.txt.Ok, since that command works, and we have dir.txt into the temp directory, what is next? What can we do with this thing?Well.....Read it into an array, display the contents, search the contents, whatever you want, but for this example we'll just open it in notepad.Run('Notepad "' & @TempDir & '\dir.txt"')Hope that this helps! Edited March 3, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Valuater Posted March 3, 2005 Author Share Posted March 3, 2005 (edited) thanks for the help, Blue_Drache. it is appreciated actually i had tried the dos "dir" approach and found it difficult to handle the output i then found dir /b which gave me an out put of "C:\path\file" and no headers or attributes. however, with either direction i would need to handle the output into a file then handle the file output to a window then handle the ability to select then handle the selection items then.... you understand, i thought it was possible and easier to utilize explorer with "Search Assistant or Search Companion" or some type of $variable for the sub-folders....some-how. but if you guys don't know then i probably won't be able to figure it out. new thought, can the first output be placed into a explorer window and then utilize normal explorer tools >select, copy, paste, etc? really, thanks again for the help... Edited March 3, 2005 by Valuater Link to comment Share on other sites More sharing options...
CyberSlug Posted March 4, 2005 Share Posted March 4, 2005 Have you tried the FileFindNextFile function? Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Valuater Posted March 4, 2005 Author Share Posted March 4, 2005 thanks for the help, Blue_Drache. it is appreciatedactually i had tried the dos "dir" approach and found it difficult to handle the outputi then found dir /b which gave me an out put of "C:\path\file" and no headers or attributes.however, with either direction i would need tohandle the output into a file thenhandle the file output to a window thenhandle the ability to select thenhandle the selection items then....you understand,i thought it was possible and easier to utilize explorer with "Search Assistant or Search Companion" or some type of $variable for the sub-folders....some-how.but if you guys don't know then i probably won't be able to figure it out.new thought,can the first output be placed into a explorer window and then utilize normal explorer tools >select, copy, paste, etc?really, thanks again for the help...<{POST_SNAPBACK}>thanks.. see other response Link to comment Share on other sites More sharing options...
Valuater Posted March 4, 2005 Author Share Posted March 4, 2005 (edited) Have you tried the FileFindNextFile function?<{POST_SNAPBACK}>Wiil filefindnext allow me to place the info into an explorer window to use explorer tools ie>select, copy, paste,etc?i really dont know how to place the info into an explorer windowthanks CyberSlugps. I went to your site you posted , could you add more info to you description areas, no description of functions/purpose were noted, thanks Edited March 4, 2005 by Valuater Link to comment Share on other sites More sharing options...
Valuater Posted March 4, 2005 Author Share Posted March 4, 2005 I don't really get the sense of send("{l}")? And why are there so many Sleeps in it? No wonder it is slow <{POST_SNAPBACK}>the ("{l}") tells explorer to search "A&ll files and Folders"the "sleep" are to await windows processing for the next inputthanks Link to comment Share on other sites More sharing options...
Blue_Drache Posted March 4, 2005 Share Posted March 4, 2005 the ("{l}") tells explorer to search "A&ll files and Folders"the "sleep" are to await windows processing for the next inputthanks<{POST_SNAPBACK}>Tweak with the sleeps to make it run faster....if you insist on using Explorer.however, with either direction i would need tohandle the output into a file thenhandle the file output to a window thenhandle the ability to select thenhandle the selection items then....Ok....what's so difficult about that? It's just time consuming, that's all. @groupAnd hasn't this search file/folder thing been done before? IIRC, there's been a program written already that handles this....and with a GUI too, I think. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now