Advertisement
Guest User

Untitled

a guest
May 28th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.74 KB | None | 0 0
  1. #include <GUIConstants.au3>
  2. #Include <File.au3>
  3.  
  4.  
  5. #Region ### START Koda GUI section ### Form=
  6. $Form1 = GUICreate("Form1", 625, 443, 193, 125)
  7. $Button1 = GUICtrlCreateButton("Button1", 304, 72, 177, 89, 0)
  8. $button2 = GUICtrlCreateButton("buttontext", 88, 280, 345, 105, 0)
  9. $txtbox1 = GUICtrlCreateInput("", 40, 120, 217, 21)
  10. GUISetState(@SW_SHOW)
  11. #EndRegion ### END Koda GUI section ###
  12.  
  13. HotKeySet("!p","Kill")
  14.  
  15. func Kill()
  16. MsgBox(0, "Script Killed","Succsessfully Terminated")
  17. Exit
  18. EndFunc
  19.  
  20.  
  21.  
  22. func test1()
  23. $path=GUICtrlRead($txtbox1)
  24. _FileCreate(@scriptdir&"\operapfad.ini")
  25. $file = FileOpen(@scriptdir&"\operapfad.ini", 1)
  26. FileWrite($file,"[settings]"& @CRLF)
  27. Filewrite($file,"pfad=")
  28. FileClose($file)
  29. IniWrite ( @scriptdir&"\operapfad.ini", "settings", "pfad", $path )
  30. Filecopy ( @scriptdir&"\operapfad.ini", @scriptdir&"\WTF2.ini" ,9)
  31. EndFunc
  32.  
  33. func test2()
  34. $Pfad = IniRead ( "WTF2.ini", "settings", "pfad", "error" )
  35. Run ( $Pfad)
  36. winwait("Google - Opera")
  37. WinSetState("Google - Opera","", @SW_RESTORE)
  38. sleep(1000)
  39. ControlMove("Google - Opera", "", "", 0, 0, 812, 512)
  40. $verschiebungszahlx = Random ( 12 , 100 , 1)
  41. $verschiebungszahly = Random ( 12 , 100 , 1)
  42. ControlMove("Google - Opera", "", "", $verschiebungszahlx,$verschiebungszahly)
  43. sleep(500)
  44. $fensterposition = WinGetPos ("Google - Opera")
  45. MouseClick("left",253+$fensterposition[0],33+$fensterposition[1],1,0)
  46. send("google.de{ENTER}")
  47. sleep(3000)
  48. MouseMove(512,256,5)
  49. sleep(500)
  50. MouseClick("left",69+$fensterposition[0],97+$fensterposition[1],1,0)
  51. sleep(3000)
  52. MouseClick("left",396+$fensterposition[0],273+$fensterposition[1],1,0)
  53. send("funny{ENTER}")
  54. sleep(3000)
  55. $pixeldown=0
  56. While 1
  57. MouseclickDrag("left",796+$fensterposition[0],165+$fensterposition[1]+$pixeldown,796+$fensterposition[0],165+$fensterposition[1]+$pixeldown+10)
  58. sleep(500)
  59. $bildiwas = Pixelsearch($fensterposition[0],$fensterposition[1],$fensterposition[0]+812,$fensterposition[1]+512,0x5B231C)
  60. if @error then
  61.     $pixeldown = $pixeldown+10 
  62.     MouseclickDrag("left",796+$fensterposition[0],165+$fensterposition[1]+$pixeldown,796+$fensterposition[0],165+$fensterposition[1]+$pixeldown+10)
  63. sleep(500) 
  64. Else
  65.     ExitLoop
  66. EndIf
  67. WEnd
  68. sleep(500)
  69. Mouseclick("right", $bildiwas[0],$bildiwas[1])
  70. Mouseclick("left",602,681)
  71. sleep(500)
  72. Endfunc
  73.  
  74.  
  75. While 1
  76.     $nMsg = GUIGetMsg()
  77.     Switch $nMsg
  78.         Case $GUI_EVENT_CLOSE
  79.             Exit
  80.         Case $Button1
  81.             test1()
  82.         Case $button2  
  83.             test2()
  84.     EndSwitch
  85. WEnd
  86.  
  87. ;;beim cas ekommt alles hin was hald bei dme buttondruck passiert....   bis zum nächsten case....
  88. ;;ich tu da gern funktionen rein.. is einfach übersichtlicher und so weist schon :Ping
  89.  
  90. ;;;;DEINE INI FÜR SPÄTER
  91. ;;;;[settings]
  92. ;;;;pfad="PFAD"
  93. ;;;;
  94. ;;;;uff öhm joar genau :P komm ts xD
  95.  
  96.  
  97. ;; 0x0A6523
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement