Пример макроса для регистрации

Отправлено 15 июн. 2020 г., 14:44 пользователем Норрин Радд   [ обновлено 15 июн. 2020 г., 14:54 ]
Этот пример предоставлен для обучения. Он будет дополняться. Разбор используемых в макросе команд смотрите в комментариях и по ссылкам.

VERSION BUILD=7401004 RECORDER=FX
' Так выглядит строка комментария. Обратите внимание на символ слева
' Этот макрос для регистрации на http://mail.yahoo.com
' сервис, под который он написан, больше не работает.
' Изучите этот пример и сделайте  регистратор под свои задачи
SET !ERRORIGNORE YES
' ниже строка для отключения отладочного режима, который автоматически активируется
' при использовании команды EXTRACT
SET !EXTRACT_TEST_POPUP NO
SET !EXTRACT NULL
SET !TIMEOUT 180
set !DATASOURCE c:\fakename.csv
set !var2 1
add !var2 {{!loop}}
SET !DATASOURCE_COLUMNS 30
SET !DATASOURCE_LINE {{!var2}}
CLEAR
''proxy
PROXY ADDRESS={{!col19}}:{{!col20}}
'PROXY ADDRESS=123.62.6.58:80
TAB CLOSEALLOTHERS
'''''''''''create yahoo
TAB T=1
URL GOTO=https://edit.europe.yahoo.com/registration?.intl=us&new=1&.src=ym&.done=http://mail.yahoo.com
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:firstname CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:secondname CONTENT={{!COL3}}
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:gender CONTENT=${{!COL1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:dd CONTENT={{!COL17}}
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:mm CONTENT=%{{!COL16}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:yyyy CONTENT={{!COL18}}
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:country CONTENT=%gd
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:domain CONTENT=%yahoo.com
'TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:postalcode CONTENT={{!COL7}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:yahooid CONTENT={{!COL9}}
TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:regFormBody ATTR=ID:yidHelperBtn
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:regFormBody ATTR=ID:password CONTENT={{!COL10}}
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:regFormBody ATTR=ID:passwordconfirm CONTENT={{!COL10}}
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:secquestion CONTENT=%What<SP>is<SP>the<SP>first<SP>name<SP>of<SP>your<SP>favourite<SP>uncle?
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:secquestion CONTENT=%What<SP>is<SP>the<SP>first<SP>name<SP>of<SP>your<SP>favorite<SP>uncle?
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:secquestionanswer CONTENT={{!COL12}}
TAG POS=1 TYPE=SELECT FORM=NAME:regFormBody ATTR=ID:secquestion2 CONTENT=%What<SP>is<SP>the<SP>name<SP>of<SP>the<SP>street<SP>on<SP>which<SP>you<SP>grew<SP>up?
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:secquestionanswer2 CONTENT={{!COL4}}
TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:regFormBody ATTR=ID:yidHelperBtn
wait seconds=5
TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:regFormBody ATTR=ID:yidHelperBtn
''Captcha - sometimes it need to enter it twice
PROMPT Please<SP>enter<SP>Captcha !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:captchaV5Answer CONTENT={{!var1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:cword CONTENT={{!var1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:regFormBody ATTR=ID:IAgreeBtn
''Captcha2 - sometimes it need to enter it twice
PROMPT Please<SP>enter<SP>Captcha !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:captchaV5Answer CONTENT={{!var1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:regFormBody ATTR=ID:cword CONTENT={{!var1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:regFormBody ATTR=ID:IAgreeBtn
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:regConfirmBodyFrm ATTR=ID:ContinueBtn
wait seconds=5
'''''''''''create twitter
TAB T=1
URL GOTO=http://twitter.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:https://twitter.com/signup ATTR=NAME:user[name] CONTENT={{!col2}}<SP>{{!col3}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:https://twitter.com/signup ATTR=NAME:user[email] CONTENT={{!col9}}@yahoo.com
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:https://twitter.com/signup ATTR=NAME:user[user_password] CONTENT={{!col10}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:https://twitter.com/signup ATTR=VALUE:Sign<SP>up
wait seconds=5
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:https://twitter.com/account/create ATTR=NAME:user[screen_name] CONTENT={{!col9}}
wait seconds=5
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:phx-signup-form ATTR=VALUE:Create<SP>my<SP>account
wait seconds=5
''captcha
PROMPT Please<SP>enter<SP>Captcha !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:https://twitter.com/account/create ATTR=ID:recaptcha_response_field CONTENT={{!var1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:phx-signup-form ATTR=VALUE:Create<SP>my<SP>account
wait seconds=5
URL GOTO=https://twitter.com/settings/profile
TAG POS=1 TYPE=A ATTR=ID:settings_link
TAG POS=1 TYPE=A ATTR=ID:profile_tab
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/settings/profile ATTR=ID:user_url CONTENT=http://www.{{!col14}}
TAG POS=1 TYPE=INPUT:FILE FORM=ACTION:/settings/profile ATTR=ID:profile_image_uploaded_data CONTENT=C:\image.jpg
wait seconds=5
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:profile_form ATTR=ID:save
wait seconds=5
''''confirm twitter email on yahoo
TAB T=1
URL GOTO=http://yahoo.com/
TAG POS=3 TYPE=A ATTR=TXT:Mail
TAG POS=2 TYPE=SPAN ATTR=TXT:Mail
TAB T=1
TAG POS=1 TYPE=I ATTR=ID:inbox-label
TAG POS=1 TYPE=DIV ATTR=ID:yui*
FRAME F=0
tag pos=1 type=input attr=type:checkbox content=$Select<sp>this<sp>email
TAG POS=1 TYPE=DIV ATTR=DIR:&&ROLE:gridcell&&CLASS:subj&&TXT:Confirm<sp>your<sp>Twitter<sp>account,<sp>*
FRAME F=6
TAG POS=1 TYPE=SPAN ATTR=ID:lw_*_0
wait seconds=2
TAG POS=1 TYPE=I ATTR=ID:inbox-label
TAG POS=1 TYPE=DIV ATTR=ID:yui*
FRAME F=0
tag pos=1 type=input attr=type:checkbox content=$Select<sp>this<sp>email
TAG POS=1 TYPE=DIV ATTR=DIR:&&ROLE:gridcell&&CLASS:subj&&TXT:Confirm<sp>your<sp>Twitter<sp>account,<sp>*
FRAME F=6
TAG POS=1 TYPE=SPAN ATTR=ID:lw_*_0
''''''''''''''create twitterfeed account
TAB T=1
URL GOTO=http://twitterfeed.com/
TAG POS=1 TYPE=A ATTR=TXT:Don't<SP>have<SP>an<SP>account<SP>yet?
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/users ATTR=ID:user_email CONTENT={{!col9}}@yahoo.com
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:/users ATTR=ID:user_password CONTENT={{!col10}}
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:/users ATTR=ID:user_password_confirmation CONTENT={{!col10}}
wait seconds=10
''input captcha
PROMPT Please<SP>enter<SP>Captcha !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/users ATTR=ID:recaptcha_response_field CONTENT={{!var1}}
TAG POS=1 TYPE=IMG ATTR=SRC:http://static.twitterfeed.com/images/create_account_btn.jpg
wait seconds=10
URL GOTO=http://twitterfeed.com/dashboard
TAG POS=1 TYPE=IMG ATTR=SRC:http://twitterfeed.com/images/create_new_feed_btn.jpg
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/feeds ATTR=ID:feed_feedname CONTENT=feed1
''''set feed1 here
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/feeds ATTR=ID:feed_feedurl CONTENT={{!col22}}
TAG POS=1 TYPE=A ATTR=TXT:Advanced<SP>Settings
TAG POS=1 TYPE=SELECT FORM=ACTION:/feeds ATTR=ID:feed_limit_id CONTENT=%5
TAG POS=1 TYPE=A ATTR=TXT:Continue<SP>to<SP>Step<SP>2
TAG POS=1 TYPE=A ATTR=TXT:Twitter
'add twitter
TAG POS=1 TYPE=A ATTR=ID:twitter_oauth
wait seconds=5
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:oauth_form ATTR=ID:allow
wait seconds=5
TAG POS=1 TYPE=SELECT FORM=ACTION:/feeds/*/services ATTR=ID:service_params_twittername CONTENT=${{!col9}}
TAG POS=1 TYPE=A ATTR=TXT:Create<SP>Service
TAG POS=1 TYPE=A ATTR=CLASS:btn_1&&HREF:/feeds/*/confirm&&TXT:All<SP>Done!
TAG POS=1 TYPE=A ATTR=TXT:Go<SP>to<SP>Dashboard
TAG POS=1 TYPE=IMG ATTR=SRC:http://twitterfeed.com/images/create_new_feed_btn.jpg
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/feeds ATTR=ID:feed_feedname CONTENT=feed2
''''set feed2 here
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/feeds ATTR=ID:feed_feedurl CONTENT={{!col24}}
TAG POS=1 TYPE=A ATTR=TXT:Advanced<SP>Settings
TAG POS=1 TYPE=SELECT FORM=ACTION:/feeds ATTR=ID:feed_limit_id CONTENT=%5
TAG POS=1 TYPE=A ATTR=TXT:Continue<SP>to<SP>Step<SP>2
TAG POS=1 TYPE=A ATTR=TXT:Twitter
TAG POS=1 TYPE=SELECT FORM=ACTION:/feeds/*/services ATTR=ID:service_params_twittername CONTENT=${{!col9}}
TAG POS=1 TYPE=A ATTR=TXT:Create<SP>Service
TAG POS=1 TYPE=A ATTR=CLASS:btn_1&&HREF:/feeds/*/confirm&&TXT:All<SP>Done!
TAG POS=1 TYPE=A ATTR=TXT:Go<SP>to<SP>Dashboard
TAG POS=1 TYPE=IMG ATTR=SRC:http://twitterfeed.com/images/create_new_feed_btn.jpg
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/feeds ATTR=ID:feed_feedname CONTENT=feed3
''''set feed3 here
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/feeds ATTR=ID:feed_feedurl CONTENT={{!col23}}
TAG POS=1 TYPE=A ATTR=TXT:Advanced<SP>Settings
TAG POS=1 TYPE=SELECT FORM=ACTION:/feeds ATTR=ID:feed_limit_id CONTENT=%5
TAG POS=1 TYPE=A ATTR=TXT:Continue<SP>to<SP>Step<SP>2
TAG POS=1 TYPE=A ATTR=TXT:Twitter
TAG POS=1 TYPE=SELECT FORM=ACTION:/feeds/*/services ATTR=ID:service_params_twittername CONTENT=${{!col9}}
TAG POS=1 TYPE=A ATTR=TXT:Create<SP>Service
TAG POS=1 TYPE=A ATTR=CLASS:btn_1&&HREF:/feeds/*/confirm&&TXT:All<SP>Done!
TAG POS=1 TYPE=A ATTR=TXT:Go<SP>to<SP>Dashboard
url goto=http://www.imacros.org
Comments