Search the Community
Showing results for tags 'be'.
-
Hey guys, I am very new to using AutoIt and wrote my first little script today after reading bits and pieces on the docs. The script is designed to make an ugly batch operation a bit more user friendly for the people in the office. I have a batch file that consists of: @echo off net use B: /delete net use B: \\10.10.10.10\Share /user:domain\username It is used to log a user onto a secure share drive on my NAS. I have spoofed the share location etc. however. My AutoIt Script is: Local $passwd = InputBox("Attempting to Access B:", "Enter your password.", "", "*","M") Run("C:\Users\User\Desktop\login.bat") WinWaitActive("C:\Windows\system32\cmd.exe") Send($passwd) Now this works fine, however once I input my password into the GUI and it Sends that Password to the cmd window, I cannot make it send an "ENTER" Keystroke. It isn't a HUGE issue as I can manually press enter once the cmd window shows up, but I would like it to input the password and do the carriage return straight away. I have tried using Send("{ENTER}") , and it returns an error. I have tried changing the way I implement the sending of {ENTER} in as many ways as I can think of. I would greatly appreciate it if anyone can help me on this. Also, if anyone knows of a way to run the cmd window silently but still be able to send the password to it that would be even better! Cheers