Jump to content

What do you think is wrong in this ?


Go to solution Solved by h3xl3y,

Recommended Posts

Posted (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 by h3xl3y
Posted

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

Posted (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 by h3xl3y

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...