Results 1 to 6 of 6

Thread: Need help with simple script

  1. #1
    Join Date
    Feb 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help with simple script

    ok so Im writing a script that posts ads on a local website. The need for the script is because I offer a worldwide service so I need to post the ad in all the city's listed.

    This is what I have so far

    SCAR Code:
    program New;
    begin
    clickmouse(200, 48,true);  //address bar
    wait(1000);
    sendkeys('www.kijiji.ca');
    sendkeys(chr(13));
    wait(2000);
    clickmouse(736, 108,true);    //post add
    wait(5000);
    holdmouse(1019,733,true)      //scroll down
    wait(3000)
    releasemouse(1019,733,true)
    clickmouse(122,230,true)
    wait(2000)
    clickmouse(239,402,true)    //BOLD BUTTON
    wait(3000)
    clickmouse(340,405,true)  //center button
    wait(3000)
    clickmouse(281,504,true)
    sendkeys('International Shipping Link Inc.')
    end.

    I am currently using SCAR but I have Simba also and you can help me out using whichever one. just let me know which.

    so im going to list what I need help in

    1. I need to know how to label the main part of my script (kind of what i posted up there). i think its called a procedure. so that it can post the ad once im on the page for a different city. So i dont have to copy paste the above code.

    2. I need to know how to tell SCAR/SIMBA to clickmouse once the page is loaded. instead of "wait(2000)"

    3. I need to tell SCAR/SIMBA to click on a specific link on a page. just in case i use this script on a different computer with a different browser or resolution the clickmouse command wont work.

    Thanks

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    If you're going to be constantly using the same website to advertise then you could use bitmaps to find what you're trying to click, etc. There are numerous tutorials on bitmaps here at villavu if you need assistance.

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

    Default

    Thanks NCDS

    I tried as hard as I could and i think I almost got somewhere. Im just trying it on its own right now without the rest of the script.

    I have a problem though. Im trying to make it click on the 'bitmap' the script compiled but nothing happened.


    Var post_ad_free, x, y : Integer;

    Begin
    post_ad_free := BitmapFromString(82, 11, 'beNqLZPj/+/8I' +
    'RAwMyWiIRraQKnstkgENYRV/vqnn+/v3JGkBIqCN31EBpghBgF8L' +
    'RBaPGqxSEOfhF39//xzI49umEK8Fl41DyNdoXGr5Gp7s0RQgC2JV' +
    'Q4yv4boGla/RvE+kIP4wxKqX/BR+eS9mCkdGuMQxS7Pvn79DEFY2' +
    'siBWlXikiGHDERYvYBN/vqoFTQsuoyh3MJ7wQTMBV6gS6Ws84u/v' +
    'XwMy7i0qpo+viUwAWMWp6Gsgen56Kyi6D6+lta8pT/YQcar4Goju' +
    'tXkBue+fP6eWr7EmZlwpHE+04olurOaT5GtodINzN5FFwTUAk mc8' +
    'uA==');

    If FindBitmap(post_ad_free, x, y) Then
    clickmouse(x, y, True);
    End.

  4. #4
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by arraness14 View Post
    Thanks NCDS

    I tried as hard as I could and i think I almost got somewhere. Im just trying it on its own right now without the rest of the script.

    I have a problem though. Im trying to make it click on the 'bitmap' the script compiled but nothing happened.
    Try to debug it a bit; that's the best way to find out what's wrong.

    So perhaps try this:
    Simba Code:
    if FindBitmap(..) then
      ClickMouse()
    else
      Writeln('Failed to find bitmap');

    You could also look into DTM's if necessary, though it shouldn't be.

  5. #5
    Join Date
    Feb 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    UGH cant get it to work

  6. #6
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by arraness14 View Post
    UGH cant get it to work
    Hello. PM me your MSN and I will help you out

    Thanks.


    ~Home

Thread Information

Users Browsing this Thread

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

Posting Permissions

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