Matthew1344 Posted August 9, 2007 Share Posted August 9, 2007 Okay... I give up... all I want to do is run the Imagemagick command line to resize an image. What am I doing wrong?For $i = 1 To $CmdLine[0] $nextPicPath = $CmdLine[$i] ResizePic($nextPicPath) Next Func ResizePic($myPicPath) $myPathPieces = StringSplit($myPicPath, "\") $myFilename = $myPathPieces[$myPathPieces[0]] $myCmd = "convert """ & $myPicPath & """ -resize 800 ""C:\Temp\" & $myFilename & """" Run($myCmd) EndFuncOf course ShellExecute doesn't work either.However, when I run $myCmd manually, it does work. Link to comment Share on other sites More sharing options...
gamerman2360 Posted August 9, 2007 Share Posted August 9, 2007 Is the convert file in a directory thats in your %PATH% (enviroment variable)? If not, you might want to include the full path to the file in your $myCmd var. Link to comment Share on other sites More sharing options...
ptrex Posted August 9, 2007 Share Posted August 9, 2007 @Matthew1344Maybe this can help you out.ImageMagick in AU3Regardsptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Matthew1344 Posted August 9, 2007 Author Share Posted August 9, 2007 Is the convert file in a directory thats in your %PATH% (enviroment variable)?Yes. I can ConsoleWrite $myCmd, copy and paste to the command line, and it works fine. (from anywhere) Link to comment Share on other sites More sharing options...
Matthew1344 Posted August 9, 2007 Author Share Posted August 9, 2007 @Matthew1344Maybe this can help you out.ImageMagick in AU3RegardsptrexYeah... I knew about the COM object. I was just hoping to keep it as simple as possible. I've never had any difficulty in running a simple command before.I plan to use the COM object, but I'm still terribly curious why the above didn't work. Link to comment Share on other sites More sharing options...
Matthew1344 Posted August 10, 2007 Author Share Posted August 10, 2007 Okay... Yes... the COM component works.But why doesn't the command line? Link to comment Share on other sites More sharing options...
gamerman2360 Posted August 10, 2007 Share Posted August 10, 2007 What error do you get? Link to comment Share on other sites More sharing options...
Matthew1344 Posted August 10, 2007 Author Share Posted August 10, 2007 What error do you get?That's just it. There's no error. The conversion simply doesn't happen. The Windows console window pops up briefly, but it's too fast to even produce any visible output.-Matt 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