• Support
  • Articles
  • Resources
  • Products

Macro to update Software

Moderator: boris

1 postPage 1 of 1


Joined: Fri Apr 13, 2012 3:28 pm
by Severo » Fri Apr 13, 2012 3:54 pm
I have the following doubts, in the line of code where this the *** all the time I have an equipment upgrade is to type the file, only that it is never the same but are always various so this in a loop. Returning to doubt, would like to enter once the file and it continues in the loop as I do that? never worked with this program is my first code if you guys can help me with the organizational structure of the code I thank you, my English is not very good excuse if you have errors ok!

getdir Arp_geral
getdir Open_pumpkin
getdir Exit_pumpkin
strconcat Arp_geral '\Arp_geral.bat'
strconcat Open_pumpkin '\Open_pumpkin.bat'
strconcat Exit_pumpkin '\Exit_pumpkin.bat'
setdir '\\C:\Docume~1\%username%\Desktop\Integração'
inputbox 'Com:' 'Escolher Porta Serial'
str2int portacom inputstr

portaserial = '/C='
strconcat portaserial inputstr
connect portaserial
if result=1 then
messagebox 'Porta Serial em uso ou não disponivel' 'Aviso'
goto conectarserial
exec Open_pumpkin

wait 'DmSwitch3000 login:'
sendln 'admin'

wait 'Password:'
sendln 'admin'

wait 'DmSwitch3000#'
inputbox 'Principal:' 'principal'

*** sendln 'copy tftp ' inputstr ' firmware '

wait 'STATUS: ER=error ES=erasing WA=waiting file transfer WR=writing'
yesnobox ' Passe para o próximo equipamento ' 'prox'
if result then
exec Arp_geral
pause 15
goto dmswitch


1 postPage 1 of 1

Users browsing this forum: No registered users