3

この VBS コードは魅力的に機能しますが、Chrome は VB スクリプトをサポートしていないためです。

オートホットキーの代替手段を見つける必要があります。

セクションだけでなくても、誰かがこのコードを AutoHotKey に変換するのを手伝ってくれますか?

Here is part of codeAutoHotKeyで行う必要があります

  With IE.Document
    .getElementByID("login_username").value = "myuser"
    .getElementByID("login_password").value = "mypass"
    .getElementByID("frmLogin").submit
  End With

ここに完全なコードがあります

WScript.Quit Main

Function Main
  Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
  IE.Visible = True
  IE.Navigate "http://desistream.tv/en/index.shtml"
  Wait IE
  With IE.Document
    .getElementByID("login_username").value = "myuser"
    .getElementByID("login_password").value = "mypass"
    .getElementByID("frmLogin").submit
  End With
End Function

Sub Wait(IE)
  Do
    WScript.Sleep 500
  Loop While IE.ReadyState < 4 And IE.Busy 
  Do
    WScript.Sleep 500
  Loop While IE.ReadyState < 4 And IE.Busy 
End Sub

Sub IE_OnQuit
  On Error Resume Next
  WScript.StdErr.WriteLine "IE closed before script finished."
  WScript.Quit
End Sub
4

1 に答える 1