Juno_okyo

Google Search Example

Jun 23rd, 2015
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.93 KB | None | 0 0
  1. #NoTrayIcon
  2. #include <EditConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <WindowsConstants.au3>
  5. #include <ie.au3>
  6.  
  7. Opt('MustDeclareVars', 1)
  8. Opt('WinTitleMatchMode', 2)
  9. Opt('GUICloseOnESC', 0)
  10. Opt('GUIOnEventMode', 1)
  11. Opt('TrayOnEventMode', 1)
  12.  
  13. Global $oIE = _IECreateEmbedded()
  14.  
  15. #Region ### START Koda GUI section ### Form=
  16. Global $MainForm = GUICreate("Google Search", 701, 540, -1, -1, -1, BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
  17. GUISetFont(12, 400, 0, "Arial")
  18. GUISetOnEvent($GUI_EVENT_CLOSE, "MainFormClose")
  19. GUICtrlCreateObj($oIE, 0, 0, 700, 539)
  20. GUISetState(@SW_SHOW)
  21. #EndRegion ### END Koda GUI section ###
  22.  
  23. main()
  24.  
  25. While 1
  26.     Sleep(100)
  27. WEnd
  28.  
  29. Func main()
  30.     _IENavigate($oIE, 'https://www.google.com/')
  31.     Local $input = _IEGetObjById($oIE, 'lst-ib')
  32.     _IEFormElementSetValue($input, 'juno_okyo')
  33.     Local $form = _IEGetObjById($oIE, 'tsf')
  34.     _IEFormSubmit($form)
  35. EndFunc
  36.  
  37. Func MainFormClose()
  38.     Exit
  39. EndFunc
Add Comment
Please, Sign In to add comment