The following is the usual log function I utilize in alot of my vbscripts which I modify accordingly. I feel it writes too slow. I got 3 questions:
Any ideaas on how to optimize this so it writes faster?
Would it be faster to store all text in a string first then run the function OutputToLog or would it be faster to execute Output...
Say I have "default" content on the left side of my application, which is included in a header page: a search box and a login box. If the user is on the search page, I want to also add a list of search filters (e.g. brand, price) to the left side of the page; in this case the left side needs to access the parameters given to the search ...
I'm trying to determine whether a user (the one running the script, with or without run as) has certain user rights policies applied. Since secedit /analyze refers only to the actual setting and ignores privilege propagation by group membership, it is useless in this case.
I'm referring to these privileges:
SeTcbPrivilege
SeIncreaseQuot...
I have a web service load driver that's a Windows Script File (WSF), that includes some VBScript and JavaScript files. My web service requires that the incoming message is base64 encoded. I currently have a VBScript function that does this, but it's very inefficient (memory intensive, mostly due to VBScripts awful string concatenation)
...
As a newbie to FoxPro (but an old-hand at Clipper), I'm a bit at a loss to figure out how to return an array from the following OLEPUBLIC class. edit: I've modified the code belw to take into consideration the remarks made by @Stuart below.
DEFINE CLASS db AS CUSTOM OLEPUBLIC
DIMENSION ada(1) && public scope for later return
FUNCTI...
Hi all
We have a legacy ASP page that writes content to an excel file by generating client-side VB script based on data from the database. It uses set app = CreateObject("Excel.Application") to initialize Excel.
The problem is that this is an "unsigned activex control", and some clients are now saying they wont change their IE settings...
Our ASP.NET/C# lets users edit and manage Word (OpenXML) documents that are hosted on a server. I am using client-side VBScript functions to handle some of the editing functions including saving the document to a folder on the server. For the save functionality, I am using the following function call :
Document.SaveAs "http://server/sav...
when you run a script (such as vbscript) from 25*80 (full screen mode of dos prompt) and that your script call a windows application (such as notepad), at the end of the operation, focus remains on the desktop (although "command prompt" at the taskbar minimized and wait for only one "{enter}" to go back in 25*80 full screen command promp...
Bah, vbscript.
I'm trying to figure out how to get this statement to work:
if (not rsObject("columnNameThatDoesntExist") is nothing) then
' do some stuff
end if
' else do nothin
Where rsObject is a RecordSet and columnNameThatDoesntExist is ... well you know. I'm looking for something like rsObject.Columns.Contains(string). But of...
I have written some VBScripts to automate tasks that I perform on computers over the network. These work great for most tasks however within our network we have problems with the IP address in DNS being correct all the time. This mainly occurs with laptops where we have different IP ranges for machines on the wireless and wired network...
I'm making a fair amount of calls to database tables via ADO.
In the spirit of keeping things DRY, I wrote the following functions to return an array of values from a recordset.
Is this hare brained?
I use it mainly for grabbing a set of combo-box values and the like, never for enormous values. Example Usage (error handling removed for...
I am programmatically generating an Office Open XML document (Word 2007 format), and would like to have all the fields updated when the document I generate is first opened in Word.
When I researched this a while ago, the only way to do this was to run VB Script when the document opens. But VB Script doesn't run by default, and for this ...
I'm currently using an htaccess file to redirect users from
detail.asp?CategoryID=XX&SubCategoryID=XX&ProductID=XX
to
catid-XX-subcatid-xx-productid-xx
but I now need to check they've arrived at the correct page. I'm doing this by checking that the query string values are correct. However I'd rather check that the user arrived at
"...
I need to compare a float value entered in a web form against a range. The problem is that the client computers may have various locale settings, meaning that user may use either "." or "," to separate the integer part from decimal one.
Is there a simple way to do it? As it is for an intranet and that they are only allowed to use IE, a ...
Hello
I'm trying to read remote text files using this code:
function defdate(ipaddress)
deffilePath = chr(34) & "\\" & ipaddress & "\c$\" & deffileName & chr(34)
wscript.echo deffilePath
set deffile = objFSO.OpenTextFile(deffilePath)
do while not deffile.endofstream
s=deffile.readline
wscript.echo s
loop
deffile.c...
Is it possible to open Microsoft Script Editor, then from within the editor open a .vbs (VBScript) file, then run/debug it?
I know I can use the command-line cscript (filename) //X to launch the file, allowing me to select Microsoft Script Editor as the debugger, but I want to do everything from within Microsoft Script Editor.
I am awa...
I want to use an array that I declare once at the top of my code several times. Ex.
Const Quarters = ["Q1", "Q2", "Q3", "Q4"]
For each Quarter q
q.Do some work
Etc.
Can this be done in VBScript?
...
We have a simple file browser on our intranet, built using ASP/vbscript. The files are read by the script and added to an ADO Recordset (not connected to a database), so we can sort the contents easily:
Set oFolderContents = oFolder.Files
Set rsf = Server.CreateObject("ADODB.Recordset")
rsf.Fields.Append "name", adVarChar, 255
r...
Has anyone had luck finding a Visual Studio Project Template for JavaScript and/or VBScript? I would like to use VS as my script IDE but get frustrating with the lack of integration.
I'm hoping someone else was just as frustrated as me and already came up with a solution.
...