Jump to content

Recommended Posts

Posted

Smoke, I wrote it for him earlier:

#include <file.au3>
#include <array.au3>

$s_path = "C:\CustomerLogs\"
$s_serial = InputBox("Serial Search", "Enter Serial # to search for.")
$a_filelist = _FileListToArray($s_path)
If (Not IsArray($a_filelist)) Then
    MsgBox (0,"","No Files\Folders Found.")
    Exit
EndIf
For $i = 0 to Ubound($a_filelist)-1
    $a_searchresult = StringRegExp($a_filelist[$i],'('&$s_serial&'_[0-9]{1}_[0-9]{10}.log)',1)
    If IsArray($a_searchresult) = 1 Then
        MsgBox(0,"File Found!","File: "&$a_filelist[$i]&" Matches: "&$s_serial&@CRLF&"Copying to"&$s_path&$s_serial&".log")
        FileCopy ( $s_path&$a_filelist[$i], $s_path&$s_serial&".log",1)
    EndIf
Next
Exit

He says he has beta installed, but it isnt using the beta <file.au3> for some reason.

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
  • Moderators
Posted

Smoke, I wrote it for him earlier:

#include <file.au3>
#include <array.au3>

$s_path = "C:\CustomerLogs\"
$s_serial = InputBox("Serial Search", "Enter Serial # to search for.")
$a_filelist = _FileListToArray($s_path)
If (Not IsArray($a_filelist)) Then
    MsgBox (0,"","No Files\Folders Found.")
    Exit
EndIf
For $i = 0 to Ubound($a_filelist)-1
    $a_searchresult = StringRegExp($a_filelist[$i],'('&$s_serial&'_[0-9]{1}_[0-9]{10}.log)',1)
    If IsArray($a_searchresult) = 1 Then
        MsgBox(0,"File Found!","File: "&$a_filelist[$i]&" Matches: "&$s_serial&@CRLF&"Copying to"&$s_path&$s_serial&".log")
        FileCopy ( $s_path&$a_filelist[$i], $s_path&$s_serial&".log",1)
    EndIf
Next
Exit

He says he has beta installed, but it isnt using the beta <file.au3> for some reason.

Well, I showed him how he wasn't actually using the Beta, his error messages show 3.1.1.0 (release version). So that could be part of the problem. But I doubt seriously that he just used what you gave him without trying to manipulate it for his own needs, that's what I was asking to see. Because he either broke it somewhere or he's not using the Beta calls right.

It amazes me that people ask for help, and the issue could be solved so quickly if they just posted what they are having issues with rather than trying to explain it. The explinations generally lack proper information to either "A" replicate the issue or "B" even understand what they are saying. That's why their script that is actually breaking is a great place to start IMHO.

But who am I to second guess I suppose. It just get's to the point sometimes that people have an issue of helping us to help them, and after a while, I get a mental list of people that if they post for support, I tend to just ignore completely even if the answer is so obvious.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

OK, I have re-installed and re-updated everything. Finally the script is working.. I don't know what to say, but to thank each and everyone of you. I'm sure that most of you are fraustrated with me with my inexperience with script writting. It's a challenge to me, but with time I will understand and be able to help others the same way you are all helping me.

I won't take credit for writting any of the scripts posted. I just post my ideas with simple / incomplete scripts that are developed by experienced codes. Thank you all. Have a good night.

Meetrix

Smoke, I wrote it for him earlier:

#include <file.au3>
#include <array.au3>

$s_path = "C:\CustomerLogs\"
$s_serial = InputBox("Serial Search", "Enter Serial # to search for.")
$a_filelist = _FileListToArray($s_path)
If (Not IsArray($a_filelist)) Then
    MsgBox (0,"","No Files\Folders Found.")
    Exit
EndIf
For $i = 0 to Ubound($a_filelist)-1
    $a_searchresult = StringRegExp($a_filelist[$i],'('&$s_serial&'_[0-9]{1}_[0-9]{10}.log)',1)
    If IsArray($a_searchresult) = 1 Then
        MsgBox(0,"File Found!","File: "&$a_filelist[$i]&" Matches: "&$s_serial&@CRLF&"Copying to"&$s_path&$s_serial&".log")
        FileCopy ( $s_path&$a_filelist[$i], $s_path&$s_serial&".log",1)
    EndIf
Next
Exit

He says he has beta installed, but it isnt using the beta <file.au3> for some reason.

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
×
×
  • Create New...