>>oShell = Createobject('WScript.Shell') >> oShell.Exec(lc + ' "'+lcParameter+'"') >>>>
>>local lo, lcCmdline >>IF NOT '\process' $ LOWER(SET('classlib')) >> SET CLASSLIB TO 'process' additive >>ENDIF >>* - Passing string parameters >>lcCmdLine = lC + ' "'+ lcParameter + '"' >>lo=CREATEOBJECT('api_apprun',lcCmdLine,FULLPATH('.')) >>lo.launchapp() >>lo = '' >>>>
>>Procedure RunCmd >>lPar pCmd,p1,p2,p3,p4,p5,p6,p7 >>local lcCmd, i >>lcCmd = '' >>if pcount() > 0 >> set textmerge on to memvar lcCmd noshow >> \<<lcCmd>> >> for i = 1 to pCount()-1 >> lcPar = 'p'+trans(i) >> lcPar = eval(lcPar) >>** Can only pass by value >> do case >> case vartype(lcPar) = 'C' >> \\ "<<lcPar>>", >> case inlist(vartype(lcPar), 'D','T' >> \\ {<<lcPar>>}, >> case inlist(vartype(lcPar),'L','N' >> \\ <<lcPar>>, >> endcase >> endfor >> set textmerge to >> *** Remove extra comma >> if i > 1 >> lcCmd = left(lcCmd,len(lcCmd) - 1) >> endif >> local lo >> IF NOT '\process' $ LOWER(SET('classlib')) >> SET CLASSLIB TO 'process' additive >> ENDIF >> lo=CREATEOBJECT('api_apprun',lcCmd,FULLPATH('.')) >> lo.launchapp() >> lo = '' >>endif >>>>
>>>Finally got a simple one to run by doing: >>>lc = getfile() >>>run ["&lc"] >>>>>>Now I need to include a parameter in lc:
>>>lc = getfile() >>>------ option 1 ------- >>>lc = lc + [ "] + lcParameter + ["] >>>run ["&lc"] && doesn't work because there are ["]s in lc >>>run ['&lc'] && doesn't work either >>> >>>------ option 2 ------- >>>lc = lc + [ '] + lcParameter + ['] >>>run ["&lc"] && doesn't work either >>> >>>Any idea how I can accomplish this? >>>>>>
>>>>run ["c:\Set Time\settime.bat"] >>>>>>>>