Mais avant le téléchargement , je dois choisir le type de fichier à télécharger (csv ou ov2) (voir lignes rouges)
J'utilise donc lignes suivants pour faire mon choix , qui fonctionne bien mais lorsque je clique sur le bouton 'download' (ligne verte),
le choix se réinitialise et le chargement ne fonctionne pas.
le code source de la page
► Afficher le texte
Code : Tout sélectionner
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Trapster® - Garmin TomTom and other Navigation Device Alerts</title>
<meta name="description" content="Trapster is a FREE service that allows users to share the location of police speed traps using mobile phones and other types of devices." />
<meta name="keywords" content="speedtrap, speed trap, police, radar, radar detector, mobile phone, gps, nokia, blackberry, windows mobile" />
<link rel="image_src" href="http://www.trapster.com/trapster_100x100.png" />
<BASE HREF="http://www.trapster.com/">
<link REL="SHORTCUT ICON" HREF="http://www.trapster.com/favicon.ico" />
<link href="http://www.trapster.com/reset.css" rel="stylesheet" type="text/css" />
<link href="http://www.trapster.com/styles.css?v=1.0" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="validators.js"></script>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAFB5SQStjmc3pVCyvqBWhjRTxH8-DsxTnRKB1HD4n434_nxORUhQAKR64PvEMf8B1nGxFZcfHjShbLg&sensor=false" type="text/javascript"></script>
</head><script type="text/javascript" src="rl/scripts/cfgpoiui.js?v=1.0"></script>
<script src="rl/scripts/prototype.js" type="text/javascript"></script>
<body onload="load()" onUnload="GUnload()">
<script type="text/javascript">
var my_domain = "trapster.com";
var has_groups = false;
</script>
<div id="container">
<div id="header" class="logged-in">
<a href="index.php" id="logo"></a>
<h2>Trapster</h2>
<a href="index.php" title="Trapster™ - Speed Trap Sharing System"><span></span></a>
<ul>
<li ><a href="index.php" title="Welcome Page">HOME</a></li>
<li ><a href="rl/Trapster.php" title="View Trapster™ Speed Traps In Your Area">TRAPMAP</a></li>
<li ><a href="http://blog.trapster.com" title="Blog">BLOG</a></li>
<li ><a href="inthenews.php" title="News">NEWS</a></li>
<li ><a href="contact.php" title="Contact Trapster™">CONTACT</a></li>
<li ><a href="help.php" title="Get Help">HELP</a></li>
<li ><a href="account.php" title="Sign Out Of Your Trapster Account">MY ACCOUNT</a></li>
<li><a href="do-logout.php" title="Sign Out Of Your Trapster Account">LOGOUT</a></li>
</ul>
<div class="clear"></div>
</div>
<div id="subnav">
<ul>
<li><a href="presentation.php" title="Watch A Video Presentation Of Trapster">VIEW PRESENTATION</a></li>
<li><a href="gettingstarted.php" title="Getting Started">GETTING STARTED</a></li>
<li><a href="help.php" title="Help">HELP</a></li>
</ul>
<div class="clear"></div>
</div> <div id="content">
<h3>Garmin, TomTom, and other Navigation Device Alerts</h3>
<p>
<img src='images/nuvi.jpg'width='260' height='260'>
<img src='http://blog.tmcnet.com/blog/tom-keating/images/tomtom-go-920-t.jpg' width='200' height='240'>
</p>
<h3>Garmin and TomTom easy install links for US Mainland 48 states (non US users see section below)</h3>
<p>
We recommend that you use one of the following links if you have a Garmin or TomTom device, and you only need points for the US mainland 48 states.<br/>
<br/>
<a href='garmin-quick-instructions.php'><b>Quick Install for Garmin US mainland 48 states</b></a><br/>
<a href='tomtom-quick-instructions.php'><b>Quick Install for TomTom US mainland 48 states</b></a><br/>
<em>Note: The quick install files are very large. If your device does not have enough memory, you may need to use the Advanced instructions below.</em>
</p>
<h3>The remaining instructions are for advanced users and non US users</h3>
<p>You only need to take the steps below if you would like to:<br/>
* Customize the alerts, by type and/or confidence level.<br/>
* Download Trapster POIs for areas outside the US mainland 48 states.<br/>
* Your GPS device does not have enough memory to hold the files above.<br/>
* You want to get emails when data changes in specific areas or routes.<br/>
* You have a device other than Garmin or TomTom.<br/>
</p>
<p><a href='garmin-tomtom-instructions.php'><strong>Read this first>></strong> Instructions for Garmin, TomTom, and other devices</a></p>
<p><a href='smsnavdemo.php'>Watch a video demonstrating how to download data for your navigation device, and also set up SMS alerts for your mobile phone.</a></p>
<p class="forgot-suc">Successfully changed POI settings!</td>
<form method="post" name="smsfrm" action="config-poi.php">
<p>
<label>
<input type="checkbox" name="expactive" id="expactive" value="on" />
</label>
Notify Me by E-Mail When Data In My Area(s) for my Navigation Device has Changed</p>
<p>Drag and zoom the map to the area where you live or work, or type the name of your city and click "Go". Then double click on the map to create a new alert area. Follow the instructions to put one or more circular or route based areas on the map. Drag the markers to better adjust the positions of your areas. Click on the red marker in the middle, and a dialog box will appear. Use this dialog box to set desired alert types and confidence levels, and to make the area larger or smaller. To create another alert area, just repeat the same steps. <b>Note: Unless you click "Apply" AND "Update Preferences", all of your changes will be lost!</b></p>
<div id="wrap" style="position:relative;height:650px;">
<div id="map" style="position:absolute;">
<div class="colb">
<div class="trapster">
<div id="trapmap" class="map" style="width: 960px; height: 600px"></div>
<ul class="sms">
<li>Zoom Map to Address:
<input name="ckStreet" type="text" class="input" onKeyPress="if(event.keyCode==13) { goclick(ckStreet.value); return false; }"/>
</li>
<li class="btngo">
<input type="image" name="imageField2" src="rl/images/btn-go.gif" onClick="goclick(ckStreet.value);return false;">
</li>
</ul>
</div>
</div>
</div>
</div>
<input type="hidden" name="areas" value="" />
<br/>
<p><input type="submit" name="button2" id="button2" value="Update Preferences" /></p>
<p><b>Download data according to areas you specified on the map above:</b><br/>
[color=#FF0000] <select name="format">
<option value="csv">CSV format for Garmin or other nav devices</option>
<option value="ov2">OV2 format for TomTom devices</option>
</select>[/color]
[color=#40BF00]<input type="submit" name="download" id="download" value="Download POIs" />[/color]
</form>
<p>After downloading, save the file to your desktop. The data is in folder by the either the name TrapsterGarminCSVData or TrapsterTomTomOV2Data. Follow these <a href='garmin-tomtom-instructions.php'>instructions</a> to install the data from your computer to your device.
</p>
<p><em><strong>IMPORTANT NOTE:</strong> If you are using Garmin POI Loader, you should save the downloaded files to a separate directory, e.g. "My Trapster POIs". You will see the files grayed out when you try to select them in Garmin POI Loader. This is because the program is asking for a directory name, not a file name. It will read all files in that directory.</em></p>
<p><em>Clear as mud? Please feel free to <a href="contact.php">contact us</a>.</em></p>
</div>
<div class="clear"></div>
<div id="footer">
<p>Trapster®, Virtual Radar®, Caravan®, Patrol®, and the police car logo are registered trademarks of Reach Unlimited Corporation, registered in the U.S. Patent and Trademark Office. <br />
© 2010 Reach Unlimited Corporation - All Rights Reserved - <a href="privacy-policy.php" title="Read About Trapsters Privacy Policy">Privacy Policy</a></p>
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1980274-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript">
var GSFN;
if(GSFN == undefined) { GSFN = {}; }
(function(){
add_js = function(jsid, url) {
var head = document.getElementsByTagName("head")[0];
script = document.createElement('script');
script.id = jsid;
script.type = 'text/javascript';
script.src = url;
head.appendChild(script);
}
add_js("fastpass_common", document.location.protocol + "//getsatisfaction.com/javascripts/fastpass.js");
if(window.onload) { var old_load = window.onload; }
window.onload = function() {
if(old_load) old_load();
add_js("fastpass", "http://getsatisfaction.com/fastpass?oauth_version=1.0&oauth_nonce=28f854f56304098cefd575099b201a87&oauth_timestamp=1291132275&oauth_consumer_key=u5k52vtdx2dl&email=pierrotm777%40gmail.com&name=pierrotm777&uid=736800&oauth_signature_method=HMAC-SHA1&oauth_signature=oPmBaB%2BoEmpG%2FRJKBaepe%2BlWfHk%3D");
}
})()
</script>
</body>
</html>► Afficher le texte
Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <IE.au3>
#include <GUIConstants.au3>
Opt("GuiOnEventMode", 1)
;User var's
$sUrl = "http://www.trapster.com/login.php"
$sUrl2 = "http://www.trapster.com/config-poi.php";page des POI
; == GUI generated with Koda ==
$Form1 = GUICreate("Trapster World SpeedCam Zones", 510, 126, 192, 225)
GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_Close")
GUICtrlCreateLabel("Trapster World SpeedCam Zones", 144, 8, 282, 26)
GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman")
GUICtrlCreateLabel("Login :", 10, 71, 53, 19)
GUICtrlSetFont(-1, 12, 800, 0, "Times New Roman")
$login = GUICtrlCreateInput("login", 85, 69, 177, 21)
GUICtrlCreateLabel("Password :", 10, 102, 63, 19)
GUICtrlSetFont(-1, 12, 800, 0, "Times New Roman")
$passwd = GUICtrlCreateInput("passwd", 85, 99, 177, 21)
$download = GUICtrlCreateButton("Download", 384, 66, 75, 25, $BS_DEFPUSHBUTTON)
GUICtrlSetOnEvent(-1, "DownloadCSV2")
GUICtrlSetFont(-1, 12, 800, 0, "Times New Roman")
$submit = GUICtrlCreateButton("Login", 384, 96, 75, 25, $BS_DEFPUSHBUTTON)
GUICtrlSetOnEvent(-1, "LoginToTrapster")
GUICtrlSetFont(-1, 12, 800, 0, "Times New Roman")
GUISetState(@SW_SHOW)
While 1
Sleep(100)
WEnd
Func LoginToTrapster()
;Browse to website in $url
$oIE = _IEAttach ($sUrl, "url")
If Not IsObj($oIE) Then
$oIE = _IECreate ();$sUrl,0,0,1)
_IENavigate ($oIE, $sUrl)
EndIf
$oForm = _IEFormGetObjByName($oIE, 0)
$oLogin = _IEFormElementGetObjByName($oForm, "uname")
$oPassword = _IEFormElementGetObjByName($oForm, "pwd")
_IEFormElementSetValue ($oLogin, GUICtrlRead($login))
_IEFormElementSetValue ($oPassword, GUICtrlRead($passwd))
_IEFormSubmit ($oForm)
; $oButton.Click
EndFunc ;==>LoginToTrapster
Func DownloadCSV2()
;Browse to website in $url2
$oIE = _IEAttach ($sUrl2, "url")
If Not IsObj($oIE) Then
$oIE = _IECreate ();$sUrl2,0,0,1)
_IENavigate ($oIE, $sUrl2)
EndIf
$oForm2 = _IEFormGetObjByName($oIE, 0)
$oComboSelect = _IEFormElementGetObjByName($oForm2, "format")
_IEFormElementSetValue ($oComboSelect, "ov2");csv ou ov2
$oForm3 = _IEFormGetObjByName($oIE, 0)
$oDownload = _IEFormElementGetObjByName($oForm3, "download")
_IEFormSubmit ($oForm3)
EndFunc ;==>DownloadCSV
Func GUI_Close()
Exit
EndFunc ;==>GUI_Close

