Jump to content
Sign in to follow this  
Valuater

help please!

Recommended Posts

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...


NEWHeader1.png

Share this post


Link to post
Share on other sites

ControlSend ?


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites

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 :lmao:

Share this post


Link to post
Share on other sites

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 by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

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 by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

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...

<{POST_SNAPBACK}>

thanks.. see other response

NEWHeader1.png

Share this post


Link to post
Share on other sites

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 window

thanks CyberSlug

ps. 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 by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

I don't really get the sense of send("{l}")? And why are there so many Sleeps in it? No wonder it is slow :lmao:

<{POST_SNAPBACK}>

the ("{l}") tells explorer to search "A&ll files and Folders"

the "sleep" are to await windows processing for the next input

thanks


NEWHeader1.png

Share this post


Link to post
Share on other sites

the ("{l}") tells explorer to search "A&ll files and Folders"

the "sleep" are to await windows processing for the next input

thanks

<{POST_SNAPBACK}>

Tweak with the sleeps to make it run faster....if you insist on using Explorer.

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....

Ok....what's so difficult about that? It's just time consuming, that's all.

@group

And 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

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...