Skip to content

Instantly share code, notes, and snippets.

@luiseduardohd
Created January 1, 2016 05:21
Show Gist options
  • Save luiseduardohd/615732e603e7d8cfda40 to your computer and use it in GitHub Desktop.
Save luiseduardohd/615732e603e7d8cfda40 to your computer and use it in GitHub Desktop.
Merry Christmas and Happy new Year
set fbUrl to "https://www.facebook.com/messages/"
set return to "https://www.facebook.com/messages/"
--Key codes
--http://apple.stackexchange.com/questions/36943/how-do-i-automate-a-key-press-in-applescript
--http://softwares.bajram.com/softwares/#Full_Key_Codes
--Voy en la fila 30 del excel
--androidverde falta
--después de como 60 me marco facebook que necesito validar que no soy un robot
--me quede en yaquelin weber
--despues de 30 marco eso.
--If you send 2 message a minute, you can send up to 50-60
--https://www.facebook.com/help/community/question/?id=10202219244906342
--You can message up to 150 people at once.
--https://www.facebook.com/help/131313586947248
--pruebo enviar 1
--Lo envió bien, voy a enviar 27, se a a poner lento
--Me quede en 116 okeke linda.
--Como a los 600 en fcfm.ssocial hubo un error y provoco que se abriera una ventana y de ahí tuvo problemas.
--Voy en fcfm.ssocial faltan los demás
--lo ejecute otra vez y me quede en GrupoETICS
set contador to 1
--repeat 27 times
repeat 1000 times
log contador
set contador to (contador + 1)
activate application "Microsoft Excel"
delay 1
--Enviar key down
--tell application "System Events" to key code 125
--tell application "System Events" to keystroke down
--tell application "System Events"
-- keystroke down
--end tell
--delay 1
tell application "System Events" to keystroke "x" using command down
--tell application "System Events"
-- keystroke "x" using command down
--end tell
--tell application "System Events"
-- --keystroke "c" using command down
-- key down command
-- keystroke "x"
-- key up command
--end tell
delay 1
activate application "Google Chrome"
delay 1
tell application "System Events" to keystroke "t" using command down
--tell application "System Events"
-- keystroke "t" using command down
--end tell
delay 2
tell application "System Events" to keystroke fbUrl
--tell application "System Events"
-- keystroke fbUrl
--end tell
delay 1
tell application "System Events" to keystroke "v" using command down
--tell application "System Events"
-- --keystroke "c" using command down
-- key down command
-- keystroke "v"
-- key up command
--end tell
delay 1
--Enviar enter
tell application "System Events" to key code 36
--Enviar tab
--tell application "System Events" to key code 48
--tell application "System Events" to keystroke return
--tell application "System Events"
-- keystroke return
--end tell
delay 5
--Enviar tab atraz
--tell application "System Events" to key code 48
tell application "System Events"
key down {shift}
key code 48
key up {shift}
end tell
delay 1
--Enviar tab
tell application "System Events" to key code 48
delay 2
--Enviar cancel
--tell application "System Events" to key code 53
--tell application "System Events"
-- move mouse(500, 780)
-- click at {500, 780}
--end tell
--tell application "System Events" to keystroke tab
--tell application "System Events"
-- keystroke return
--end tell
--delay 2
--Enviar Enter
--tell application "System Events" to key code 36
-- simulate pressing the Enter key
-- http://softwares.bajram.com/softwares/#Full_Key_Codes
--Enviar enter
--tell application "System Events" to key code 36
--delay 5
--Problema, a los que no les he enviado mensaje me aparece
tell application "System Events" to keystroke "Feliz Año nuevo !"
delay 1
--Enviar enter
--tell application "System Events" to key code 36
--delay 2
tell application "System Events"
key down {shift}
key code 36
key up {shift}
end tell
--Enviar cancel
tell application "System Events" to key code 53
delay 1
tell application "System Events" to keystroke "Espero que tengas un año de mucho exito y que cumplas todas tus metas, disfruta mucho este dia, Saludos !"
delay 1
--Enviar enter
tell application "System Events" to key code 36
delay 2
--Enviar cancel escape
tell application "System Events" to key code 53
delay 1
tell application "System Events" to keystroke "w" using command down
delay 1
activate application "Microsoft Excel"
--Enviar key down
tell application "System Events" to key code 125
--tell application "System Events" to key down command
delay 40 --para que pase del minuto por mensaje
--delay 1
end repeat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment