Lesler Posted February 15, 2010 Share Posted February 15, 2010 expandcollapse popup$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)I hope that I have written this post twice. Excuse my English it is translated using the Goggels 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 Link to comment Share on other sites More sharing options...
FinalVersion Posted February 15, 2010 Share Posted February 15, 2010 Run(@Comspec & " commands here") [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Lesler Posted February 15, 2010 Author Share Posted February 15, 2010 Run(@Comspec & " commands here") Hello Thank you for your prompt response. My problem is that I need it to insert the variable $ line and to my dos commando demands that are placed "around and Autoit will not accept that there are more" than those who surrounding the line Link to comment Share on other sites More sharing options...
FinalVersion Posted February 15, 2010 Share Posted February 15, 2010 If I understand you correctly. Run(@Comspec & " some command " & $var) [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Lesler Posted February 15, 2010 Author Share Posted February 15, 2010 Thank that yuo try to help me my CMD command looks like lise type X:\TSA\Special\ Programs\find_glemte_ver_i_pdf\pdf_liste_kun_vare_nr.txt | find /i "12345" > X:\TSA\Special\Programs\find_glemte_ver_i_pdf\a\temp_liste.txt where "12345" most be $line But the ComSpec will not accept the "" around $line Link to comment Share on other sites More sharing options...
whim Posted February 15, 2010 Share Posted February 15, 2010 (edited) $line = '12345' $cmd = 'X:\TSA\Special\ Programs\find_glemte_ver_i_pdf\pdf_liste_kun_vare_nr.txt | find /i "' & $line & '" > X:\TSA\Special\Programs\find_glemte_ver_i_pdf' Run(@ComSpec & ' /c ' & $cmd) or, maybe more useful: $findstr = '12345' $cmd = 'X:\TSA\Special\ Programs\find_glemte_ver_i_pdf\pdf_liste_kun_vare_nr.txt | find /i "' & $findstr & '" > ' $outfile = 'X:\TSA\Special\Programs\find_glemte_ver_i_pdf' Run(@ComSpec & ' /c ' & $cmd & $outfile) Edited February 15, 2010 by whim Link to comment Share on other sites More sharing options...
Lesler Posted February 15, 2010 Author Share Posted February 15, 2010 Thanks for your help It was just what was needed 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