Advertisement
nhockm4v

Slect Radio IE

Oct 2nd, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.90 KB | None | 0 0
  1. #include 'IE.au3'
  2. #include <GUIConstantsEx.au3>
  3. #include <WindowsConstants.au3>
  4.  
  5. $html  = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'
  6. $html &=  '<form>'
  7. $html &=  '<input type="radio" name="gender"  > Đạt đẹp trai<br>'
  8. $html &=  '<input type="radio" name="gender" > Đạt không đẹp trai<br>'
  9. $html &=  '<input type="radio" name="gender" > Đạt xấu trai<br><br>'
  10. $html &=  '</form> '
  11.  
  12. $file = 'index.html'
  13. FileWrite(FileOpen($file,2),$html)
  14.  
  15. Local $__IE = _IECreateEmbedded()
  16. $gui = GUICreate('Example',300,180)
  17. $a = GUICtrlCreateObj($__IE, -10,0,300,130)
  18. $button = GUICtrlCreateButton('Select Radio',10,140,100,30)
  19. _IENavigate($__IE, @ScriptDir & '\index.html' ,1)
  20.  
  21.  
  22. GUISetState()
  23. While 1
  24.     Switch GUIGetMsg()
  25.         Case -3
  26.             exit
  27.         Case $button
  28.              $__IE.document.parentwindow.eval('document.getElementsByName("gender")[0].checked = true')
  29.     EndSwitch
  30. wend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement