h3xl3y Posted March 20, 2014 Posted March 20, 2014 (edited) I have this script that was working before i added unpacking #include <Misc.au3> ;For Do-Until _IsPressed #include <File.au3> #include <Array.au3> $app = "app.exe" $app1 = "splash.exe" $extract = "D:\Extract" $Temp = "D:\Temp\" $Source = $CmdLine[1] If $CmdLine[0] == 1 Then DirCreate( $Temp ) RunWait('"'& $extract & '\7z.exe"' & ' x "' & $Source & '" ' & "-y -o" & '"' & $Temp & '"', "", @SW_HIDE) Run( $app1 ) Do Sleep(1) Until _IsPressed( "20" ) ;Space Local $search = FileFindFirstFile($Temp & '*.*') If $search = -1 Then exit 0 Local $file = FileFindNextFile($search) FileClose($search) Run('"' & $app & '" "' & $file & '"') ProcessClose( $app1 ) While ProcessExists( $app ) Sleep(500) WEnd ProcessWaitClose( $app ) DirRemove( $Temp, 1) Exit 0 EndIf It all works good until $file should be completed Before i had $CmdLine[1] instead of $file Run('"' & $app & '" "' & $CmdLine[1] & '"') Edited March 20, 2014 by h3xl3y
JohnOne Posted March 20, 2014 Posted March 20, 2014 Local $file = FileFindNextFile($search) ConsoleWrite($file & @lF) output is...? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Developers Jos Posted March 20, 2014 Developers Posted March 20, 2014 You are missing a space between the end double quote of the programname and the start double quote of the parameter. Run('"' & $app & '" "' & $file & '"') Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
h3xl3y Posted March 20, 2014 Author Posted March 20, 2014 Local $file = FileFindNextFile($search) ConsoleWrite($file & @lF) output is...? does not output anything i need to include something to work?
h3xl3y Posted March 20, 2014 Author Posted March 20, 2014 You are missing a space between the end double quote of the programname and the start double quote of the parameter. Run('"' & $app & '" "' & $file & '"') Jos Sorry that was an typo, because i modified it a few times and didn't notice it was wrong but it is not working with space
JohnOne Posted March 20, 2014 Posted March 20, 2014 Could mean many things. Local $file = FileFindNextFile($search) ConsoleWrite($file & " error - " & @error & @lF) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
h3xl3y Posted March 20, 2014 Author Posted March 20, 2014 No nothing ConsoleWrite appear in black in the code, not blue
JohnOne Posted March 20, 2014 Posted March 20, 2014 (edited) What version of AutoIt you using? @AutoItVersion Never mind, I see you are running compiled. Local $file = FileFindNextFile($search) MsgBox(0, "Info", $file & " error - " & @error & @lF) Edited March 20, 2014 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
h3xl3y Posted March 20, 2014 Author Posted March 20, 2014 (edited) the output is filename error - 0 MsgBox(0, "Info", $file & @lF) and from this code i see that $file is the name i want if i get the same name from $file as i did from $CmdLine[1] then why is not working ? Edited March 20, 2014 by h3xl3y
Solution h3xl3y Posted March 21, 2014 Author Solution Posted March 21, 2014 OK, i got it i need path too Run('"' & $app & '" "' & $Temp & $file & '"')
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