Results 1 to 14 of 14

Thread: Spiral Search for Uptext

  1. #1
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Spiral Search for Uptext

    I'd like do write a function that does a spiral search for uptext starting at 240,170. The item I'm searching for is 80x80, so it doesn't have to be a very complicated spiral. I can do it in a square block spiral, but I was wondering if anyone knew a way to do it in a continuous spiral circle like a record groove.

    All help is appreciated, thanks in advance.

    JIM

  2. #2
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Isn't UpText's position fixed in the top left corner..
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  3. #3
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wait.. so you want the mouse to move in a spiral from that point until it gets to a point where a certain uptext is found?

  4. #4
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bbri06 View Post
    Wait.. so you want the mouse to move in a spiral from that point until it gets to a point where a certain uptext is found?
    Yes, exactly. This is a third failsafe in case my first two ways don't work.

  5. #5
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SpiralMouse() is a function in Mouse.Scar is it not?
    “Ignorance, the root and the stem of every evil.”

  6. #6
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Unfortunately, that function is not mentioned in the srl manual that is being distributed. I was looking there and didn't see anything.

    I would highly recommend that both of the outdated manuals not be distributed with SCAR and SRL and instead of there being two or more online resources, it all be combined into one big online wiki. Freddy has a wiki but it is very incomplete. Instead of having a scripting contest maybe there should be a contest to see who can complete the most Wiki pages. That would be a huge asset I would think.

  7. #7
    Join Date
    Apr 2007
    Location
    Melbourne, Aus
    Posts
    202
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hey jim, ive got the day off today so if u want, i can look at ur code and give u tips and stuff.

  8. #8
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I could work on a parser that searches all of the SRL files for functions and compile a manual.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  9. #9
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Sex View Post
    I could work on a parser that searches all of the SRL files for functions and compile a manual.
    http://freddy1990.com/srlmanual/

    And jim use SpiralMouse(var fx, fy: Integer; x1, y1, x2, y2: Integer; UpText: string; PpC, aInc: Integer): Boolean;
    PpC: The number of pixels to increase per spiral.
    aInc: The number of stops to make around each spiral.

  10. #10
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by MylesMadness View Post
    http://freddy1990.com/srlmanual/

    And jim use SpiralMouse(var fx, fy: Integer; x1, y1, x2, y2: Integer; UpText: string; PpC, aInc: Integer): Boolean;
    PpC: The number of pixels to increase per spiral.
    aInc: The number of stops to make around each spiral.
    Sorry, I was unaware of that .
    Well then Jim, there you go. Use that.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  11. #11
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by MylesMadness View Post
    [url]http://freddy1990.com/srlmanual/[/url
    Is there one of these for open dev?

  12. #12
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by IceFire908 View Post
    Is there one of these for open dev?
    No, not that I can find.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  13. #13
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you gentlemen for your help, SpiralMouse works to some degree, unfortunately, as the radius increases the step distance between points on the spiral increases. So it sort of isn't very useful. It would be more useful if you could limit the amount of pixels between increments instead of it being based on degrees. If I get the increment right for the outside spiral, the innermost spiral takes forever as there are the same amount of steps on the spiral but not much distance between them. It needs to be a logrithmic function that increases the amount of increments per circle as the radius increases. I have no idea how it would be coded. That would be a great scripting contest though.

  14. #14
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by jimthesoundman View Post
    I'd like do write a function that does a spiral search for uptext starting at 240,170. The item I'm searching for is 80x80, so it doesn't have to be a very complicated spiral. I can do it in a square block spiral, but I was wondering if anyone knew a way to do it in a continuous spiral circle like a record groove.

    All help is appreciated, thanks in advance.

    JIM
    I think you've been misunderstood. What you want is a function that will MMouse to an object if found, and check UpText?

    I could help ya, just add my MSN
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

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
  •