Activer/Desactiver Wifi Livebox 2 ZTE
Bonjour,
J'ai un problème pour Activer/Désactiver le Wifi Livebox 2 ZTE. j'arrive à me connecté à l'interface de ma livebox login, passeword OK. j'ai fait petit vbsript.
Je pense que mon problème c'est que je n'arrive pas récuperé les variables.
Si une personne peut m'aidé.
Merci d'avance.
Voici mon Script
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| language="VBscript"
Dim IE
Dim dct
Set objShell = WScript.CreateObject("WScript.Shell")
Set IE = Wscript.CreateObject("InternetExplorer.Application")
IE.Visible = 1
IE.TheaterMode = 0
IE.navigate "http://192.168.1.1/homeAuthentificationRemote.html"
Do While (IE.Busy)
WScript.Sleep 10
Loop
IE.document.All.tags("input").Item("Username").Value = "login"
IE.document.All.tags("input").Item("Password").Value = "mdp"
wscript.sleep 1000
IE.document.forms(0).submit
IE.Document.All("bt_save").Click
wscript.sleep 1000
IE.Document.All("hmenu-config").Click
wscript.sleep 1000
dct = IE.document.All("activer")
If IE.Document.All(dct) = "activer" Then
IE.Document.All("bt_enable").Click
objShell.Popup "WiFi Active",3
Else
IE.Document.All("bt_disable").Click
objShell.Popup "WiFi Desactive",3
End If
'ie.quit
set ie = nothing
set dct = nothing
'msgbox "Fin du Script."
' fin...................................... |
Voici la partie de la source de la livebox ou j'ai le problème pour récuperé les variables.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| <h1><img src="/images/fr/devices/icons-devices-wifi-orange.png?b387df6c" class="png" style="padding-right:10px;" alt=""/><span class="translation Translations.config.wifi.general.label.title"></span></h1>
<div class="hr">
</div>
<h2><span class="translation Translations.config.wifi.general.label.subtitle"></span></h2>
<br/>
<div class="hr hr-orange">
</div>
<br/>
<form name="Wifi/General/BasicSimple">
<table class="array-status">
<tbody>
<tr>
<td class="first"><span class="translation Translations.config.wifi.general.label.ssid"></span></td>
<td class="last">
<div style="float:left; width:250px;" id="WifiBasic.SSID" class="display"><span style="visibility: hidden;"></span></div>
<div class="basecolor" style="float:right; width:100px; text-align:right; padding-right:5px;"><a href="#" onclick="ctl.popup.Load(appUrl + '/configWifiNetworkSsid.html'); return false;"><span class="translation Translations.config.wifi.general.link.ssid"></span></a></div>
</td>
</tr>
<tr>
<td class="first"><span class="translation Translations.config.wifi.general.label.status"></span></td>
<td class="last"><div id="wifiEnabled" style="display: none;">
<div style="float:left; width: 180px; padding-top:5px;">
<img src="/images/fr/leds/icons-leds-green.png?b387df6c" style="float:left; padding-right:10px;" class="png" alt=""/>
<div style="padding-top:4px; width:150px; color: #38A403;" class="translation Translations.general.label.wifienable">
</div>
</div>
<div style="float: right;">
<input type="button" id="bt_disable" value="désactiver" class="input-btn input-btn-orange-small translation Translations.general.btn.disable" />
</div>
</div>
<div id="wifiDisabled" style="display: none;">
<div style="float:left; width: 180px; padding-top:5px;">
<img src="/images/fr/leds/icons-leds-red.png?b387df6c" style="float:left; padding-right:10px;" class="png" alt=""/>
<div style="padding-top:4px; width:150px; color: red;" class="translation Translations.general.label.wifidisable">
</div>
</div>
<div style="float: right;">
<input type="button" id="bt_enable" value="activer" class="input-btn input-btn-orange-small translation Translations.general.btn.enable"/>
</div>
</div></td>
</tr>
</tbody>
</table>
</form> |