(΅WebAutomation - Display - Appmask) Just for fun: Learn Mandarin strokes with Robin

This may be an unconventional thing to do with Robin, so I’ve posted it here under ‘Uncategorized’.

The user can paste in a Mandarin character (just one, not a compound!) and Robin will take us to web page that demonstrates stroke order.

The appmask has just a main screen (MainPage) and one button (Animate). Here’s the code screenshot:

The code itself, please modify the path for your purposes:

import "C:\Users\you\Documents\Robin\9.2\mandarin_strokes.appmask"

Display.InputDialog \
    Title:'Learn Mandarin character strokes' \
    Message:'Please copy and paste (or enter) a Mandarin character' \
    DefaultValue:'电' \
    InputType:Display.InputType.SingleLine \
    IsTopMost:False \
    UserInput=> CharForStrokes \
    ButtonPressed=> ButtonPressed

WebAutomation.LaunchFirefox \
    Url:  'http://www.chinesehideout.com/tools/strokeorder.php?c=' + CharForStrokes\
    WindowState:WebAutomation.BrowserWindowState.Maximized \
    ClearCache:False \
    ClearCookies:False \
    BrowserInstance=> Browser

wait 2

WebAutomation.Click \
    BrowserInstance:  Browser\
    Control: mandarin_strokes.MainPage.Animate

And an animated GIF showing what it does. The default character is ‘电’, which is super-common. I generally cut-and-paste a character, since I don’t have an appropriate input method installed.

Just for fun!

Regards,
burque505

2 Likes

Hi burque505,

It’s very nice this your robot. I’m in trouble to get
the appmask for that. Please, could you give me a tip to do that?
Thanks and Regards!

Hi @nldavila, sure thing.
First, go to this page (you can pick any character for the end of the query, or none). The URL is outlined at the top, and the “Animate” control is at the bottom.

The main screen of the appmask looks like this:

and the animate control looks like this:

Hope this helps!
Best regards,
burque505

2 Likes

Burque505, thank you very much and it will help me.
Best Regards.

1 Like