Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 23rd, 2012  |  syntax: AutoIt  |  size: 2.34 KB  |  views: 38  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <ButtonConstants.au3>
  2. #include <EditConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <ListViewConstants.au3>
  5. #include <StaticConstants.au3>
  6. #include <WindowsConstants.au3>
  7. #include <GuiListView.au3>
  8. #include <File.au3>
  9. #Include <Misc.au3>
  10. #include <IE.au3>
  11.  
  12. #requireadmin
  13.  
  14. $browser_x = 100
  15. $browser_y = 100
  16. $devmode = 0
  17. $browser_counter = 0
  18.  
  19. _IEErrorHandlerRegister()
  20. $IE1 = _IECreateEmbedded()
  21. $IE2 = _IECreateEmbedded()
  22.  
  23. $main =  GUICreate("main", @DesktopWidth - 2, @DesktopHeight - 2, 1, 1)
  24.  
  25. $Browser1 = GUICtrlCreateObj($IE1, $browser_x, $browser_y, @DesktopWidth / 5 , @DesktopHeight / 3)
  26. $Browser2 = GUICtrlCreateObj($IE2, $browser_x + 600, $browser_y, @DesktopWidth / 5 , @DesktopHeight / 3)
  27. GUICtrlSetState(-1, $gui_hide)
  28.  
  29. $input_browser = GUICtrlCreateInput("", 30, 20, @DesktopWidth - 200, 20)
  30. $button_nagivate = GUICtrlCreateButton("Navigate", @DesktopWidth - 140, 20, 60, 20)
  31. $button_change1 = GUICtrlCreateButton("[X]", $browser_x + @DesktopWidth / 5, $browser_y + @DesktopHeight / 3 , 20, 20, "", $WS_EX_TOPMOST)
  32.  
  33. $button_new_window = GUICtrlCreateButton("New Tab", 30, 50, 100, 20)
  34.  
  35. GUISetState()
  36.  
  37. _IENavigate($IE1, "www.google.de")
  38. _IENavigate($IE2, "www.google.de")
  39.  
  40. while 1
  41.         $msg = GUIGetMsg()
  42.         if $msg = -3 then Exit
  43.         if $msg = $button_nagivate then _IENavigate($IE1, GUICtrlRead($input_browser))
  44.         if $msg = $button_new_window Then $browser_counter = $browser_counter + 1
  45.         if $msg = $button_new_window Then _new_window()
  46.         $a = GUIGetCursorInfo($main)
  47.         if $a[4] = $button_change1 then
  48.                 do
  49.                         if _IsPressed(01) Then
  50.                                 $mousepos = MouseGetPos()
  51.                                 $size_browser1 = ControlGetPos("main", "", $browser1)
  52.                                 GUICtrlSetPos($browser1, $mousepos[0] - $size_browser1[2] - 13  , $mousepos[1] - $size_browser1[3] - 13)
  53.                                 GUICtrlSetPos($button_change1, $mousepos[0] - 13 , $mousepos[1] - 31)
  54.                                 $browser_x = $mousepos[0] - @DesktopWidth / 5 - 13
  55.                                 $browser_y = $mousepos[1] - @DesktopHeight / 3 - 31
  56.                         EndIf
  57.                         if _IsPressed(02) Then
  58.                                 $mousepos = MouseGetPos()
  59.                                 GUICtrlSetPos($browser1, $browser_x ,$browser_y, $mousepos[0] - $browser_x, $mousepos[1] - $browser_y)
  60.                                 GUICtrlSetPos($button_change1, $mousepos[0] - 13 , $mousepos[1] - 31)
  61.                         EndIf
  62.                 until not _IsPressed(02) and not _IsPressed(01)
  63.         EndIf
  64.         sleep (10)
  65. WEnd
  66.  
  67. func _new_window()
  68.         GUICtrlSetState($Browser2, $gui_show)
  69. EndFunc