Results 1 to 6 of 6

Thread: [OGL] Click on text in chat.

  1. #1
    Join Date
    Aug 2014
    Location
    Australia
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Thumbs up [OGL] Click on text in chat.

    Hey guys,

    I want to be able to accept a trade from a specific player in the chat. The only solution I have is to split the Chat box into multiple TBoxs and then check each tbox with ogl.getChars(box[i]).
    Just wanted to check if there isn't a better way to do this?

    Cheers,

    askf
    Last edited by askf; 12-29-2015 at 06:56 AM. Reason: Resolved

  2. #2
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

    Default

    Quote Originally Posted by askf View Post
    Hey guys,

    I want to be able to accept a trade from a specific player in the chat. The only solution I have is to split the Chat box into multiple TBoxs and then check each tbox with ogl.getChars(box[i]).
    Just wanted to check if there isn't a better way to do this?

    Cheers,

    askf
    Simba Code:
    if execRegExpr('(?i).*wishes to trade with you.*', chat.getChat()[0]) then
      mouse.click('wishes to trade with you');

    Could also use ogl.getChars().toString() instead of chat.getChat() if you want to detect any text not in the chatbox, since the regular expression will narrow everything down fine. There might be a better regular expression to use as well for the situation.
    Last edited by Clarity; 12-28-2015 at 02:25 PM.

  3. #3
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    You'd want to tell it to click the last found occurrence for trading, @Clarity;.

    Also, he says he'd like to trade with a specific person - so reg ex probably wouldn't be needed.

    I do remember writing a function for this though... Could be extracted from mouse.click(string) if not. Then again, how often am I like, "You idiot, I wrote a function for that!..." to yous in Skype and turns out I just forgot to update it.
    Last edited by Obscurity; 12-29-2015 at 01:38 AM.




    Skype: obscuritySRL@outlook.com

  4. #4
    Join Date
    Jan 2012
    Location
    East Coast
    Posts
    733
    Mentioned
    81 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by Obscurity View Post
    Then again, how often am I like, "You idiot, I wrote a function for that!..." to yous in Skype and turns out I just forgot to update it.
    high(uint32)

  5. #5
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

    Default

    Quote Originally Posted by Obscurity View Post
    You'd want to tell it to click the last found occurrence for trading, @Clarity;.

    Also, he says he'd like to trade with a specific person - so reg ex probably wouldn't be needed.
    Whoops Listen to him, not me.

  6. #6
    Join Date
    Aug 2014
    Location
    Australia
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Thanks guys!

    I have just locked my chat to trade and assistance, and then checking for the name of the account I want to trade with. If it is available, click using mouse.click(runner[availableRunner]);

    Cheers again,

    `askf

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
  •