PDA

View Full Version : Problem with File.Run Action - Error?


tamer1009
06-21-2009, 09:14 AM
Hello, i am trying to create an image converter in ams, but i need to get this work:

Select your file:
File = Dialog.FileBrowse(true, "Select files:", _DesktopFolder, "All Images (*.jpg)|*.jpg|", "", "jpg", true, true);

Convert it:

in batch:

"C:\converter.exe" /S "C:\test.png" /T "C:\test.jpg" /F2 /C4 /V

in ams:

File.Run("C:\\converter.exe", "/S "YOUR SELECTED FILE" /T "OUTPUT TO YOUR SELECTED DIR" /F2 /C4 /V", "", SW_MAXIMIZE, true);


Can someone help me with this? i tried everything! :huh

Thankyou,

Tamer

ShadowUK
06-21-2009, 09:35 AM
Hello, i am trying to create an image converter in ams, but i need to get this work:

Select your file:
File = Dialog.FileBrowse(true, "Select files:", _DesktopFolder, "All Images (*.jpg)|*.jpg|", "", "jpg", true, true);

Convert it:

in batch:

"C:\converter.exe" /S "C:\test.png" /T "C:\test.jpg" /F2 /C4 /V

in ams:

File.Run("C:\\converter.exe", "/S "YOUR SELECTED FILE" /T "OUTPUT TO YOUR SELECTED DIR" /F2 /C4 /V", "", SW_MAXIMIZE, true);


Can someone help me with this? i tried everything! :huh

Thankyou,

Tamer

local Files = Dialog.FileBrowse(true, "Select files:", _DesktopFolder, "All Images (*.jpg)|*.jpg|", "", "jpg", true, true);

if (Files[1] ~= "CANCEL") then
local Dir = Dialog.FolderBrowse("Select an output folder.", "");

if (Dir == "CANCEL") then Application.ExitScript(); end

for K, V in pairs(Files) do
File.Run("C:\\converter.exe", "/S \""..V.."\" /T \""..Dir.."\\"..String.SplitPath(V).Filename..".converted\" /F2 /C4 /V", "", SW_MAXIMIZE, true);
end
end

tamer1009
06-22-2009, 02:31 PM
thankyou!, you can read my mind!