• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Web page automation/scheduler?

Mr. Incredible

Well-Known Member
I commute daily by train, so I have to check the train status through a website. The form POSTs data after you fill in 3 or 4 fields and hit the submit button, and then it returns a status webpage.

Are there any apps to automate this so I don't have to type all of that in everyday.

I use iMacros + task scheduler on my PC.
 
I've done things like this before on my PC, but always have to figure it out as I go because I do it so infrequently that I don't retain much of what I learned from the previous time.

Bookmarking the page you end up at hasn't worked for you?

A link to the web page and an example of some valid data for the fields would be a good place to start.
 
I've done things like this before on my PC, but always have to figure it out as I go because I do it so infrequently that I don't retain much of what I learned from the previous time.

Bookmarking the page you end up at hasn't worked for you?

A link to the web page and an example of some valid data for the fields would be a good place to start.

amtrak.com
Click the "Status" tab
fill in "From" and "To" (ie LAX to SAN for LA to San Diego)
Click the "Check Status" button

It's a form script result, so bookmarking won't work.
 
I took a look at the page, and stripped out what I thought was unnecessary, pre-populated the TO and FROM fields, and added the code necessary to auto-submit the form, and it appears to work. The only problem I'm running into is being able to pre-populate the date field. But if you copy the following code and save it as an HTML file, just opening it should get you the page you ultimately want, but only for the date hardcoded into the file.

Hopefully someone mode knowledgeable than me can tweak it, after they stop shaking their head and laughing at the mess I made.

Code:
<html><head><title></title></head>
<body onload="ff_status_form.submit()">
<script type="text/javascript">

</script>

<form action="http://tickets.amtrak.com/itd/amtrak" name="ff_status_form" method="post"><input type="hidden" name="requestor" value="amtrak.presentation.handler.page.AmtrakCMSNavigationTabPageHandler" />
<div id="ff_status_step_1" class="subdiv1">
<div class="form_line_wrapper first">
<span class="form_entry">
<input value="Fri, Aug 20, 2010" maxlength="22" type="text" id="wdfdate10" readonly="readonly" size="22" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departDate.date"  /><script language="JavaScript" type="text/javascript">
<!--
document.write('<a class="calLink noloading" id="calLink10">&nbsp;</a>');//-->
</script>
<br />
</span>
</div>
<div class="form_line_wrapper">
<span class="form_entry">
<input type="hidden" name="xwdf_trainNumber" value="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/segmentRequirements[1]/serviceCode" /><input value="optional" maxlength="8" type="text" id="status_train_num" onfocus="if (this.value=='optional') { this.value=''; updateMaxLength(); };" size="4" name="wdf_trainNumber" />
</span>
</div>
<br class="clear_both" />
</div>
<div id="ff_status_step_2" class="subdiv">
<div id="ff_status_footnote_submit_wrapper">
<p>One city is required if train number is used.</p>
</div>
<div id="status_dep_city" class="ff_city_wrapper">
<!-- itd:locationinput id="status_dep" wdfxpath="travelSelection/journeySelection[1]/departLocation" wdfhtmlname="wdf_origin" wdflimitedlocations="resource:TRAVEL_USE_LIMITED_LOCATIONS" size="25" / -->
<input type="hidden" name="xwdf_origin" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/departLocation/search" /><input autocomplete="off" maxlength="150" type="text" id="status_from" name="wdf_origin" value="LAX" />
<p><span class="find_a_station">
<a href="javascript:fieldName='status_from'; openStationList();" title="Click for a list of stations.">Find a Station</a>
</span></p>
</div>
<div id="status_arr_city" class="ff_city_wrapper">
<!-- itd:locationinput id="status_to" wdfxpath="travelSelection/journeySelection[1]/arriveLocation" wdfhtmlname="wdf_destination" wdflimitedlocations="resource:TRAVEL_USE_LIMITED_LOCATIONS" size="25" / -->
<input type="hidden" name="xwdf_destination" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/arriveLocation/search" /><input autocomplete="off" maxlength="150" type="text" id="status_to" name="wdf_destination" value="SAN" />
<p><span class="find_a_station">
<a href="javascript:fieldName='status_to'; openStationList();" title="Click for a list of stations.">Find a Station</a>
</span></p>
</div>
</div>
</div>
<div id="ff_status_submit_wrapper" class="subdiv">
<input type="hidden" name="_handler=amtrak.presentation.handler.request.rail.AmtrakRailTrainStatusSearchRequestHandler/_xpath=/sessionWorkflow/productWorkflow[@product='Rail']" />
<input type="image" src="/images/en/btn_checkStatus.gif" alt="Check Train Status" border="0" name="_handler=amtrak.presentation.handler.request.rail.AmtrakRailTrainStatusSearchRequestHandler/_xpath=/sessionWorkflow/productWorkflow[@product='Rail']" />
</div>
</form>
</body>
</html>

Good luck! :)
 
Back
Top Bottom