Back

This is a Manymacros example:
            'The script fill the captcha of gmail.
            VERSION BUILD=7000908
            TAB T=1
            TAB CLOSEALLOTHERS
            SET !EXTRACT_TEST_POPUP NO
            URL GOTO=https://www.google.com/accounts/NewAccount
            'Step 1: save the captcha picture to local disk
            FILEDELETE NAME=c:\captcha.jpg
            ONDOWNLOAD FOLDER=c:\ FILE=captcha.jpg
            TAG POS=1 TYPE=IMG ATTR=ALT:Visual<SP>verification CONTENT=EVENT:SAVEITEM
            'Step 2: Open the a new tab, and goto manymacros.com, and submit the captcha picture
            TAB OPEN
            TAB T=2
            URL GOTO=http://Fasttypers.org/ImageUpload.aspx
            'The KEY is used to identify each of our customers, which you can get from our site.
            TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=ID:txtKey CONTENT=key
            'The path of the captcha picture saved is assigned to the CONTENT
            TAG POS=1 TYPE=INPUT:FILE FORM=NAME:form1 ATTR=ID:imgFile CONTENT=C:\captcha.jpg
            'Submit the userid and the captcha to captchaocr.com
            TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form1 ATTR=ID:btnSubmit
            'This line is not supported by firefox iMacros plugin
            'You can just remove this line
            WAIT SECONDS=#DOWNLOADCOMPLETE#
            'Step 3: Extract the characters that are recoginzed from the picture of captcha.
            TAG POS=1 TYPE=FONT ATTR=TXT:* EXTRACT=TXT
            TAB CLOSE
            TAB T=1
            'Step 4: Fill the recognized characters to the verification box
            TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:createaccount ATTR=ID:newaccountcaptcha CONTENT={{!EXTRACT}}