I currently use notepad++ for writing/editing VBScipts, but I am looking for something new (and also free). Anybody have a favorite?
I don't have a problem with notepad++; in fact I really like it and I use it a lot, I just want to see what other options are available. I would like to find something that has more of an IDE feel to it,...
In my code segment, when I script the file name, it gives me a permission denied
on the following line:
Set objTextFile = objFSO.OpenTextFile(strDirectory & strFile, ForAppending, True)
Here is the script
'output log info
Function OutputToLog (strToAdd)
Dim strDirectory,strFile,strText, objFile,objFolder,objTextFile,objFSO
...
Is it better to use NOT or to use <> when comparing values in VBScript?
is this:
If NOT value1 = value2 Then
or this:
If value1 <> value2 Then
better?
EDIT:
Here is my counterargument.
When looking to logically negate a Boolean value you would use the NOT operator, so this is correct:
If NOT boolValue1 Then
and when a comp...
I want to take the screenshot of an application and paste it in MSWord but the command {PRTSC} is not working.
Can anybody help me out please. Here is the script which i have written.
Dim StrInputKey
Set WshShell=CreateObject("WScript.Shell")
SystemUtil.Run "www.google.co.in"
WshShell.SendKeys "{PRTSC}"
SystemUtil.Run "winword"
Wsh...
Duplicate:
taking screenshots of an application using WSH Script
How can I use multiple keys in WSH Script like (ALT,CTRL,DELETE)?
How can i take a screenshot of an application and paste it in MSWord using WSH SCript?
...
In a scripting step in a scheduled task in SQL Server Agent 2005, I need to trigger a webscript that is running on a different server. I'm doing this:
Dim ie
Set ie = CreateObject( "InternetExplorer.Application" )
ie.navigate "...to my dreamscript"
' Wait till IE is ready
Do While ie.Busy
(1)
Loop
ie.Quit
set ie = Nothing
At (...
Hello,
I'm having difficulty using the Update function on a RecordSet object while using the DBISAM 4 ODBC driver. Here is what my code looks like.
dtmNewDate = DateSerial(1997, 2, 3)
MsgBox(dtmNewDate)
'Create connection object & connection string
Set AConnection = CreateObject("ADODB.Connection")
strConnection = "Driver={DBISAM 4 ...
My current knowledge:
If you are trying to write text files in vbscript / asp land you have two options.
the Scripting.FileSystemObject
the ADODB.Stream object
Scripting.FileSystemObject does not support utf8. It will write in Ascii, or Unicode (and waste two bytes for most of your characters)
ADODB.Stream does not support appendi...
I'm doing some revision on an old app that is written in classic ASP/VbScript.
It has a feature to send out an e-mail to the members of the application, but because the member list is quite large, the server rejects new e-mails after the first hundred or so are sent.
I've written some code to make it send out e-mails in burst of 20, bu...
I am trying to loop on a recordset returned from db2 using a .wsf file and vbscript .
the vbscript libfile(lib.vbs) is as follows
'***************
Const ADOCon="Provider=IBMDADB2.1;Password=*****;User ID=*****;Data Source=yourdatasourc;"
'************************
'ADO environment is Initialised here
'*************************
F...
I would like to write a VBScript to change the default printer, based on which printer is connected.
I have a laptop that I use at work and at home, and I would like to run this script when starting windows so the default printer is always the correct one.
If there is another way to do this in XP, I'm all ears.
...
I created a generic folder by taking the name from DataTable:
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
strdata = Datatable.Value("Column name", "Sheet")
fso.CreateFolder "C:\Documents and Settings\schoudar\Desktop\" & strdata
Till this I am successful but now I want to save a file in this folder and the folder name...
in a script when error comes i am just using "EXITGLOBALITERATION" command but its not going to the next iteration ....Is there any other alternative for this??
...
Using preferably JScript, but VBscript will also do, how does one walk a DLL obtaining the properties and their attributes contained therein?
Why? Because it would be good to ascertain the attributes of certain objects such as their datatypes at runtime rather than having to hard-code them before hand. An example of their use would be to...
I am testing an application which communicates to a server via a UDP port, and I need to block this port to make sure the application can handle it.
The Problems:
1. It has to be done in an automated test (which is controlled by VBScripts).
2. It has to be done in Windows XP, without using a firewall.
I have tried this:
Set objFirewal...
I'm creating a GUID for use in a Classic ASP application, by using TypeLib. However, even a simple test such as writing the GUID out to the screen is giving me problems - it prints the GUID but ignores everything after it (e.g. HTML tags, additional words, anything).
Here's the rudimentary code to test this:
Set typeLib = Server.Creat...
I have a configuration XML file which contains an encrypted password. From time to time we need to reset this password, and the methodology for doing so involves stripping out the string which is effectively the password from the XML file and saving the file.
The process also involves stopping and restarting a couple of services which ...
In my script:
Function getDescript (strname, uname)
Set MyUser = GetObject ("LDAP://cn=" & uname & ",ou=" & strname & ",DC=tms-1,DC=net")
getDescript = myUser.Get("msExchOmaAdminWirelessEnable")
End Function
uname = "Bob Gardner"
strname = "bgConsultants"
WScript.Echo "wireless enable: " & getDescript(strname, uname)
I have n...
The VB trick to get the path of the current temporary directory:
Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
fails in VBScript. So?
...
Can someone just help me refresh my mind?
How do you specify hex values in a Visual Basic 6 / VBScript Source?
It's not 0xABCD as it is in C++, that's what I can remember... It was something similar... But what?
...