MadhaN Posted January 16, 2019 Posted January 16, 2019 Hi all, I have a csv file as below, I wand to find srno from csv and send corresponding ip and pass to commend cmd prompt. Please guide me to create script . srno,name,ip,pass 1,name1,ip1,pass1 2,name2,ip2,pass2
FrancescoDiMuro Posted January 16, 2019 Posted January 16, 2019 @MadhaN We help you here with your script Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
MadhaN Posted January 16, 2019 Author Posted January 16, 2019 @FrancescoDiMuro thanks, waiting for the sample script
FrancescoDiMuro Posted January 16, 2019 Posted January 16, 2019 2 minutes ago, MadhaN said: thanks, waiting for the sample script Maybe the last message wasn't clear enough. We don't spoon the code for you, but help you with your script; so, asking for a script won't help you until you post something that you made by you. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Moderators Melba23 Posted January 16, 2019 Moderators Posted January 16, 2019 MadhaN, Before we go any further, please explain why you are storing usernames and passwords in an insecure csv file. And just what are you doing that requires these to be passed to a command prompt? M23 P.S. And just to be absolutely clear - this is the Mod team determining the legality of the thread, so everyone else please keep out. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
MadhaN Posted January 16, 2019 Author Posted January 16, 2019 @Melba23 I want to connect to rdp of the remote computer, instead of entering id password every time i want to save . Since i have to connect 500+ computers i cannot enter every time , I have the script in bat, But i want in autoit script. Please help me in this.
Moderators Melba23 Posted January 16, 2019 Moderators Posted January 16, 2019 MadhaN, But you really keep these usernames and passwords in a simple csv file? Does your boss know you do this? M23 Skysnake 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
MadhaN Posted January 16, 2019 Author Posted January 16, 2019 @Melba23 i will encrypt password , Please help to create script , and wanna convert to exe.
Moderators Melba23 Posted January 17, 2019 Moderators Posted January 17, 2019 MadhaN, Sorry for the delay in replying - local internet outage. I am happy for the thread to remain open - but I hope any responders offer sensible suggestions as to how you might add some level of security to the whole affair because at it stands you are a disaster waiting to happen. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Nine Posted January 17, 2019 Posted January 17, 2019 @MadhaN - Here your title : Script to get input from user ,check in csv file and read corresponding values and pass that value to cmd Script to get input from user : use Koda to create a GUI for the user to enter the inputs your require Check in csv file and read corresponding values : use File.au3 UDF (FileReadtoArray) along with StringSplit to get values Pass that value to cmd : use run* function to pass values I would also recommend that you encrypt your csv file with the UDF Encrypt.au3 and decrypt it as needed. Happy scripting ! “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
MadhaN Posted January 18, 2019 Author Posted January 18, 2019 @Nine Hi can you please provide me once simple example script , am new to scripting ,
FrancescoDiMuro Posted January 18, 2019 Posted January 18, 2019 @MadhaN Did you look in the Help file? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
MadhaN Posted January 18, 2019 Author Posted January 18, 2019 @FrancescoDiMuro No, I dont know this scripting .. Help me to create the script as required.
FrancescoDiMuro Posted January 18, 2019 Posted January 18, 2019 (edited) @MadhaN In this forum, the motto is "Teach a man to fish" instead of "Give a man a fish", so, since you are asking for an example, and the Help file is full of commented examples, you already have what you need.EDIT: Seems that you already have a thread locked by @Jos with the same subject and same questions, always without providing any code. Edited January 18, 2019 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Moderators Melba23 Posted January 18, 2019 Moderators Posted January 18, 2019 MadhaN, I have now seen that other thread. Either start posting some code that YOU have written to try and do what you want - you have been given some excellent pointers above. It does not matter if it does not work correctly - but YOU need to make some effort or I will lock this thread too. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
MadhaN Posted January 18, 2019 Author Posted January 18, 2019 Hi All, Created below script to get details and send to CMD but want to search in csv or xls, Please guide me. global $ip Global $usr Global $pass $ip = InputBox("Enter IP" , " Enter IP to take Remote") $usr = InputBox("Enter usr" , " Enter usr to take Remote") $pass = InputBox("Enter Pass" , " Enter Pass to take Remote") Run("C:\WINDOWS\system32\cmd.exe") $win=WinWaitActive("C:\WINDOWS\system32\cmd.exe") send('rdp /v:' & $ip &' '&'/u:'&$usr &' ' &'/p:'&$pass & "{ENTER}") ;Sleep(1400) ;send('rdp /v:' & $ip & '/u:'&$usr &'/p:'&$pass & "{ENTER}")
FrancescoDiMuro Posted January 18, 2019 Posted January 18, 2019 @MadhaN Did you look in the Help file the functions that @Nine suggested to you? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Nine Posted January 18, 2019 Posted January 18, 2019 (edited) Congrats @MadhaN. You are almost there. Add those 2 UDF at the very beginning of your script, so you have access to the functions you need : #include <Array.au3> #include <File.au3> Now look at _FileReadToArray. If your csv file is perfectly balanced, you can create a 2D array with this statement only. Then use _ArraySearch to compare your inputs with the content of the array. Edited January 18, 2019 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
MadhaN Posted January 18, 2019 Author Posted January 18, 2019 @Nine Hi , my csv have more thn 1000 rows and 6 columns , please guide me to create 2d array and search . IF possible provide me simple example script , I checked in help file i cannot understand proper since i have no knowledge in scripting.
Nine Posted January 18, 2019 Posted January 18, 2019 It is one line _FileReadToArray. Read help file... Courage ! FrancescoDiMuro 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now