Jump to content
Sign in to follow this  
ToKicoBrothers

Doesn't Work!

Recommended Posts

ToKicoBrothers

I was trying to make a wav to mp3 converter using lame and it doesn't work!!!

;~ Name: SimpleLame 1.0 beta
;~ Author: ToKico Brothers
;~         http://tokico.blogspot.com/
;~ Description: SimpleLame is a simple Wav to Mp3 Converter powered by Lame

#include <GUIConstants.au3>

GUICreate("SimpleLame 1.0 beta", 194, 185, 415, 125)
GUICtrlCreateLabel("SimpleLame", 64, 8, 71, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$wavinput = GUICtrlCreateButton("WAV Input", 8, 32, 81, 41)
$mp3output = GUICtrlCreateButton("MP3 Output", 104, 32, 81, 41)
$convert = GUICtrlCreateButton("Convert to MP3", 32, 120, 129, 49)
$kbpersec = GUICtrlCreateInput("      Kb/Sec", 56, 88, 81, 21)
GUISetState(@SW_SHOW)
;~ GUI Created by Koda

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $wavinput
            $wavdialog = FileOpenDialog ( "WAV Input", @ScriptDir, "WAV Files (*.wav)")
        Case $mp3output
            $mp3dialog = FileSaveDialog ( "MP3 Output", @ScriptDir, "MP3 Files (*.mp3)")
        Case $convert
            Run ( "lame.exe -h -b " & $kbpersec & " " & $wavdialog & " " & $mp3dialog )
    EndSwitch
WEnd

Can anybody tell me what I am doing wrong??

Edited by ToKicoBrothers

My Scripts: SimplePlayer 1.0 - A very simple music player. PCInfo 1.2 - A script that displays PC information.

Share this post


Link to post
Share on other sites
MHz

Try this for your Run) function

Run ( 'lame.exe -h -b "' & $kbpersec & '" "' & $wavdialog & '" "' & $mp3dialog & '"' )

Notice the quotes. Singles and doubles quotes.

Share this post


Link to post
Share on other sites
ToKicoBrothers

Try this for your Run) function

Run ( 'lame.exe -h -b "' & $kbpersec & '" "' & $wavdialog & '" "' & $mp3dialog & '"' )

Notice the quotes. Singles and doubles quotes.

Other problem: the lame.exe file is there (on the script dir.) but autoit says me that it isn't!!

My Scripts: SimplePlayer 1.0 - A very simple music player. PCInfo 1.2 - A script that displays PC information.

Share this post


Link to post
Share on other sites
SadBunny

Other problem: the lame.exe file is there (on the script dir.) but autoit says me that it isn't!!

Try specifying the path for lame.exe, as in

Run ( 'lame.exe -h -b "' & $kbpersec & '" "' & $wavdialog & '" "' & $mp3dialog & '"' , @scriptdir)

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites
ToKicoBrothers

Try specifying the path for lame.exe, as in

Run ( 'lame.exe -h -b "' & $kbpersec & '" "' & $wavdialog & '" "' & $mp3dialog & '"' , @scriptdir)
Still doesn't work!!!!

My Scripts: SimplePlayer 1.0 - A very simple music player. PCInfo 1.2 - A script that displays PC information.

Share this post


Link to post
Share on other sites
SadBunny

Still doesn't work!!!!

Does it work when you specify the full pathname in the first Run() parameter, like Run ("D:\AutoIt\lame.exe ...................)?


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites
ToKicoBrothers

Try

Run ( @ScriptDir & '\lame.exe -h -b "' & $kbpersec & '" "' & $wavdialog & '" "' & $mp3dialog & '"')
Thanks!! It works now!! thanks SadBunny and Mhz too!! Edited by ToKicoBrothers

My Scripts: SimplePlayer 1.0 - A very simple music player. PCInfo 1.2 - A script that displays PC information.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.