vbscript

Find and Replace string in a .txt file with VBscript

霸气de小男生 提交于 2021-02-16 14:21:13
问题 I am trying to figure out how to use vbscript to: 1 - open a .csv file as a .txt file 2 - search for a certain string of text that is located randomly throughout the text 3 - replace that string with a different string. I have found an article that helped me learn how to replace an entire line in a .txt document, but so far have had no luck finding anything about replacing just certain characters within the line. Thanks! Here is the code I am using currently: Const ForReading = 1 Const

Getting “Remote server machine does not exist or not available” in Outlook VBScript

房东的猫 提交于 2021-02-11 16:48:10
问题 I have written on Outlook VBScript which downloads the attachment from Outlook. But now I am encountering an error Remote Server machine does not exist or is unavailable I get this error a few time and also sometimes this code runs without any error. I was able to track the exact point of failure. The line is Set olns = olApp.GetNameSpace("MAPI") I have almost tried everything yet I am not able to to find the solution. Set Arg = WScript.Arguments Dim item1 Dim objsubject Dim intcount Dim i

Getting “Remote server machine does not exist or not available” in Outlook VBScript

南楼画角 提交于 2021-02-11 16:48:02
问题 I have written on Outlook VBScript which downloads the attachment from Outlook. But now I am encountering an error Remote Server machine does not exist or is unavailable I get this error a few time and also sometimes this code runs without any error. I was able to track the exact point of failure. The line is Set olns = olApp.GetNameSpace("MAPI") I have almost tried everything yet I am not able to to find the solution. Set Arg = WScript.Arguments Dim item1 Dim objsubject Dim intcount Dim i

calling vbScript function from button input type

大憨熊 提交于 2021-02-11 13:58:39
问题 I have the following function declared in the tag of a classic asp page that i did not write but need to edit; <SCRIPT language="VBScript"> sub confirmuser(sSubtype, sAction) ' this prompts user to confirm their action and sets hidden form fields. ' current subtypes are 1) Free Trial 2) Equity 3) Mutual Funds. ' current actions are 1) subscribe 2) unsubscribe sConfirmMessage = "Clicking on the OK button below will " & sAction & " login <%=rtrim(session("WebID"))%> " & _ "to the " & sSubtype

calling vbScript function from button input type

天涯浪子 提交于 2021-02-11 13:58:21
问题 I have the following function declared in the tag of a classic asp page that i did not write but need to edit; <SCRIPT language="VBScript"> sub confirmuser(sSubtype, sAction) ' this prompts user to confirm their action and sets hidden form fields. ' current subtypes are 1) Free Trial 2) Equity 3) Mutual Funds. ' current actions are 1) subscribe 2) unsubscribe sConfirmMessage = "Clicking on the OK button below will " & sAction & " login <%=rtrim(session("WebID"))%> " & _ "to the " & sSubtype

Executing Vbscript from IE Address Bar

五迷三道 提交于 2021-02-11 12:53:28
问题 Is there a way I can execute my vbscript code directly from my address bar? I am looking for something similar to what we have for JavaScript. On a side note, isn't running vbscript from browser a major security risk, as it has more privileges while running than JavaScript? 回答1: Pretty much the same way as Javascript it just doesn't work very well: vbscript:replace(document.body.innerhtml,"Address Bar","sandwich") Essentially this navigates to a page that has source equivalent to the returned

Automate file sharing

不问归期 提交于 2021-02-11 12:35:58
问题 I've found some vbscript examples on how to enable file sharing and share a folder, however they leave the "Public folder sharing" off so that you have to be logged in rather than just allowing anyone with network access to read/write to public folders. For all my googling, I can't seem to find out how to automate that last piece. Vbscript or anything that can be run via command line would be my preferred method of doing this, but really I'm open to hearing about any solution that would

Can't concatenate to strings with CHAR(0) at the end

﹥>﹥吖頭↗ 提交于 2021-02-11 12:19:03
问题 The following snippets should demonstrate an issue I've observed in both SQL Server and in my VBScript web application: SELECT '"Hello World"' SELECT '"Hello World' + CHAR(0) + '"' Results: "Hello World" "Hello World Notice that the second result line is missing the final double quote. I understand that you can't concatenate strings to a NULL value in SQL Server. However, the following snippet reveals that CHAR(0) is not considered NULL as far as SQL Server is concerned. SELECT ISNULL(CHAR(0)

How to run VBScript in .net core or .net standard project?

只谈情不闲聊 提交于 2021-02-11 06:12:47
问题 i know it`s dead-end and stupid idea, but still... Do you know any nuget or workaround ways to run VBScript within .Net Core or .Net Standard projects? I`ve tried to use ClearScript.V8 nuget (https://www.nuget.org/packages/ClearScript.V8/) from Microsoft. It does not support .net standard 2.0 at all. I would appreciate for any ideas. Thanks. 来源: https://stackoverflow.com/questions/51020687/how-to-run-vbscript-in-net-core-or-net-standard-project

How to run VBScript in .net core or .net standard project?

这一生的挚爱 提交于 2021-02-11 06:12:33
问题 i know it`s dead-end and stupid idea, but still... Do you know any nuget or workaround ways to run VBScript within .Net Core or .Net Standard projects? I`ve tried to use ClearScript.V8 nuget (https://www.nuget.org/packages/ClearScript.V8/) from Microsoft. It does not support .net standard 2.0 at all. I would appreciate for any ideas. Thanks. 来源: https://stackoverflow.com/questions/51020687/how-to-run-vbscript-in-net-core-or-net-standard-project