Results 1 to 4 of 4

Thread: Probably A Simple Bitmap Question.

  1. #1
    Join Date
    Dec 2007
    Location
    Los Angeles, California
    Posts
    606
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Probably A Simple Bitmap Question.

    I made a simple script that will right click on the internet explorer icon that is on the desktop then click open homepage.
    SCAR Code:
    program OpenInternet;
    {.include SRL/SRL.scar}
    var
    x,y,ohp:integer;
    procedure loadopen;
    begin
    ohp:=bitmapfromstring(96,10,'beNrdVUEOwCAM2v8/3R2WLGZGo'+
    'Kz1YE/GGBiUdhFPXUNFQ32Qu4lqtYxQTV++2Z9ClhnkvVn1Yr6kXQ'+
    'P+UDTKrvhDoVYvqT/2JYi9iAYOmEh5IArx/FFkKvnx/AERUlKXUvc'+
    'nP0bXSvxJrQt7EMSZLZyvWn8Uoioh+voCG9XwB6Ol1gL+Z9FVLOIr'+
    'XOeVp/R4f3hUbkgwQCM=');
    end;
    procedure open;
    begin
    if(findcolor(x,y,16374898,MSX1,MSY1,MSX2,MSY2))then
    begin
    writeln('Found Internet Explorer, Going To Right Click');
    wait(300+random(32))
    movemousesmooth(x,y)
    wait(32+random(16))
    mouse(x,y,2,2,false);
    end;
    if(findbitmap(ohp,x,y))then
    begin
    writeln('Found Open Home Page, Going To Click.');
    wait(300+random(32))
    movemousesmooth(x,y)
    wait(32+random(16))
    mouse(x, y, 1, 1,true);
    end;
    freebitmap(ohp)
    end;
    begin
    loadopen;
    open;
    end.
    Then i tried to make it so it opened it and then clicked add to favorites.
    SCAR Code:
    program OpenInternet;
    {.include SRL/SRL.scar}
    var
    x,y,ohp,addf:integer;
    procedure loadopen;
    begin
    ohp:=bitmapfromstring(96,10,'beNrdVUEOwCAM2v8/3R2WLGZGo'+
    'Kz1YE/GGBiUdhFPXUNFQ32Qu4lqtYxQTV++2Z9ClhnkvVn1Yr6kXQ'+
    'P+UDTKrvhDoVYvqT/2JYi9iAYOmEh5IArx/FFkKvnx/AERUlKXUvc'+
    'nP0bXSvxJrQt7EMSZLZyvWn8Uoioh+voCG9XwB6Ol1gL+Z9FVLOIr'+
    'XOeVp/R4f3hUbkgwQCM=');
    addf:=BitmapFromString(4,2,'beNq7P5V3Ftv/j3v+X/L4dykUxH'+
    '6+4P/jWf8BugAPug==');
    end;
    procedure open;
    begin
    if(findcolor(x,y,16374898,MSX1,MSY1,MSX2,MSY2))then
    begin
    writeln('Found Internet Explorer Color, Attempting To Right Click');
    wait(300+random(32))
    movemousesmooth(x,y)
    wait(32+random(16))
    mouse(x,y,2,2,false);
    end;
    if(findbitmap(ohp,x,y))then
    begin
    writeln('Found Open Home Page Bitmap, Attempting To Click.');
    wait(300+random(32))
    movemousesmooth(x,y)
    wait(32+random(16))
    mouse(x,y,1,1,true);
    end;
    if(findbitmap(addf,x,y))then
    begin
    writeln('Found Add To Favorites Bitmap, Attempting To Click.');
    wait(300+random(32))
    movemousesmooth(x,y)
    wait(32+random(16))
    mouse(x,y,1,1,true);
    end;
    freebitmap(ohp)
    freebitmap(addf)
    end;
    begin
    loadopen;
    open;
    end.
    And it does the exact same thing as the first script, anyone have any idea what i can do to make it work?
    I also tried adding a second bitmap on another script. Same thing.

  2. #2
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    If I'm reading what you said correctly, maybe your second bitmap isn't being found.


  3. #3
    Join Date
    Apr 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Im also new at scripting but make your scripts nicer man. Also I fixed the first one I think.

    SCAR Code:
    program OpenInternet;
    {.include SRL/SRL.scar}

    var
    x,y,ohp:integer;

    procedure loadopen;
    begin
    ohp:=bitmapfromstring(96,10,'beNrdVUEOwCAM2v8/3R2WLGZGo'+
    'Kz1YE/GGBiUdhFPXUNFQ32Qu4lqtYxQTV++2Z9ClhnkvVn1Yr6kXQ'+
    'P+UDTKrvhDoVYvqT/2JYi9iAYOmEh5IArx/FFkKvnx/AERUlKXUvc'+
    'nP0bXSvxJrQt7EMSZLZyvWn8Uoioh+voCG9XwB6Ol1gL+Z9FVLOIr'+
    'XOeVp/R4f3hUbkgwQCM=');
    end;

    procedure open;
    begin
    if(findcolor(x,y,16374898,MSX1,MSY1,MSX2,MSY2))then
    begin
    writeln('Found Internet Explorer, Going To Right Click');
    wait(300+random(32))
    movemousesmooth(x,y)
    wait(32+random(16))
    mouse(x,y,2,2,false);
    end;

    procedure Find;
    begin
    if(findbitmap(ohp,x,y))then
    begin
    writeln('Found Open Home Page, Going To Click.');
    wait(300+random(32))
    movemousesmooth(x,y)
    wait(32+random(16))
    mouse(x, y, 1, 1,true);
    end;
    freebitmap(ohp)
    end;

    begin
    loadopen;
    open;
    Find;
    end.

  4. #4
    Join Date
    Dec 2007
    Location
    Los Angeles, California
    Posts
    606
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I found out what was wrong, the script was trying to find the other bitmap before the internet even opened.
    And that script you posted would do the exact same thing as mine, the only difference is another procedure and some spaces. It's weird but i work with scripts better if there aren't very many spaces.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Ok, Simple Question
    By Tniffoc in forum OSR Help
    Replies: 7
    Last Post: 09-22-2008, 12:30 PM
  2. Simple Question...
    By Fr33d0ml4nc3 in forum OSR Help
    Replies: 4
    Last Post: 05-10-2008, 07:13 AM
  3. Bitmap Vs DTM Question
    By yamaha317 in forum OSR Help
    Replies: 6
    Last Post: 10-19-2007, 07:02 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
  •