09-11-2008, 01:38 PM
In trying to make many of the operations in a large marcro more generic by placing them into functions (so I can use them more easily elsewhere in the code and in other related macros), I keep running into the "Unknown Member" error. I get this on such common operations as .from(...) and .dospath(...)
If I move this code to the macro they work fine, but in function I get the error.
Function MurFTP_OpenLame
If I move this code to the macro they work fine, but in function I get the error.
Function MurFTP_OpenLame
function $inputf [$outputf]
;2 arguments: [inputfile] and [outputfile] lame req's dospath
if(getopt(nargs) < 2) ;; if no output path/filename specified, uses same as inputfile
,str s1.getpath(inputf) ;; gets path only
,str s2.getfilename(inputf) ;;gets input filename no ext
,outputf.from(s1 s2 ".mp3")
,
inputf.dospath(inputf)
outputf.dospath(outputf)
str lameexe = "c:\lame.exe" ;; for forum example, proper location declared earlier in actual mac
lamestring.from(lameexe " " inputf " " outputf " -b 128""''")
system lamestring