Results 1 to 3 of 3

Thread: Recuring actions

  1. #1
    Join Date
    Feb 2009
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Recuring actions

    I am trying to write a recuring action for a small game i am playing

    Code:
    var
    i: integer;
    
    procedure Walk(Sq: LongInt);
    var
    r: integer;
    begin
      SendKeysvb('m', False);
      SendKeysvb('{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}{DEL}', False);
      Writeln(Sq);
      ClickMouse(1020, 40, True);
      SendKeysvb('~', False);
      r:= 0;
      repeat
      r: = r + 1;
         ClickMouse(130, 60, True);
         Wait(1000);
      until(r >= 10)
      Wait(1000);
      SendKeysvb('i', False);
      Wait(500);
      ClickMouse(470, 200, False);
      ClickMouse(475, 210, True);
      SendKeysvb('~', False);
    end;
    begin
    i:= 0;
    repeat
    i:= i + 1;
    Walk(3468);
    until(i >= 5);
    end.
    It is supposed to work like this:
    the 3468 is a map grid that gets entered into the map text box after "SendKeysvb('m', False);" (m opens the map)
    "SendKeysvb('{DEL}..." deletes the previous grid number.
    What I am trying to do with the "Walk(3468);" procedure is to somehow att that "3468" integer into the map text box
    So all I need to do is add a whole bunch of Walk(####); at the bottom of the script so I dont have to repeat writing the exact function all the time.
    Any suggestions?

  2. #2
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nvm

  3. #3
    Join Date
    Feb 2009
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Self fix

    I just Figured it out.
    Change "procedure Walk(Sq: LongInt);" to "procedure Walk(Sq: String);"
    Channge "Writeln(Sq);" to "SendKey(Sq)"
    Change "Walk(3468);" to "Walk('3468');"

    I must be tired.
    The issue was i could get the "3468" to output.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Do i need TPAs in these actions?
    By marpis in forum OSR Help
    Replies: 3
    Last Post: 12-15-2008, 09:22 PM
  2. Multiple actions in a case?
    By Macros in forum OSR Help
    Replies: 5
    Last Post: 11-17-2008, 04: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
  •