Sign in to follow this  
Followers 0
amanda089

A couple things I need help with.

4 posts in this topic

Attached: <Track File Size.au3>

I'm trying to get all the files in a user specified directory using code I found in the forums (slightly edited to not return any directories). With or without my additions to the code, it returns an array with 2 items only when there are 5+ files in the directory ([0] => 1, [1] => ""), yet the same command in a cmd window returns the files in the directory.

On another note:

Is there any possible way to set a tooltip per item in a listview?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Local $s_Buf = '', $i_Pid = Run(@ComSpec & $s_Command & $s_Mask & '"', @WorkingDir, @SW_HIDE, 2+4)
    ProcessSetPriority($i_Pid, 5)
    While Not @error
        $s_Buf &= StdoutRead($i_Pid)
    WEnd

In this snip of your code, if ProcessSetPriorty() sets @error (and yes it has @error support) then your StdOutRead() will fail. Just a quick bug I noticed.

:P

Edit:

A thought would be to change to a Do...Until Loop so your checking @error after using StdOutRead()

Edited by MHz

Share this post


Link to post
Share on other sites

Back for another peek at a snip of your code. :P

Local $s_Command = ' /c dir /B /A-D "'
    If $i_Recurse = 1 Then $s_Command = ' /c dir /B /A-D /S "'
oÝ÷ Ù.j·¦Ë"ºY¢Z'iû^®Ø^ü0×!J.ÖÞ)¶¬jëh×6
    Local $s_Command = ' /c dir /B /A:-D "'
    If $i_Recurse = 1 Then $s_Command = ' /c dir /B /A:-D /S "'

:nuke:

Share this post


Link to post
Share on other sites

I originally got the _FileSearch($s_Mask, $i_Recurse) function from the link below. the only change I made to it was to add /A-D (which is correct as far as my comspec is concerned [WinXP SP2]. The : I believe is optional and when I added it, it had no effect on the results.)

http://www.autoitscript.com/forum/index.php?showtopic=16421 Posted by w0uter.

I'm about to the point where I won't even put in support for adding all files/dirs in a directory in any script I make.

Back for another peek at a snip of your code. :P

Local $s_Command = ' /c dir /B /A-D "'
    If $i_Recurse = 1 Then $s_Command = ' /c dir /B /A-D /S "'
oÝ÷ Ù.j·¦Ë"ºY¢Z'iû^®Ø^ü0×!J.ÖÞ)¶¬jëh×6
    Local $s_Command = ' /c dir /B /A:-D "'
    If $i_Recurse = 1 Then $s_Command = ' /c dir /B /A:-D /S "'

:nuke:

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  
Followers 0