domingo, 2 de abril de 2017

Automatización con bucles VBScript

set objshell = createobject("wscript.shell")
set wshshell = wscript.createobject("wscript.shell")
WshShell.AppActivate "Google Chrome"

for cont19=3 to 9
wscript.sleep 1000
wshshell.appactivate "Google Chrome"
wshshell.sendkeys "{-}"
next

for cont323=1 to 5                     'ciclo principal'
for cont3443=1 to 1                    'ciclo inicio y final'
for cont001=1 to 2                    'ciclo intermedio'
for cont1=1 to 4 
wScript.sleep 1000
wshshell.sendkeys "{RIGHT}"
next
for cont2=1 to 9
wscript.sleep 1000
wshshell.sendkeys "{+}"
next
wscript.sleep 4000

wshshell.sendkeys "%(+Z)"
wScript.sleep 12000

for cont11=1 to 1
wscript.sleep 500
wshshell.sendkeys "{TAB}"
next
wscript.sleep 1000
wshshell.sendkeys "~"
wscript.sleep 2000
wshshell.sendkeys "^(w)"
wscript.sleep 3000
wshshell.sendkeys "{ESC}"
wscript.sleep 1000
wshshell.appactivate "Google Chrome"
wscript.sleep 3000
                                        
for cont3=1 to 9 
wscript.sleep 1000
wshshell.appactivate "Google Chrome"
wshshell.sendkeys "{-}"
next
next                                        'fin del ciclo intermedio'

for cont4=1 to 4

wscript.sleep 1000
wshshell.appactivate "Google Chrome" 
wshshell.sendkeys "{UP}"
next

for cont5=1 to 9
wscript.sleep 1000
wshshell.sendkeys "{+}"
next

wscript.sleep 4000

wshshell.sendkeys "%(+p)"
wScript.sleep 12000

for cont11=1 to 3
wscript.sleep 500
wshshell.sendkeys "{TAB}"
next
wscript.sleep 1000
wshshell.sendkeys "~"
wscript.sleep 2000
wshshell.sendkeys "^(w)"
wscript.sleep 3000
wshshell.sendkeys "{ESC}"
wscript.sleep 1000
wshshell.appactivate "Google Chrome"
wscript.sleep 3000

for cont0121=1 to 9
wscript.sleep 1000
wshshell.appactivate "Google Chrome"
wshshell.sendkeys "{-}"
next
for cont101=1 to 9
wscript.sleep 1000
wshshell.sendkeys "{left}"
next
next                        'fin ciclo inicio y final'       
next      'fin ddel nuclue principal'

for cont0022=1 to 9
wscript.sleep 1000
wshshell.sendkeys "{right}"
next

'.................'

for cont323=1 to 1                     'ciclo principal'
for cont3443=1 to 1                    'ciclo inicio y final'
for cont001=1 to 2                    'ciclo intermedio'
for cont1=1 to 4 
wScript.sleep 1000
wshshell.sendkeys "{left}"
next
for cont2=1 to 9
wscript.sleep 1000
wshshell.sendkeys "{+}"
next
wscript.sleep 4000

wshshell.sendkeys "%(+p)"
wScript.sleep 12000

for cont11=1 to 3
wscript.sleep 500
wshshell.sendkeys "{TAB}"
next
wscript.sleep 1000
wshshell.sendkeys "~"
wscript.sleep 2000
wshshell.sendkeys "^(w)"
wscript.sleep 3000
wshshell.sendkeys "{ESC}"
wscript.sleep 1000
wshshell.appactivate "Google Chrome"
wscript.sleep 3000
                                        
for cont3=1 to 9 
wscript.sleep 1000
wshshell.appactivate "Google Chrome"
wshshell.sendkeys "{-}"
next
next                                        'fin del ciclo intermedio'

for cont4=1 to 4

wscript.sleep 1000
wshshell.appactivate "Google Chrome" 
wshshell.sendkeys "{down}"
next

for cont5=1 to 9
wscript.sleep 1000
wshshell.sendkeys "{+}"
next

wscript.sleep 4000

wshshell.sendkeys "%(+p)"
wScript.sleep 12000

for cont11=1 to 3
wscript.sleep 500
wshshell.sendkeys "{TAB}"
next
wscript.sleep 1000
wshshell.sendkeys "~"
wscript.sleep 2000
wshshell.sendkeys "^(w)"
wscript.sleep 3000
wshshell.sendkeys "{ESC}"
wscript.sleep 1000
wshshell.appactivate "Google Chrome"
wscript.sleep 3000

for cont0121=1 to 9
wscript.sleep 1000
wshshell.appactivate "Google Chrome"
wshshell.sendkeys "{-}"
next
for cont101=1 to 9
wscript.sleep 1000
wshshell.sendkeys "{left}"
next
next                        'fin ciclo inicio y final'       
next      'fin ddel ciclo principal'

No hay comentarios:

Publicar un comentario