Jump to content

Search the Community

Showing results for tags 'vbscript'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 13 results

  1. Today I made a tutorial showing you how to check if a file or folder exists. This is useful to know before you copy or move stuff around using VbScript. Here: http://therevisionist.org/software-engineering/qtpuft/1-vbscript-basics/14-vbscript-how-to-check-if-file-folder-exists/
  2. Hello! I'm new to the w3school forum here, and I just wanted to share a tutorial I made that shows you how to automate the logging into facebook without SendKeys: http://therevisionist.org/software-engineering/qtpuft/1-vbscript-basics/13-vbscript-internet-explorer-html-automation/ I've looked into sendkeys before, but I encoutered a problem where the SendKey's keystrokes activated on my desktop; the Internet Explorer (IE) was not the active window. I couldn't figure out how to make the IE window the active window, so I used HTML to identify the ID of objects in the IE window. And as a separate questions, do you know why Sendkeys does not work with the IE browser? Do you recommend any other alternatives, other than using HTML ID?
  3. Hello. Here I have a VBScript which shows the installed programs of the local machine in a txt-file with name and versionnumber. What I want is filter some programs, so you don't see them in the txt-file. For example Microsoft Word 2013 and Microsoft Excel 2013. Can someone help me with this? See the script as attachment. softwarelist with filter.txt
  4. Convert XML to Excel

    Hello everyoneI need to transform an XML file to Excel. The style sheet (XSL) should be applied on import. There appears to be an acknowledged bug:http://support.microsoft.com/kb/307230/en-USThe workaroudn involves converting XML to HTML first, then to Excel-format. The script is in VBA:Sub Macro3()'Load the XML and the XSL (the stylesheet).Dim oXML As Object, oXSL As ObjectSet oXML = CreateObject("MSXML.DOMDocument")Set oXSL = CreateObject("MSXML.DOMDocument")oXML.Load "c:customers.xml"oXSL.Load "c:customers.xsl"'Transform the XML using the stylesheet.Dim sHTML As StringsHTML = oXML.transformNode(oXSL)'Save the results to an HTML file.Open "c:customers.htm" For Output As #1 '!fails herePrint #1, sHTMLClose #1'Automate Excel to open the HTML file.Dim oApp As Excel.ApplicationSet oApp = CreateObject("excel.application")oApp.Visible = TrueoApp.Workbooks.Open "c:customers.htm"End SubConverted to VBScript the code fails at the line indicated above, presumably because VBScript does not know the method. I'm not proficient in VBScript so any help is appreciated
  5. Can anyone please explain why the Int function returns random incorrect values in the following code? Running Win Server2003 and IIS 6. The full code and result can be viewed here www.patronomy.com/test/test-int.asp I couldn't believe it at first because Stripe (a payment processor) requires whole numbers eg, 803 for $8.03 and as you can see the iteration has many errors. <table><%TR "Value", "Int(Value*100)"For i = 1 to 10 For j = 1 to 10 k = i+(j/100) TR k, int(k*100) NextNext %></table><%Function TR(str1, str2) Response.Write("<tr><td>"&str1&"</td><td>"&str2&"</td></tr>")End Function%>
  6. I have successfully modified the file properties of MS Office files with the use of DSOFile. But how can files other than those be modified?
  7. Okay, I've searched and searched and am hoping someone here can help me out. I've been trying to get a VBScript program to open a word document, search for a specific char and replace it with a Addin field (i.e. { SEQ @ } ) Here's what I have thus far: Const wdReplaceAll = 2 Set objWord = CreateObject("Word.Application")objWord.Visible = TrueSet ObjDoc = objWord.Documents.Open("C:\path\to\.doc")Set objSelection = objWord.Selection With objSelectionobjSelection.Find.Text = "@"objSelection.Find.Forward = TrueobjSelection.MatchWholeWord = TrueobjSelection.Find.Replace.Text = "replacement text"objSelection.Find.Execute ,,,,,,,,,,wdReplaceAll .Fields.Add .Range, -1, "SEQ @", True End With objDoc.SaveobjWord.Quit This code works for "Find/Replace" but does not work for fields.Much help would be awesome! Thanks! Edit, 27 Fed 13 (10:21 CST): In red/strikthrough is removed, plain red is added.
  8. Hi1)my requirement to display the checkbox checked data in table2)first i need to display whole data with checkboxes...then user will check the check boxes and clicks the button...then i neeed to display only the checkbox checked data....here is my code... <%DIM sXML4, oXML4, oNode4, sXMLColor, sDataPoint4sXML4= goBO.QueryXML("SELECT ISS_REL_ID, ISNULL(CONVERT(VARCHAR(11),ISS_RANK , 106),'NA') AS DATEREPORTED,ISS_TITLE AS ISSUESREPORT,ISS_IMPACT AS REPORTEDBY, "&_" ISNULL(CONVERT(VARCHAR(11),ISS_TRG_RS_DATE , 106),'NA') AS DATECLOSED, "&_" C_CATEGORY AS CATEGORY, "&_" CASE WHEN ISS_STATUS ='C' THEN 'Closed' WHEN ISS_STATUS ='O' THEN 'Work In Progress' WHEN ISS_STATUS ='K' THEN 'KIV'END AS "&_" STATUS, ISS_PROGRESS_RPT, "&_" CASE WHEN ISS_STATUS ='C' THEN 'GREEN' WHEN ISS_STATUS ='O' THEN 'ORANGE' WHEN ISS_STATUS ='K' THEN 'ORANGE'END AS COL "&_" FROM v_iss_list WHERE ISS_PROGRESS_RPT='Y' and ISS_REL_ID = 'prj0000152' order by status ","TYPES","TYPE")On Error Resume Nextif goBO.HasError then HandleErrorSet oXML4 = Server.CreateObject("MSXML.DOMDocument")oXML4.async = falseoXML4.loadXML sXML4For each oNode4 in oXML4.documentElement.childNodessDataPoint4 = sDataPoint4 + "<tr>"'sDataPoint4 = sDataPoint4 + "<td align=""center"" style=""font-family:verdana;font-size:11""> <label><input type=""checkbox"" value=""Yes"" name=""myTextEditBox""""></label> </td>" + vbNewlinesDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11""> <label>"& oNode4.getAttribute("DATEREPORTED") &"</label> </td>" + vbNewlinesDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11""> <label>"& oNode4.getAttribute("ISSUESREPORT") &"</label> </td>" + vbNewlinesDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11""> <label>"& oNode4.getAttribute("REPORTEDBY") &"</label> </td>" + vbNewlinesDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11""> <label>"& oNode4.getAttribute("DATECLOSED") &"</label> </td>" + vbNewlinesDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11""> <label>"& oNode4.getAttribute("CATEGORY") &"</label> </td>" + vbNewlineif oNode4.getAttribute("STATUS") = "Closed" thendim valval = oNode4.getAttribute("ISSUESREPORT") sDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11;background-color:"& oNode4.getAttribute("COL") &"""> <label>"& oNode4.getAttribute("STATUS") &" <input type=""checkbox"" name=""myTextEditBox"" value=""yes""""></label> </td>" + vbNewlineelse sDataPoint4 = sDataPoint4 + "<td align=""left"" style=""font-family:verdana;font-size:11;background-color:"& oNode4.getAttribute("COL") &"""> <label>"& oNode4.getAttribute("STATUS") &"</label> </td>" + vbNewlineend if sDataPoint4 = sDataPoint4 + "</tr>" + vbNewlineNextSet oXML4 = nothingset oBO = nothing%>SUB GetResults(myTextEditBox)ON ERROR RESUME NEXTIF myTextEditBox.Checked = TRUE THENMSGBOX myTextEditBox.ValueEND IFIF ERR.Number <> 0 THENFOR i = 0 TO myTextEditBox.Length - 1IF myTextEditBox(i).Checked = TRUE THENMSGBOX myTextEditBox(i).ValueEND IFNEXTEND IFON ERROR GOTO 0END SUB<table WIDTH="80%" BORDER="1"><thead><tr><!--<td align="center" rowspan=2 width="5%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold"><input type="checkbox" name="myTextEditBox" value="checked"""></td>--><td align="center" rowspan=2 width="10%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Date Reported</td><td align="center" rowspan=2 width="30%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Issues Report</td><td align="center" rowspan=2 width="10%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Reported BY</td><td align="center" rowspan=2 width="10%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Date Closed</td><td align="center" rowspan=2 width="10%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Category</td><td align="center" rowspan=2 width="10%" bgcolor="gray" style="color:white;font-family:verdana;font-size:11;font-weight:bold">Status</td></tr></thead><tbody class="clsTableBody"><%=sDataPoint4%></tbody></table> <input type="submit" class="clsNavigation" name="Get Checked" value="Checked Data" onClick="GetResults(myTextEditBox)">please can some body help me...Thank you
  9. VBScript

    Hey guys. Hope everyone here had a great 4th of July holiday! I am building an internal site that of course is only accessible via intranet. Its primary coding is very simple. Its HTML based with some Javascript and some VBScript. I will be honest. I am not an expert programmer by any means. So here is the issue. We have no access to the server logs as we do not admin the logs nor are we allowed to request them. We are basically borrowing the space. My management wants to have each page, when accessed or clicked on (either one) to log the hit to a csv file and a txt file saved on the server. I know a lot of people dont think VBScript is the way to go. This is what is needed in each column in the log: Date\Time stamp \ Hostname \ NT Login \ Page that was loaded We are in a Windows XP\7 Environment. We know this server supports IIS. We are also currently using SSI for our DHMTL menu. I was hoping someone could help me use the DHTML menu as an "onclick" so that any option clicked on the menu by the client would log the above information to a specific file. We are very limited on the access we have on the server. I am not very skilled in VBS at all and this is simply a last minute side project they want to test out. So if someone could help me with this that would be excellent. Thank you in advance.
  10. Hi, Please let me know how I can Login to a website and click a link in the second page that appears after I Login.
  11. Using Input Boxes To Enter Data

    I am trying to add some functionality to the script .What i am trying to do is to add input boxes in the script below.I have just gotten into vbscript and have tried few ways to do this but dont understand well enough.if someone could show me some code that i could add to my form i would appreciate itThanks Set objExcel = CreateObject("Excel.Application")objExcel.Visible = TrueSet objWorkbook = objExcel.Workbooks.Add()Set objWorksheet = objWorkbook.Worksheets(1)objWorksheet.Cells(1,1) = 1objWorksheet.Cells(2,1) = 2objWorksheet.Cells(3,1) = 3objWorksheet.Cells(4,1) = 4objWorksheet.Cells(5,1) = 5Set objRange = objExcel.Range("A1")objRange.End(xlDown).ActivateintNewRow = objExcel.ActiveCell.Row + 1strNewCell = "A" & intNewRowobjExcel.Range(strNewCell).Activate
  12. Please help me convert the below vbscript to javascript : set xmlDoc=CreateObject("Microsoft.XMLDOM")xmlDoc.async="false"xmlDoc.load("nba.xml")for each x in xmlDoc.documentElement.childNodes;document.write("<b>" + x.nodename + "</b>");document.write(": ");document.write(x.text);document.write("<br>");next Thanks in advance
  13. Convert From Vbscript To Javascript

    Please help me convert the below small code from vbscript to javascript, set xmlDoc=CreateObject("Microsoft.XMLDOM")xmlDoc.async="false"xmlDoc.load("nba.xml")for each x in xmlDoc.documentElement.childNodes;document.write("<b>" + x.nodename + "</b>");document.write(": ");document.write(x.text);document.write("<br>");next Thanks in advance.
×