View difference between Paste ID: Ba4BpvvH and Z2ygQr65
SHOW: | | - or go back to the newest paste.
1
#cs ----------------------------------------------------------------------------
2
3
 AutoIt Version: 3.3.12.0
4
 Author:         myName
5
6
 Script Function:
7
	Template AutoIt script.
8
9
#ce ----------------------------------------------------------------------------
10
11
; Script Start - Add your code below here
12
13
14
15
16-
;Definimos, establecemos, que la tecla "c" comenzará nuestro BOT
16+
;Definimos, establecemos, que la tecla "d" comenzará nuestro BOT
17
;Indicamos, Señalamos que la funcion se va a llamar comenzar
18-
HotKeySet("{c}","comenzar")
18+
HotKeySet("{d}","comenzar")
19
20
21-
;Definimos, establecemos, que la tecla "t" terminará nuestro BOT
21+
;Definimos, establecemos, que la tecla "1" terminará nuestro BOT
22
;Indicamos, Señalamos que la funcion se va a llamar terminar
23-
HotKeySet("{t}","terminar")
23+
HotKeySet("{1}","terminar")
24
25
26
#region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=0000040A)  ---
27
28
#region --- Internal functions Au3Recorder Start ---
29
Func _Au3RecordSetup()
30
Opt('WinWaitDelay',100)
31
Opt('WinDetectHiddenText',1)
32
Opt('MouseCoordMode',0)
33
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
34
If $aResult[1] <> '0000040A' Then
35
  MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(0000040A->' & $aResult[1] & ')')
36
EndIf
37
38
EndFunc
39
40
Func _WinWaitActivate($title,$text,$timeout=0)
41
	WinWait($title,$text,$timeout)
42
	If Not WinActive($title,$text) Then WinActivate($title,$text)
43
	WinWaitActive($title,$text,$timeout)
44
EndFunc
45
46
47
;---------//////AQUÍ VA LA INTERFAZ GRÁFICA DEL PROGRAMA ALGO SENCILLO////------------
48
;Lo que dice include son simplemente librerías para poder
49
;comenzar a dibujar los botones, etc.
50
#include <GUIConstantsEx.au3>
51
#include <StaticConstants.au3>
52
#include <WindowsConstants.au3>
53
54
#Region ### START Koda GUI section ### Form=
55
;Aquí comenzamos a dibujar la interfaz, botones, labels(texto en el formulario, ventana)
56
$TuBot = GUICreate("TuBot", 234, 166, 192, 124)
57
58
;Establecemos el color de fondo del formulario
59
GUISetBkColor(0xA6CAF0)
60
61
;Creamos un label y elegimos su fuente
62
$Label1 = GUICtrlCreateLabel("C: Comenzar BOT", 16, 32, 173, 28)
63
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
64
65
66
;Creamos otro label y elegimos su fuente
67
$Label2 = GUICtrlCreateLabel("T:Terminar BOT", 16, 96, 155, 28)
68
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
69
70
;Con este estado indicamos que se mostraran todos los componentes en el formulario o ventana
71
GUISetState(@SW_SHOW)
72
#EndRegion ### END Koda GUI section ###
73
74
While 1
75
	$nMsg = GUIGetMsg()
76
	Switch $nMsg
77
		Case $GUI_EVENT_CLOSE
78
			Exit
79
80
	EndSwitch
81
WEnd
82
;--------//////AQUÍ TERMINA NUESTRA INTERFAZ GRÁFICA /////---------------------------
83
84
85
86
87
88
89
90
91
;Aquí nuestra función comenzar, es Activada, LLAMADA, cuando apretamos la tecla "c"
92
Func comenzar()
93
;Aqui colocaremos todo lo grabado
94
95
;Invocamos la funcion definida arriba
96
_AU3RecordSetup()
97
#endregion --- Internal functions Au3Recorder End ---
98
99
;Invocamos esta otra definida arriba
100
_WinWaitActivate("Reciente - Mi Taringa! - Google Chrome","")
101
MouseClick("left",185,243,1)
102
MouseClick("left",182,241,1)
103
Send("{SHIFTDOWN}e{SHIFTUP}stamos{SPACE}shouteando.")
104
MouseClick("left",654,295,1)
105
MouseClick("left",337,361,1)
106
MouseClick("left",270,256,1)
107
MouseClick("left",270,256,1)
108
#endregion --- Au3Recorder generated code End ---
109
110
EndFunc
111
112
;Aquí nuestra función terminar, es Activada, LLAMADA, cuando apretamos la tecla "t"
113
Func terminar()
114
   exit
115
   EndFunc