openreg "CLASSESROOT", filetype; $fType = getregstr(""); closereg; openreg "CLASSESROOT", $fType + "\\shell"; $cName = getregstr(""); closereg; openreg "CLASSESROOT", $fType + "\\shell\\" + $cName + "\\command"; $cStr = getregstr(""); closereg; #i = strlen($cStr); while (#i >= 0) { if (midstr($cStr, #i, 2) == "%1") { break; } #i = #i - 1; } #j = strlen($cStr) - #i; $cStr = leftstr($cStr, #i) + filename2 + rightstr($cStr, #j - 2); run $cStr; endmacro;