bourny Posted February 14, 2005 Share Posted February 14, 2005 Can anyone suggest why my script is not hiding the dos window on XP The line in red is the problem line.despite using the @sw_hide I get multiple dos pop up boxes.Script====Func scan_client()$a = @comspec & ' /c Dir /b /s c:\*.'$c = ' >> c:\whwash\cfile.wash'FileCopy ( "servername\whwash\Suffix\suffix.wash", "c:\whwash\suffix.wash" ,1 )sleep(3000)$suffix_open=FileOpen("c:\whwash\suffix.wash", 0) If $suffix_open = -1 Then ;error - unable to open suffix file $date = @MON & "/" & @mday & "/" & @year $time = "....Time: " & @HOUR & ":" & @MIN $fail = FileOpen("c:\whwash\whfail.log", 1) FileWriteLine($fail, "Mark B: - Whitewash Script Failed - Could not open suffix.wash >>> " & $date & $time) FileClose($fail) Exit EndIf While 1 $suffix = FileReadLine($suffix_open) If @error = -1 Then ExitLoop RunWait ($a & $suffix & $C, @scriptdir, @SW_HIDE) Wend FileClose($suffix_open)Endfunc Link to comment Share on other sites More sharing options...
DaveF Posted February 14, 2005 Share Posted February 14, 2005 Can anyone suggest why my script is not hiding the dos window on XP The line in red is the problem line.despite using the @sw_hideĀ I get multiple dos pop up boxes.RunWait ($a & $suffix & $C, @scriptdir, @SW_HIDE)I ran essential part of your function on my home XP Home machine and didn't see any DOS boxes, is it possible that they're appearing because of something in the rest of your script? Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines. Link to comment Share on other sites More sharing options...
bourny Posted February 14, 2005 Author Share Posted February 14, 2005 will give it a go but I dont think this is the case.. Thanks will post result Link to comment Share on other sites More sharing options...
MHz Posted February 14, 2005 Share Posted February 14, 2005 Try a debug msgbox, and see what command you are passing.Func scan_client() $a = @ComSpec & ' /c Dir /b /s c:\*.' $c = ' >> c:\whwash\cfile.wash' FileCopy("servername\whwash\Suffix\suffix.wash", "c:\whwash\suffix.wash", 1) Sleep(3000) $suffix_open = FileOpen("c:\whwash\suffix.wash", 0) If $suffix_open = -1 Then ;error - unable to open suffix file $date = @MON & "/" & @MDAY & "/" & @YEAR $time = "....Time: " & @HOUR & ":" & @MIN $fail = FileOpen("c:\whwash\whfail.log", 1) FileWriteLine($fail, "Mark B: - Whitewash Script Failed - Could not open suffix.wash >>> " & $date & $time) FileClose($fail) Exit EndIf While 1 $suffix = FileReadLine($suffix_open) If @error = -1 Then ExitLoop RunWait($a & $suffix & $c, @ScriptDir, @SW_HIDE) MsgBox(262144,'debug line ~26' , '$a & $suffix & $c:' & @lf & $a & $suffix & $c);### Debug MSGBOX WEnd FileClose($suffix_open) EndFunc Link to comment Share on other sites More sharing options...
bourny Posted February 14, 2005 Author Share Posted February 14, 2005 I have tested the function listed outside of the main script and it does seem to produce the results davef has found. (nice one dave - how silly of me to assume AutoIt has a bug) This looks like something else in my script is causing these dos boxes to appear... I know the dos boxes are comming from this function as I activated the debug taskbar icon. Thanks for you help - will take my script apart and find this bad boy.. Bourny 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