Advertisement
Hugo7

VBS basé sur l'api de NiSnip

Oct 28th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. '      Merci à Sachadee pour son code qui m'a appris comment utiliser nav.document.All.tags :D
  3. '                             (Je savais même pas que c'était possible!)
  4. '          http://batch.xoo.it/t4189-Comment-extraire-une-donn-e-d-un-site.htm?start=15
  5. '                                     et à NiSnip pour l'API
  6. '
  7.  
  8. On Error Resume Next
  9. 'récupération du rapport d'erreur
  10. Const ForReading = 1, ForWriting = 2, ForAppending = 8
  11. Set fso = CreateObject("Scripting.FileSystemObject" )
  12. Set f = fso.OpenTextFile("session.lock", ForReading)
  13. C_Ligne = f.ReadAll
  14. f.Close
  15. '
  16. 'Demande du nom
  17. Nom = InputBox("Votre pseudo? (facultatif):", "hCmd")
  18. if Nom = "" then wscript.quit
  19.  
  20. 'démarrage internet
  21. set nav = CreateObject("InternetExplorer.Application")
  22. nav.Navigate "http://bugtracker.gofox.eu/hcmd/api.php"
  23. nav.Visible = true
  24. Do While not nav.ReadyState = 4
  25. Loop
  26. nav.document.All.tags("input").Item("titre").Value = Nom
  27. nav.document.All.tags("textarea").Item("news").Value = C_Ligne
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement