flat assembler
Message board for the users of flat assembler.

flat assembler > Examples and Tutorials > Monitor clipboard for changes, Win64, MathML

Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 2792
Location: dank orb
Just a simple example to get the MathML from the Math Input Panel (Win7+).

Besides using SetClipboardViewer/ChangeClipboardChain, the important bits are:
Code:
_WM_CHANGECBCHAIN:
        mov rcx,[hNextCBView]
        cmp rcx,r8
        jnz .1
        mov [hNextCBView],r9
    .0: xor eax,eax
        ret
    .1: jrcxz .0
        invoke SendMessage,rcx,rdx,r8,r9
        jmp .0

_WM_DRAWCLIPBOARD:
        invoke SendMessage,[hNextCBView],rdx,r8,r9
.
. (do something)
.
        xor eax,eax
        ret    
...handling these messages are required by the API protocol to maintain the chain of viewers.

The Math Input Panel only exposes it's translating in a custom format. Which prevents it from being pasted into any regular text editor, so this is also a mildly useful tool.

v0.1 - added hook to center MessageBox's.


Description: I even used the FASM Win API macros on this one, lol.
Download
Filename: getMathML.zip
Filesize: 38.69 KB
Downloaded: 183 Time(s)


_________________
¯\(°_o)/¯ unlicense.org


Last edited by bitRAKE on 28 Mar 2013, 14:28; edited 1 time in total
Post 28 Mar 2013, 01:48
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6020
Location: Poland
That's a very nice application bitRAKE (and a perfect example of the working 64-bit code). Smile I didn't know that such thing as mip.exe is present in my system (the only inconvenience in use is that it would be better to input formulas with a graphics tablet than mouse but it's possible).
Post 28 Mar 2013, 12:16
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2792
Location: dank orb
MathML is going to be more popular in time, too. (Added to HTML5.) I was surprised how easy it was to enter a matrix - it looks like it isn't going to work and then MIP makes the right interpretation. I've tried it on a touch screen - felt more like writing, but the processor was very slow (couple years ago) and made the interpretation sluggish.
Post 28 Mar 2013, 13:02
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6020
Location: Poland
bitRAKE wrote:
MathML is going to be more popular in time, too. (Added to HTML5.)
It's a good news to me because it will be far easier to put some mathematical text on the site. Till now not every browser has supported MathML, so to obtain a kind of universality I was forced to format all formulas as images - a lot of boring work.
Post 28 Mar 2013, 13:11
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2792
Location: dank orb
http://www.mathjax.org/ - works in all browsers right now.
Post 28 Mar 2013, 14:08
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.