← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #212735]: Sikuli Chat Bot

 

Question #212735 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/212735

    Status: Open => Answered

RaiMan proposed the following answer:
Since you seem to have knowledge in Java programming: I recommend to use the Java API directly and write the bot as Java app. 
http://doc.sikuli.org/faq/030-java-dev.html#how-to-use-sikuli-script-in-your-java-programs

-- 1. check Sikuli's text feature 
before doing anything else, you should check wether you can read the chat content as text (Region.text()) sufficiently.
Without this, I do not see any sense in such a bot.
If you have any chance, to adjust the used font, then this might be a possibility, to optimize the OCR results.
If possible, copy to clipboard is always an alternative option, though a bit more complex, because you might have to position the cursor and/or the selection.

--2. knowing the user responded
I guess, there is some area on the screen, that contains the chat protocol in some outfit. The easiest way normally is to observe a specific region about visual changes. Sometimes a chat protocol has some symbols showing up at specific actions. The options you have depend on the app.

Generally: Sikuli is WYSIWYG (What You See Is What You Get). So the
approach for a Sikuli workflow is to strictly think visually (what
happens on the screen, when something else happens (mouse., keyboard or
any other triggers)) and put this visual workflow in a robust, fast and
reliable chain of Sikuli feature usages.

In the faq section (https://answers.launchpad.net/sikuli/+faqs) there
are some valuable tips, that cannot be found elsewhere.

Come back any time, if you need more tips to get on the road.

You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.