Lesler Posted February 12, 2010 Posted February 12, 2010 (edited) Hello I must have done a cmd commando I have tried that programs me outwards with the following WinActivate ( "cmd.exe") Sleep (500) send ( "type X: \ TSA \ Special \ Programs \ find_glemte_ver_i_pdf \ pdf_liste_kun_vare_nr.txt | find / i") Send ( "(ASC 034)") send ($ line) Send (".") Send ( "(ASC 034)") send ( "> X: \ TSA \ Special \ Programs \ find_glemte_ver_i_pdf \ a \ temp_liste.txt") send ( "(ENTER)") Sleep (100) It also works, but I want it written in an internal command in Autoit I have tried myself with RunWait (@ ComSpec But unfortunately I can not get it to work. Is there one of you will help me? Thanks in advance Her is my ful program I have trayt to ad is at Autoit program, but i dont have the booten $temp=" " $slet_liste=FileOpen("X:\TSA\Special\programmer\find_glemte_ver_i_pdf\a\a_0.txt", 2) FileWriteLine($slet_liste,"" & $temp) FileClose($slet_liste) Sleep(100) Global $i_l $file = FileOpen("X:\TSA\Special\programmer\find_glemte_ver_i_pdf\a_liste_UDEN_REV.txt", 0) run ("cmd.Exe") While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop WinActivate ("cmd.exe") Sleep(500) send("type X:\TSA\Special\programmer\find_glemte_ver_i_pdf\pdf_liste_kun_vare_nr.txt | find /i ") Send("{ASC 034}") send($line) send(".") Send("{ASC 034}") send(" > X:\TSA\Special\programmer\find_glemte_ver_i_pdf\a\temp_liste.txt") send("{ENTER}") Sleep(100) $temp_liste=FileOpen("X:\TSA\Special\programmer\find_glemte_ver_i_pdf\a\temp_liste.txt", 0) $temp2 = FileReadLine($temp_liste, 1) FileClose($temp_liste) $i_h=FileOpen("X:\TSA\Special\programmer\find_glemte_ver_i_pdf\a\a_0.txt", 1) If $i_h = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWriteLine($i_h,"" & $temp2) FileClose($i_h) Sleep(100) $h_l=FileOpen("X:\TSA\Special\programmer\find_glemte_ver_i_pdf\samlet_liste.txt", 1) If $h_l = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWriteLine($h_l,"" & $temp2) FileClose($h_l) Sleep(100) WEnd FileDelete("X:\TSA\Special\programmer\find_glemte_ver_i_pdf\a\temp_liste.txt") send("exit") send("{ENTER}") FileClose($file Edited February 15, 2010 by Lesler
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