Here is another one for you guys. Don't really know how much use it will be to anyone else but thought I would post it to show you the power of MS and Web Recorder.
In Adelaide we have a new train and bus ticketing system. This system uses a proximity card that has an electronic balance system. You can check the balance when validating or on a website. Although good it's a pain in the morning if your not sure how much credit you have.
Basically I have this script scheduled to run at 7:00am every morning it runs an IE window in the background (hidden) logs into the system and retrieves the balance. It then uses NotifyMyAndroid to push this balance to my phone (screen shot below).
Code: Select all
// COMPILE_OPTS|C:\Downloads\Usenet\Metro Card Balance v1.1.exe|M:\Icons\subscriptions.ico|CONSOLE=0|INCLUDES=1| /LOGFILE=\dev\nul /NOSYSTRAY /HIDE|RUNTIMES=1|BMPS=1
Let>COMMA=,
Let>MSG_HEIGHT=320
Let>MSG_WIDTH=500
Let>MSG_STAYONTOP=1
Let>MSG_CENTERED=1
Let>APP_TITLE=Metro Card Balance v1.1
DayOfWeek>CurrentDay
If>{(%CurrentDay%="1") OR (%CurrentDay%="7")}
GoTo>Exit
EndIf
IEOnDownload>1,C:\Users\Michael Allen\Desktop,ie_res
IESetTimeout>10,ie_res
IECreate>IE[0]
IESHowIE>IE[0],1
IENavigate>%IE[0]%,https://mc.adelaidemetro.com.au,ie_res
IEWaitDocumentComplete>%IE[0]%,ie_res
IEClickTag>%IE[0]%,{""},{"aspnetForm"},{"INPUT"},{"ID"},{"tbLogin"},ie_res
IEFormFill>%IE[0]%,{""},{"aspnetForm"},{"ctl00$cphContent$ucLoginCustomer$tbLogin"},{"EMAIL@SERVER. COM"},0,ie_res
IEClickTag>%IE[0]%,{""},{"aspnetForm"},{"INPUT"},{"ID"},{"tbPassword"},ie_res
IEFormFill>%IE[0]%,{""},{"aspnetForm"},{"ctl00$cphContent$ucLoginCustomer$tbPassword"},{"PASSWORD"},0,ie_res
IEClickTag>%IE[0]%,{""},{"aspnetForm"},{"INPUT"},{"ID"},{"btnLogin"},ie_res
//IEWaitDocumentComplete>%IE[0]%,ie_res
//IEFormSubmit>%IE[0]%,{""},{"aspnetForm"},ie_res
IEWaitDocumentComplete>%IE[0]%,ie_res
IEExtractTag>%IE[0]%,,TABLE,6,0,TABLE6,ie_res
IEExtractTag>%IE[0]%,,TABLE,11,0,TABLE11,ie_res
Label>ReExtract
IEExtractTag>%IE[0]%,,TABLE,6,0,TABLE6,ie_res
IEExtractTag>%IE[0]%,,TABLE,11,0,TABLE11,ie_res
If>%TABLE6%=
GoTo>ReExtract
Else
StringReplace>%TABLE6%,Regular Fare,,TABLE6
Trim>%TABLE6%,TABLE6
StringReplace>%TABLE11%,Concession Fare,,TABLE11
Trim>%TABLE11%,TABLE11
Let>URL=application=MetroCard Balance&event=Regular Balance %TABLE6%&description=Concession Balance %TABLE11%
StringReplace>%URL%,%SPACE%,%20,URL
HTTPRequest>http://www.notifymyandroid.com/publicapi/notify?apikey=XXX&%URL%,,POST,,INFO
Endif
IEClickTag>%IE[0]%,{""},{""},{"A"},{"TEXT"},{"Log out"},ie_res
IEWaitDocumentComplete>%IE[0]%,ie_res
IEQuit>%IE[0]%,ie_res
Label>Exit