Contributions
how to convert this vbscript into jscript?
Public Function ReadExcelDataSingle(sFileName,iRow,sFieldName,vSheet) //Option explicit Dim sData Dim iNoError Dim sCurrentProc Dim sWinDir Dim lResult Dim strMsgText Dim iColNum Dim sTestData Dim ColHead //Count Columns ColCount = objWorkSheet.UsedRange.columns.count set oSearchRegion = objWorkSheet.Range(objWorkSheet.cells(1,1),objWorkSheet.cells(1, ColCount )) notfound = "" with (oSearchRegion) set oSearchResult = .Find(sFieldName) If not oSearchResult is nothing then iColNum = oSearchResult.column FirstCol = iColNum FoundVal = objWorkSheet.Rows(1).Columns(iColNum).Value If sFieldName != FoundVal then do set oSearchResult = .Findnext(oSearchResult) iColNum = oSearchResult.column FoundVal = objWorkSheet.Rows(1).Columns(iColNum).Value loop while FirstCol != iColNum and sFieldName != FoundVal if sFieldName != FoundVal then notfound = "Y" end if else notfound = "Y" end if End With //Retrieve the value from the cell sData = "" if notfound = "" then sData =objWorkSheet.rows(iRow).Columns(iColNum).Value end if sData = Trim(sData) ReadExcelDataSingle = sData End Function2.7KViews0likes6CommentsIf sData <> "" Then vbs script in jscript?
How to code this in jscript? If sData <> "" Then If sData = "0" Then iColNum = runcolcount Else if IsNumeric(sData) Then Else Call zGen_PopupMsg("This is the Test Case being processed " + vbCrlf + sData, 3) Execute sData End if End If End IfSolved1.5KViews0likes3CommentsChange the application run folder
There are times that I want to run the application run folder for a specific application in the TestedApps list depending on the version/directory where it is stored - can I do this programmatically? this all would come from a config file read in at the start....Solved1.2KViews0likes2Commentsrunning .vbs script from jscript testcomplete
I want to run this .vbs scriptC:\pwc\PWC-QTP\runit.vbs Can anybody help me? I started here var strExe = "C:\pwc\PWC-QTP\runit.vbs -h1 -d33"; var objShell = new ActiveXObject("WScript.Shell"); var objScriptExec = objShell.Exec(strExe); var strExeOut = objScriptExec.StdOut.ReadAll();984Views0likes0Comments