Execute a DOS command with maxscript
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all.
I am trying to find a good alternative to backburner and came across smedge. However it wasn't working in 3ds max 2025, so I edited the maxscript that submits the job.
Everything seems fine but it seems that is unable to execute a dos command. If I use the same string copied from max listener (the string that is the command), in the Dos Console, it does submit the job. So the issue is with the script.
Can anyone help here?
Cheers
"
-- SmedgeRender.ms
-- Updated for 3ds Max 2025
-- Smedge Render Submission Script
-------------------------------------------------------------------
-- CONFIGURATION
-------------------------------------------------------------------
-- Update this path to the path to your Submit.exe executable
global smedgeSubmitPath = "C:\Program Files\Smedge\Submit.exe"
-- Update this with your list of Pools
global smedgePoolList = #("Whole System", "3DS Max 2025")
-------------------------------------------------------------------
-- Ensure a file is loaded before running
if (maxFileName == "") then (
messagebox "No scene file is loaded. Please open a scene before submitting a render job." title:"Smedge Error"
return false
)
-- Remove old window if it exists
try (destroyDialog smedgeRenderRollout) catch()
-- Define the render submission UI
rollout smedgeRenderRollout "Smedge Render"
(
-- Job Name UI
group "Job Name"
(
edittext smedgeJobName text:(getFilenameFile maxFileName)
)
-- Render Options UI
group "Options"
(
checkbox smedgePaused "Paused" checked:false
slider smedgePriority "Priority" range:[0,100,50] type:#integer
dropdownlist smedgePool "Pool" items:smedgePoolList
)
-- Submit Button
button smedgeSubmit "Submit"
-- Define the submit button action
on smedgeSubmit pressed do
(
-- Ensure a pool is selected
local selectedPool = if smedgePool.selected != undefined then smedgePool.selected else "Default"
-- Generate the command line
local cmd = "\"" + smedgeSubmitPath + "\" Script -Type \"3D Studio Max\""
cmd += " -Name \"" + smedgeJobName.text + "\""
cmd += " -Scene \"" + maxFilePath + maxFileName + "\""
cmd += " -Range "
-- Set the frame range
if (rendTimeType == 1) then cmd += (slidertime as string)
if (rendTimeType == 2) then cmd += ((animationRange.start as string) + " - " + (animationRange.end as string))
if (rendTimeType == 3) then cmd += ((rendStart as string) + " - " + (rendEnd as string))
if (rendTimeType == 4) then cmd += rendPickupFrames
-- Add priority and pool
cmd += " -Priority " + (smedgePriority.value as string)
cmd += " -Pool \"" + selectedPool + "\""
-- Check if paused is enabled
if (smedgePaused.checked) then cmd += " -Paused"
-- Debugging output
format "Submitting Smedge Job with Command: %\n" cmd
-- Run the command
HiddenDOSCommand cmd
-- Close the window
destroyDialog smedgeRenderRollout
)
)
-- Show the UI
createDialog smedgeRenderRollout
"