Advertisement
Guest User

Working script

a guest
Apr 27th, 2017
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sub main
  2.         ocorrencia="JM12345"
  3.         userid="JM1234"
  4.         pwd="123456"
  5.        
  6.         xsh.Screen.send("ZIAH:" & userid & ":" & ocorrencia & ":;" & VbCr)
  7.         resultuserid = xsh.Screen.WaitForStrings(Array("NEW PASSWORD:", "ERROR", "USER ID ALREADY EXISTS"),500)
  8.        
  9.                 if resultuserid = 1 then
  10.                     xsh.Screen.send pwd & VbCr
  11.                     xsh.Screen.send pwd & VbCr                     
  12.                     xsh.Screen.WaitForString "<"
  13.                
  14.                 elseif resultuserid = 2 then
  15.                     xsh.screen.Send VbCr
  16.                     xsh.Screen.send("ZIAR:" & ocorrencia & ";" & VbCr)
  17.                     xsh.Screen.send("Y" & VbCr)
  18.                     defeitouser = xsh.Dialog.MessageBox  ("Defeito! Reveja caracteres no nome do USUÁRIO.", "Defeito!!!", 0)
  19.                     xsh.Screen.send("ZIAI:PROFILE=ALL:LIM;" & VbCr)
  20.                     exit sub
  21.                
  22.                 elseif resultuserid = 3 then
  23.                     defeitouser2 = xsh.Dialog.MessageBox  ("Defeito! USUÁRIO já existe! Tente de novo...", "Defeito!!!", 0)
  24.                     xsh.Screen.send("ZIAR:" & ocorrencia & ";" & VbCr)
  25.                     xsh.Screen.send("Y" & VbCr)
  26.                     xsh.Screen.send("ZIAI:PROFILE=ALL:LIM;" & VbCr)
  27.                     exit sub                   
  28.                 else
  29.                     xsh.Dialog.MsgBox("Defeito. resultuserid <> 1, 2, 3 ")                 
  30.                 end if
  31. end sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement