Ok, I have this working with SendKeys, but SendKeys can be very iffy so please let me know if anyone has a better solution. Here's my code...
vb Code:
pID = Shell("C:\Program Files\Cisco\Cisco AnyConnect VPN Client\vpncli.exe connect xyz.org", vbMinimizedFocus) Sleep (1000) AppActivate pID 'activate vpncli.exe command window DoEvents 'do events is needed to allow Windows to switch focus SendKeys Text1.Text, True 'send username to vpncli.exe DoEvents AppActivate pID DoEvents 'do events is needed to allow Windows to switch focus SendKeys "{Enter}" 'hit enter after username DoEvents AppActivate pID DoEvents 'do events is needed to allow Windows to switch focus SendKeys Text2.Text, True 'send password to vpncli.exe DoEvents AppActivate pID DoEvents 'do events is needed to allow Windows to switch focus SendKeys "{Enter}" 'hit enter after password DoEvents




Reply With Quote