Sign in to follow this  
Followers 0
SWB

Having problems running script

3 posts in this topic

Can't get this to run, please help.

Thanks,

SWB

#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

;Global $Program = 'C:\Program Files\WinRAR'

Dim $msg, $fsf

Dim $guiHandle = GUICreate("RAR", 200, 135)

GUICtrlCreateLabel('Archive:' , 5, 5, 190)

Dim $Archive = GUICtrlCreateInput("", 5, 20, 165)

Dim $Folder = GUICtrlCreateButton( '...', 170, 19, 25, 22)

GUICtrlCreateLabel('Name:' , 5, 50, 190)

Dim $Name = GUICtrlCreateInput("", 5, 65, 190)

Dim $rarbutton = GUICtrlCreateButton("Run RAR", 5, 108, 75)

Dim $exitbutton = GUICtrlCreateButton("Exit", 120, 108, 75)

GUISetState(@SW_SHOW, $guiHandle )

While 1

$msg = GUIGetMsg($guiHandle )

Select

Case $msg == $GUI_EVENT_CLOSE Or $msg = $exitbutton

Exit

Case $msg == $Folder

$fsf = FileSelectFolder('Choose Folder to Archive','')

If Not @error Then GUICtrlSetData($Archive, $fsf)

Case $msg == $rarbutton

RunWait(@COMSPEC & " /k Start RAR a -av -m5 -o+ -r -sfx & '\' "' archive "' & GUICtrlRead($Archive))'" & '\' & GUICtrlRead($Name) & .rar"'))

Case Default

EndSelect

WEnd

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

i dont know what this is script do, but you writing "line 27" wrong

;~ RunWait(@COMSPEC & " /k Start RAR a -av -m5 -o+ -r -sfx & '' "' archive "' & GUICtrlRead($Archive))'" & '' & GUICtrlRead($Name) & .rar"')) ; wrong

RunWait(@ComSpec & " /k Start RAR a -av -m5 -o+ -r -sfx "& '' & '" archive "' & GUICtrlRead($Archive)) & ' ' & GUICtrlRead($Name) & .rar)

Edit: the problem from the symbols ( " ) and ( ' ) and ( & )

Edited by Command3r

[font="arial, helvetica, sans-serif;"]Advice for you[/font][font="arial, helvetica, sans-serif;"]: [/font][u]Search[/u] before posting.

 

[font="arial, helvetica, sans-serif;"] *********** Problem solved? if yes [/font][color=rgb(0,0,0);font-family:arial, helvetica, sans-serif;] *********[/color]

[font="arial, helvetica, sans-serif;"]******* press "Mark Solved" button. *******[/font]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

RAR.au3

i dont know what this is script do, but you writing "line 27" wrong

;~ RunWait(@COMSPEC & " /k Start RAR a -av -m5 -o+ -r -sfx & '\' "' archive "' & GUICtrlRead($Archive))'" & '\' & GUICtrlRead($Name) & .rar"')) ; wrong

RunWait(@ComSpec & " /k Start RAR a -av -m5 -o+ -r -sfx "& '\' & '" archive "' & GUICtrlRead($Archive)) & ' \' & GUICtrlRead($Name) & .rar)

Edit: the problem from the symbols ( " ) and ( ' ) and ( & )

It still gives me an error:

C:\Documents and Settings\Owner\Desktop\DVDFAB Command-Line\DVDFab\SCRIPTS\DVDFAB MAIN MOVIE ISO MODE\RAR.au3(27,105) : WARNING: $Archive: possibly used before declaration.

RunWait(@ComSpec & " /k Start RAR a -av -m5 -o+ -r -sfx "& '\' & '" archive "' & GUICtrlRead($Archive)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Owner\Desktop\DVDFAB Command-Line\DVDFab\SCRIPTS\DVDFAB MAIN MOVIE ISO MODE\RAR.au3(27,108) : ERROR: syntax error

RunWait(@ComSpec & " /k Start RAR a -av -m5 -o+ -r -sfx "& '\' & '" archive "' & GUICtrlRead($Archive)) &

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Owner\Desktop\DVDFAB Command-Line\DVDFab\SCRIPTS\DVDFAB MAIN MOVIE ISO MODE\RAR.au3(27,142) : ERROR: Object method or attribute accessed without 'With'.

RunWait(@ComSpec & " /k Start RAR a -av -m5 -o+ -r -sfx "& '\' & '" archive "' & GUICtrlRead($Archive)) & ' \' & GUICtrlRead($Name) & .rar)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Owner\Desktop\DVDFAB Command-Line\DVDFab\SCRIPTS\DVDFAB MAIN MOVIE ISO MODE\RAR.au3(27,142) : ERROR: syntax error

RunWait(@ComSpec & " /k Start RAR a -av -m5 -o+ -r -sfx "& '\' & '" archive "' & GUICtrlRead($Archive)) & ' \' & GUICtrlRead($Name) & .rar)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Owner\Desktop\DVDFAB Command-Line\DVDFab\SCRIPTS\DVDFAB MAIN MOVIE ISO MODE\RAR.au3(27,105) : ERROR: $Archive: undeclared global variable.

RunWait(@ComSpec & " /k Start RAR a -av -m5 -o+ -r -sfx "& '\' & '" archive "' & GUICtrlRead($Archive)

Edited by SWB

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0