Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Application restarts after script exits

$
0
0

I am new to autoit and trying to figure things out.

 

My first script is pretty basic and is designed automate the steps to get connected to my employer's VPN.

 

 

Rough description:

Start the RSA SecureID application

Paste my PIN

Copy the token to the clipboard

Close the RSA app.

Run the Nortel VPN Client

Paste the token in there

"Hit" Enter

 

Everything works great.  However somewhere around 3 to 5 minutes later the RSA app pops up again on the desktop.

Any clues as to what might be happening?

 

Here is the the script:

 

 #include <Clipboard.au3>
 #include <GuiEdit.au3>
$yesno = MsgBox( 36, "VPN Apps", "Connect to VPN?" )
If $yesno = "6" Then
; Yes button was clicked  
   Run("C:\Program Files\RSA SecurID Software Token\SecurID.exe")
   WinWaitActive("000127560000 - RSA SecurID Token")
   Send("1234")
   Sleep( 100 )
   Send("{ENTER}")
   Sleep( 100 )
   Send("{CTRLDOWN}c{CTRLUP}")
   WinClose("000127560000 - RSA SecurID Token")
 
   Run("C:\Program Files\Nortel\Nortel VPN Client\Nvc.exe")
; wait 10 seconds for the NVC GUI to appear.  If it doesn't, it probably means you are already connected and the Status GUI has popped up 

   $retcode1 = WinWaitActive("Nortel VPN Client", "" , 10 )
   If $retcode1 <> 0 Then
      Send("{CTRLDOWN}v{CTRLUP}")
      Sleep( 100 )
      Send("{ENTER}")
   _ClipBoard_Open(0)
   _ClipBoard_Empty()
   _ClipBoard_Close()
   Else
      Exit  
   EndIf
  
   $retcode2 = WinWaitActive("Security Banner", "" , 60 )
   If $retcode2 <> 0 Then
      Send("{ENTER}")
   Else
      Exit  
   EndIf  
EndIf
Exit  
 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>