Results 1 to 7 of 7

Thread: Loop in a directory

  1. #1
    Join Date
    May 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Loop in a directory

    Hey. I want to make a script where it loads all the file in my directory, and for every file i got in the directory i want it to write the files name.
    So it looks like:
    ../Directory - Pictures:
    - picture1.jpg
    - picture2.jpg
    - picture3.jpg
    - picture4.jpg
    - picture5.jpg

    and so on.. Dont know how to start, or how to do it, so really hope you can help me

  2. #2
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    First of all, scar doesn't support the jpeg format, so I think you will have to make all those .bmp
    SCAR Code:
    procedure example;
    var
    i:integer;
    fileName:string;

    begin
      for i:=1 to 5 do
      begin
        fileName:='picture'+inttostr(i)+'.bmp';
        //...do whatever you want to do with the file
      end;
    end;

  3. #3
    Join Date
    Feb 2006
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by omgh4x0rz View Post
    First of all, scar doesn't support the jpeg format, so I think you will have to make all those .bmp
    Don't think that has anything to do with what he wants to do..

    Anyway do like:

    SCAR Code:
    var
      Bla : TStringArray;
      I : Integer;

    begin
     Bla:= GetFiles('C:\', '*.*');

     for I:= 0 to Length(Bla) - 1 do
      Writeln(Bla[I]);
    end.

    ^ That will get all files in a dir.

  4. #4
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Spky View Post
    Don't think that has anything to do with what he wants to do..
    I thought he was trying to loop to do LoadBitmap for a bunch of images...

  5. #5
    Join Date
    May 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well , all the images are in bitmap format. I will try that tomorrow. Then i will post how it goes

  6. #6
    Join Date
    Feb 2006
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Meh, I'm proven wrong.

  7. #7
    Join Date
    May 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thx. It works very well.

    for I:= 0 to Length(Bla) - 1 do
    begin
    Writeln(Bla[i]);
    if(FindBitmap(LoadBitmap('C:\Users\Mads Mikkelsen\Desktop\SCAR Scripts\koder\'+Bla[i]),x,y)) then



    It is to "crack" some CAPTCHA's which i dont know how to crack automaticlly.. It works, but it works very slow when it needs to check the page for everytime, every time..
    Someone got at smarter idea to crack a 3D captcha ?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Include directory
    By mixster in forum OSR Help
    Replies: 2
    Last Post: 03-22-2008, 04:35 PM
  2. New files in rs directory Uid is back
    By zenma in forum RS has been updated.
    Replies: 3
    Last Post: 11-23-2007, 08:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •