keilamym Posted September 27, 2006 Share Posted September 27, 2006 (edited) i need just a little help... i was tasked with converting workstation lists to .csv example: pc1 pc2 pc3 should look like "pc1","pc2","pc3" i already tried excel and it kept it in a list. because it was an emergency, i just did this. WinActivate("convert.txt - Notepad", "" ) WinWait ("test","",3) Send ("{end}" & """" & "." & """"& "{DEL}",) Send ("{end}" & """" & "." & """"& "{DEL}",) Doing this 800 times converted the file and all was over. But now, they need it done all the time so i want give them a tool they and they can do it there self. I have nice little wise frontend so they can paste a workstation list, and i know how to read the lines and process commands. BUT is there a command i can use to take the PC names and post them with quotes into a new file. Keep in mind they all have to be on the same line. If anyone has any ideas, I'd really appreciate it. Thanks Edited September 27, 2006 by keilamym Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 27, 2006 Share Posted September 27, 2006 Hi, maybe #include <file.au3> Dim $aRecords, $line If Not _FileReadToArray("test.txt",$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf For $x = 1 to $aRecords[0] $line &= '"' & $aRecords[$x] &'",' Next MsgBox(0,"", StringTrimRight($line,1)) So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
keilamym Posted September 28, 2006 Author Share Posted September 28, 2006 I'll check it out and get back to you.. thanks for your help... Hi, maybe #include <file.au3> Dim $aRecords, $line If Not _FileReadToArray("test.txt",$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf For $x = 1 to $aRecords[0] $line &= '"' & $aRecords[$x] &'",' Next MsgBox(0,"", StringTrimRight($line,1)) So long, Mega Link to comment Share on other sites More sharing options...
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