View Full Version : [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
Clarity
12-28-2015, 01:39 PM
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
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.
Obscurity
12-29-2015, 01:32 AM
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.
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)
Clarity
12-29-2015, 02:10 AM
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.
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
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.