FileSystemObject
Hi,
Creating ASP page in Visual Interdev 6.0 with VBScript.
Trying to get all folders under each drive.
Code...
Dim fso, folder, s, subFolders
Set FSO = CreateObject("Scripting.FileSystemObject")
' Get Drive object.
Set folder = fso.GetFolder("c:")
Set subFolders = folder.SubFolders
' Print parent folder name.
Response.write "Parent folder name is: " & folder & "<BR><BR>"
For Each folder in subFolders
Response.Write "FolderName: " & folder.Name & "<br>"
Response.Write "Attributes: " & folder.Attributes & "<br>"
Response.Write "Type: " & folder.Type & "<br>"
Response.Write "Size: " & folder.Size & "<br>"
Response.Write "ShortName: " & folder.ShortName & "<br>"
Next
______________
fso.GetFoler("A:") - Parent folder name is:
- Works fine.
fso.GetFolder("C:") - Local drive. Parent folder name is:
"C:\winnt\System32" - Displays folder appmgmt to dhcp.
Microsoft VBScript runtime error '800a0046' Permission denied error after
that.
fso.GetFolder("D:') - Local
- Page cannot be displayed or Microsoft VBScript runtime error
'800a004c' Path not found. fso.GetFolder("H:") - CD-Rom
- Works fine.
fso.GetFolder("E:") - Mapped
- Page cannot be displayed or Microsoft VBScript runtime error
'800a004c' Path not found.
Not sure why C:\ drive parent is "winnt\System32" directory instead of
"C:\".
Not sure why D (local) and E (mapped) drive cannot be found.
Help in this matter is greatly appreciated.
- Reena Tag: Search documentation scripting Tag: 144205
Script to launch another script
I am trying to get a master script to launch small scripts as jobs and pass
parameters on to the second script.
I construct the commandline from an XML file and the exact syntax is as
follows:
<!--
cscript C:\vb\ECH\MCP\copier.vbs C:\vb\ECH\ECHO V2\upload\1\batch.txt
C:\vb\ECH\MCP\batch.txt
-->
1.)copier.vbs is the second script to be called
2.)the first param is basically the source filepath
3.)the second param is the target filepath
here is the sysntax I am using to call the other script.
CommandLine = script & " " & filepath & " " & parampath & filename
Set WshShell = CreateObject("WScript.Shell")
WshShell.Exec(CommandLine)
Brian Tag: Search documentation scripting Tag: 144200
Simple assignment of function return value fails - vbs Rusty
This is probably a really simple error, but I haven't been able to
resolve it. Your help would be much appreciated.
I return an array of objects from a function. I'm trying to assign
the result to an array without success. The code from a) the script
and b) an xml file follows. Don't get bogged down in the xml. I
think this is a really basic problem as I am rusty with vbs.
The error message is: Type Mismatch 800A000D. The error occurs on the
very last line of the script.
TIA...
'//**************************************************************
'//**************************************************************
' VB Script Document
Class Department
private deptName
private drives()
private printers()
Public Function setDeptName(strName)
deptName = strName
End Function
Public Function getDeptName()
getDeptName = deptName
End Function
Public Function setNumDrives(intNumDrives)
Redim Preserve drives(intNumDrives,1)
End Function
Public Function setDrive(row,col,val)
drives(row,col) = val
End Function
Public Function get2dDriveAry()
get2dDriveAry = drives
End Function
Public Function setNumPrinters(intNumPrinters)
Redim Preserve printers(intNumPrinters)
End Function
Public Function setPrinter(row,val)
printers(row) = val
End Function
Public Function getPrinterAry()
getPrinterAry = printers
End Function
end class
function getDrivesNPrintersByDept (xmlRscFile)
'array used to store a collection of Departmental Resource objects
dim aryRscObjects()
'*** Local object used to store Resource info ***
dim oDeptResource
set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load(xmlRscFile)
Set ElemList = xmlDoc.getElementsByTagName("department")
'*** Iterate through by department ***
For i=0 To (ElemList.length -1)
'*** Get an new object
set oDeptResource = New Department
'*** print xml for the departments
'msgbox ElemList.item(i).xml
'***GET THE NAME
set dept_name= ElemList.item(i).childnodes(0)
oDeptResource.setDeptName dept_name.text
'***GET THE DRIVES
set drives = ElemList.item(i).childnodes(1).childnodes
'*** dim the array to the correct size
oDeptResource.setNumDrives(drives.length-1)
'*** iterate through the drives ***
For k=0 To (drives.length -1)
oDeptResource.setDrive k,0,drives.item(k).childnodes(0).text
oDeptResource.setDrive k,1,drives.item(k).childnodes(1).text
Next
'***GET THE PRINTERS ***
set printers = ElemList.item(i).childnodes(2).childnodes
'*** dim the array to the correct size
oDeptResource.setNumPrinters(printers.length -1)
For l = 0 To (printers.length -1)
oDeptResource.setPrinter l,printers.item(l).childnodes(0).text
Next
'*** expand the array to hold one more w/o losing current contents
redim preserve aryRscObjects(i+1)
'*** add the current object to the array
set aryRscObjects(i) = oDeptResource
Next
'*** return the array
getDrivesNPrintersByDept = aryRscObjects
end Function
'*** MAIN ***
dim aryRscs()
strXmlFile = "myXML.xml"
aryRscs = getDrivesNPrintersByDept strXmlFile
'//**************************************************************
'//**************************************************************
<?xml version="1.0" ?>
<!-- the first printer in the list of printers will be the default
-->
<departmental_resource_assignments>
<department>
<name>Development</name>
<drives>
<drive>
<letter>f:</letter>
<path>\\theat\groups</path>
</drive>
<drive>
<letter>g:</letter>
<path>\\prod\development</path>
</drive>
<drive>
<letter>r:</letter>
<path>\\raiser\dev</path>
</drive>
<drive>
<letter>s:</letter>
<path>\\theat\shared</path>
</drive>
</drives>
<printers>
<printer>
<path>\\theat\dev_hp8100</path>
</printer>
<printer>
<path>\\theat\dev_hp5M</path>
</printer>
</printers>
</department>
<department>
<name>Artistic</name>
<drives>
<drive>
<letter>f:</letter>
<path>\\theat\xxxx</path>
</drive>
</drives>
<printers>
<printer>
<path>\\theat\dev_hpxxx</path>
</printer>
<printer>
<path>\\theat\dev_hpxxx</path>
</printer>
</printers>
</department>
</departmental_resource_assignments> Tag: Search documentation scripting Tag: 144197
Mac characters
trying to display information in asp that contain mac
characters from SQL DB, the character appears as a
question mark in asp, ie the word icon?, an accent should
appear above the 'n' instead of a question mark beside
the 'n'.
please help
Cheers Tag: Search documentation scripting Tag: 144194
Problems with updated pages
Hi!
when i make a new version of my pages and i try to test it=20
i can't see the changes, i thougt it may be caused by the=20
browser cache, but i cleaned it and tested in another=20
computer but i continue without seen the changes.
It seems that the server (iis) don=B4t processed the asp=20
page and send another processed before, stored in a server=20
buffer.=20
There any way to avoid this???
Can anybody help me?
Thanks Tag: Search documentation scripting Tag: 144192
AppActivate
I am using the AppActivate statement to call a window by title, but I only
want it to run if the window is actually available. Is there a way to list
all active window titles in a collection where I can verify the window is
active? If not, is there a better way to activate a window by title only if
it is available?
TIA
Charles Tag: Search documentation scripting Tag: 144190
how to call a sub or function from case..end
Hi
i need help
i am using a vbscript for exprting users info from the AD
But i do not want to export all users
users who have the user "phonehome: prperty empty -will not be exported
As shown below
each time i am using the "then call " syntax
i recieve syntax error message
is there a way of "calling" a sub or function from within case..end proceadure
....
For Each oUser In oCont
Select Case LCase(oUser.Class)
Case "user"
If IsEmpty(oUser.homephone) Then call...
End If
else
If Not IsEmpty(oUser.st) Then
OutPutFile.WriteLine "state: " & oUser.st
End If
.
.
.
End Select
OutPutFile.WriteLine
Next
End Sub
Thnks Tag: Search documentation scripting Tag: 144189
movehere
What am I doing wrong?
I wish to move this user from one ou to another. The error I get is "null,
there is no such object on the server."
Yet when I change the path in the movehere statement and change the name at
the end and also to look in users current ou, it renames the account just
fine. So it does see the account, but I must be missing something to get it
to move.
Set Container = GetObject ("LDAP://yms12/OU=TestOU,DC=test,DC=org" )
Set NewObjectName = Container.MoveHere
("LDAP://cn=smoxey01,ou=TestOU,ou=sus,DC=test,DC=org","cn=smoxey01") Tag: Search documentation scripting Tag: 144188
Help with Script.
Guys,
I need a little help here...
This is case, I have a batch of files that I need to edit in photoshop.
I'm trying to use the below code to accomplish this, but it seems that I'm
doing something wrong or missing something.
I need an array to bound all files of type *.jpg; then open Photoshop use
automation to do minor conversion for web viewing and go to the next.
I attempted to do this but I don't know what going on.
Any help will be greatly appreciated
Neil Pilier
npilier@miami.edu
Snipped code
--------------------------------------------------------------------
Option Explicit
Dim fso, f, f1, i, s, myArray(), ws, oAutoIt, iii
redim myArray(0)
set fso = CreateObject("Scripting.FileSystemObject")
set f = fso.GetFolder ("C:\test")
set ws = WScript.CreateObject("WScript.Shell")
set oAutoIt = CreateObject("AutoItX.Control")
For Each f1 In f.Files
redim preserve myArray(Ubound(myArray) + 1)
myArray(Ubound(myArray)) = f1.Name
Next
On Error Resume Next
for iii = 0 to ubound(myArray)
If lcase(fso.GetExtensionName(myArray(i))) = "jpg" then
ws.Run ("Photoshop.exe " & myArray(iii))
WScript.Sleep 6000
ws.AppActivate "Adobe Photoshop"
ws.SendKeys " "
ws.SendKeys "%(+^s)"
WScript.Sleep 500
oAutoIt.LeftClick 864, 296
WScript.Sleep 500
oAutoIt.LeftClick 843, 395
oAutoIt.LeftClick 843, 395
WScript.Sleep 500
ws.SendKeys "392"
WScript.Sleep 500
oAutoIt.LeftClick 864, 509
WScript.Sleep 500
oAutoIt.LeftClick 863, 56
WScript.Sleep 500
ws.SendKeys "{TAB 2}"
WScript.Sleep 500
ws.SendKeys "{ENTER}"
WScript.Sleep 500
ws.SendKeys "^(w)"
WScript.Sleep 500
ws.SendKeys "{TAB}"
WScript.Sleep 500
ws.SendKeys " "
WScript.Sleep 500
end if
Next
set fso = nothing
set f = nothing
set ws = nothing
set oAutoIt = nothing Tag: Search documentation scripting Tag: 144186
Help with Script.
Guys,
I need a little help here...
This is case, I have a batch of files that I need to edit in photoshop.
I'm trying to use the below code to accomplish this, but it seems that I'm
doing something wrong or missing something.
I need an array to bound all files of type *.jpg; then open Photoshop use
automation to do minor conversion for web viewing and go to the next.
I attempted to do this but I don't know what going on.
Any help will be greatly appreciated
Neil Pilier
npilier@miami.edu
Snipped code
--------------------------------------------------------------------
Option Explicit
Dim fso, f, f1, i, s, myArray(), ws, oAutoIt, iii
redim myArray(0)
set fso = CreateObject("Scripting.FileSystemObject")
set f = fso.GetFolder ("C:\test")
set ws = WScript.CreateObject("WScript.Shell")
set oAutoIt = CreateObject("AutoItX.Control")
For Each f1 In f.Files
redim preserve myArray(Ubound(myArray) + 1)
myArray(Ubound(myArray)) = f1.Name
Next
On Error Resume Next
for iii = 0 to ubound(myArray)
If lcase(fso.GetExtensionName(myArray(i))) = "jpg" then
ws.Run ("Photoshop.exe " & myArray(iii))
WScript.Sleep 6000
ws.AppActivate "Adobe Photoshop"
ws.SendKeys " "
ws.SendKeys "%(+^s)"
WScript.Sleep 500
oAutoIt.LeftClick 864, 296
WScript.Sleep 500
oAutoIt.LeftClick 843, 395
oAutoIt.LeftClick 843, 395
WScript.Sleep 500
ws.SendKeys "392"
WScript.Sleep 500
oAutoIt.LeftClick 864, 509
WScript.Sleep 500
oAutoIt.LeftClick 863, 56
WScript.Sleep 500
ws.SendKeys "{TAB 2}"
WScript.Sleep 500
ws.SendKeys "{ENTER}"
WScript.Sleep 500
ws.SendKeys "^(w)"
WScript.Sleep 500
ws.SendKeys "{TAB}"
WScript.Sleep 500
ws.SendKeys " "
WScript.Sleep 500
end if
Next
set fso = nothing
set f = nothing
set ws = nothing
set oAutoIt = nothing Tag: Search documentation scripting Tag: 144185
Payflow response
Hi everyone. Using active server page I am sending a transaction to VERISIGN
and getting a response back from verisign. The response is written to the
page through the following value.
response.write name
response.write " = "
Response.Write value
I am trying to get the response split namely the PNREF,
RESPONSE,APPROVAL,ETC and insert some information into the database and
also redirect the user to a page based on the response I get back.
Can someone please help me with a script, iam entirely new to this.
Thanks
Ola Tag: Search documentation scripting Tag: 144184
Help with Script.
Guys,
I need a little help here...
This is case, I have a batch of files that I need to edit in photoshop.
I'm trying to use the below code to accomplish this, but it seems that I'm
doing something wrong or missing something.
I need an array to bound all files of type *.jpg; then open Photoshop use
automation to do minor conversion for web viewing and go to the next.
I attempted to do this but I don't know what going on.
Any help will be greatly appreciated
Neil Pilier
npilier@miami.edu
Snipped code
--------------------------------------------------------------------
Option Explicit
Dim fso, f, f1, i, s, myArray(), ws, oAutoIt, iii
redim myArray(0)
set fso = CreateObject("Scripting.FileSystemObject")
set f = fso.GetFolder ("C:\test")
set ws = WScript.CreateObject("WScript.Shell")
set oAutoIt = CreateObject("AutoItX.Control")
For Each f1 In f.Files
redim preserve myArray(Ubound(myArray) + 1)
myArray(Ubound(myArray)) = f1.Name
Next
On Error Resume Next
for iii = 0 to ubound(myArray)
If lcase(fso.GetExtensionName(myArray(i))) = "jpg" then
ws.Run ("Photoshop.exe " & myArray(iii))
WScript.Sleep 6000
ws.AppActivate "Adobe Photoshop"
ws.SendKeys " "
ws.SendKeys "%(+^s)"
WScript.Sleep 500
oAutoIt.LeftClick 864, 296
WScript.Sleep 500
oAutoIt.LeftClick 843, 395
oAutoIt.LeftClick 843, 395
WScript.Sleep 500
ws.SendKeys "392"
WScript.Sleep 500
oAutoIt.LeftClick 864, 509
WScript.Sleep 500
oAutoIt.LeftClick 863, 56
WScript.Sleep 500
ws.SendKeys "{TAB 2}"
WScript.Sleep 500
ws.SendKeys "{ENTER}"
WScript.Sleep 500
ws.SendKeys "^(w)"
WScript.Sleep 500
ws.SendKeys "{TAB}"
WScript.Sleep 500
ws.SendKeys " "
WScript.Sleep 500
end if
Next
set fso = nothing
set f = nothing
set ws = nothing
set oAutoIt = nothing Tag: Search documentation scripting Tag: 144183
Help with Script.
Guys,
I need a little help here...
This is case, I have a batch of files that I need to edit in photoshop.
I'm trying to use the below code to accomplish this, but it seems that I'm
doing something wrong or missing something.
I need an array to bound all files of type *.jpg; then open Photoshop use
automation to do minor conversion for web viewing and go to the next.
I attempted to do this but I don't know what going on.
Any help will be greatly appreciated
Neil Pilier
npilier@miami.edu
Snipped code
--------------------------------------------------------------------
Option Explicit
Dim fso, f, f1, i, s, myArray(), ws, oAutoIt, iii
redim myArray(0)
set fso = CreateObject("Scripting.FileSystemObject")
set f = fso.GetFolder ("C:\test")
set ws = WScript.CreateObject("WScript.Shell")
set oAutoIt = CreateObject("AutoItX.Control")
For Each f1 In f.Files
redim preserve myArray(Ubound(myArray) + 1)
myArray(Ubound(myArray)) = f1.Name
Next
On Error Resume Next
for iii = 0 to ubound(myArray)
If lcase(fso.GetExtensionName(myArray(i))) = "jpg" then
ws.Run ("Photoshop.exe " & myArray(iii))
WScript.Sleep 6000
ws.AppActivate "Adobe Photoshop"
ws.SendKeys " "
ws.SendKeys "%(+^s)"
WScript.Sleep 500
oAutoIt.LeftClick 864, 296
WScript.Sleep 500
oAutoIt.LeftClick 843, 395
oAutoIt.LeftClick 843, 395
WScript.Sleep 500
ws.SendKeys "392"
WScript.Sleep 500
oAutoIt.LeftClick 864, 509
WScript.Sleep 500
oAutoIt.LeftClick 863, 56
WScript.Sleep 500
ws.SendKeys "{TAB 2}"
WScript.Sleep 500
ws.SendKeys "{ENTER}"
WScript.Sleep 500
ws.SendKeys "^(w)"
WScript.Sleep 500
ws.SendKeys "{TAB}"
WScript.Sleep 500
ws.SendKeys " "
WScript.Sleep 500
end if
Next
set fso = nothing
set f = nothing
set ws = nothing
set oAutoIt = nothing Tag: Search documentation scripting Tag: 144182
copying data from tape drive
Hi,
How do i write a script to copy contents of remote tape drive which is
running NTBackup, to my computer?
thanks Tag: Search documentation scripting Tag: 144180
Runas script
I have a script that looks like this:
set WshShell = CreateObject("WScript.Shell")
WshShell.Run "runas /user:mrx""e:\test.exe -10.0.0.1 -
kalle -olle"""
WScript.Sleep 100
WshShell.Sendkeys "password~"
It works fine. but I want to use this script on a
terminalserver, and therefore I want to create a shortcut
that starts my vbscrip like this.
myvbscript.vbe -x -y -z
Where x= ipaddress, y= username, z=password
How du I send this startup parameters to my vbscript Tag: Search documentation scripting Tag: 144177
Independent processes and file renaming
What I need: A way to open a bunch of internet shortcuts from a vbs or
jscript script on Win2K SP3 with independent processes.
My Problem: I work in a helpdesk that has a lot of "online" tools. I
usually have 6-15 web pages open at any given time. But there is this one
that always crashes every few hours. When it crashes IE has to be
restarted. When I log on I have a bunch of URL shortcuts in my Startup
folder. If I've opened them all up (including the evil program)
automatically from the Startup folder, at logon, they all close when that
one troublesome program crashes.
I know I could just open up the evil program last by itself but I don't want
to. What can I say; I just want to make this work my way.
Is there a way to have a script read a text file full of URLs and open them
up with independent processes using an unaltered WSH from Win2K SP3? I
can't alter the computer in any way to support PERL or Python or anything
else... I'm stuck with VBScript or Jscript.
Request #2
I want to write a script that renames a bunch of files in a directory using
a certain convention like file file01.jpg, file02.jpg, etc...
Everywhere (including MSDN) says that with the FIlesystemObject in the WSH
can't do that with binaries like jpegs. Is there any way around that? What
about using .bat files? I've seen some very cool .bat files but I haven't
been able to find a reference for how to create all the detailed parts of
one. If you can help with that please let me know.
Thanks in advance
Nathan Tag: Search documentation scripting Tag: 144172
TIP - Regular Expression for Returning Text up to a Blank Line - [\s\S]*?(?:\r?\n){2}
This is a useful ditty that someone sent me. I had wanted to return a
section of a string extracted from a Text File from a particular point
up until the first blank line.
The pattern to use is "[\s\S]*?(?:\r?\n){2}".
[\s\S]*? - Any number of any characters or no character at all. The
"?" at the end makes the SubMatch non-greedy i.e. it only matches the
first occurrence. I am not sure why the "?" is necessary but you could
give it a go without it. It may just speed the matching process; just
do enough matching to say that there are "0 or more matches" and then
move on to next pattern i.e. "(?:\r?\n){2}".
(?:) - Don't return this sequence as a SubMatch. Note this is only
needed if you intend to get SubMatches and not just match the entire
string. It is a heavy price to pay for wanting to group characters
whilst also wanting SubMatches.
\r?\n - Carriage Return (optional due to "?") and Line Feed
(required). Note that some Operating Systems/Editors do not put a
Carriage Return in files.
(?:\r?\n){2} - Two such CRLF sequences in series with nothing in
between and not returned as a submatch.
Hope this is of use to someone out there 8:-)>
D. Rocke,
Scotland. Tag: Search documentation scripting Tag: 144171
Global.asa and application recordset variable ...
Hi !
I'm trying to declare and initialize application variable which will be of
type "ADODB.Recordset". I would then also fill it with values in Global.asa.
Idea is to create application recordset and fill it with some data from
database (so recordset will hold data in memory). Then every other page
would access that recordset to show data in asp pages.
How to do that ?
Thanks,
Drago. :-) Tag: Search documentation scripting Tag: 144169
HELP. WMI check and reg check script
Guys,gals,
I am working on a problem at the moment in where I need to patch about
60 Armada e500 laptops . I want to write a vbscript to do this. I was
thinking about doing a Win32_ComputerSystem _ Model and doing a quick
check of the registry to see if the patch is install .. blah.. and
then install if it doesn't exist. I have next to no Vb experience and
just need a quick hand getting going and I should be right . So far I
have
StrComputer=InputBox("Enter Computer Name ")
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & StrComputer &
"\root\cimv2")
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
For Each objComputer2 in colSettings
objFile.WriteLine "Manufacturer: " & Chr(9) &
objComputer2.Manufacturer
objFile.WriteLine "Model : " & Chr(9) & objComputer2.Model
Next
I don't know how to check with vb for a reg key . but I need to check
if
HKEY_LOCAL_MACHINE\SOFTWARE\Compaq\PWRCON32.CPL\4.10
exists and then install a install.cmd file I have created with the
approiate strings. Can someone help me through this together. Tag: Search documentation scripting Tag: 144161
How can I tell if a worksheet exists?
Hi,
I want to determine if a worksheet named Sheets("Chart") exists. How can I
do this using VBA?
Thank you,
Robert Stober Tag: Search documentation scripting Tag: 144154
add my web site to the favorite in IE
I want to make a link that allows users to add my web site to the favorite
in IE. Anyone knows how to do that? Tag: Search documentation scripting Tag: 144148
Retrive exchange mailbox info
Is there a way with vbscript to enumerate exchange mailbox info for =
users? ie mailbox size, last logon date, last logon user? similar to =
what you see from the exchange admin utility?
I can't locate anything in there.
If RTFM please point me to the proper M :-)
Thanks
-Matt Tag: Search documentation scripting Tag: 144146
Using VBS to check that an ActiveX control was installed properly?
Hi,
Is there a way to have some VBScript in a web page after an
OBJECT section to make sure that an ActiveX control or its
prerequirements (VB run-time, etc.) is correctly installed on the
client host?
I've seen some registry-related samples in VBScript, but they seem to
require the WSH package to be installed prior to running this type of
VBScript code.
Thank you
JD. Tag: Search documentation scripting Tag: 144144
Excel and HTML
Hoi,
IN vbs i used this code
--------------------------------------------------
Set objXL = GetObject(,"Excel.Application")
If objXL Is Nothing Then
rem no excel active
else
msgbox "Close Excel Please"
End If
set objxl = nothing
--------------------------------------------------
when I use this code in HTML vbscript it won't work
anyone idees
thanks
Jan Tag: Search documentation scripting Tag: 144143
regular expression for SQL fields
hi all
I have a string like this:
dbo.ManageDate(Now(),5,"A") as Mdate,mid(Company,1,5) as s,
dbo.GetSocCode(mid(Company,7,5)) as sCode
this is the part of a SQL query between SELECT and FROM.
What Regular expression returns the fields separately i.e.
- dbo.ManageDate(Now(),5,"A") as Mdate
- mid(Company,1,5) as s
- dbo.GetSocCode(mid(Company,7,5)) as sCode ?
Can't use comma as separator (appears in function, too).
i tried to use only commas NOT in () , but i failed... Tag: Search documentation scripting Tag: 144139
Handing control over to a new window
My client side program opens a new HTML page using "window.open".
I would expect "Sub window_onload" to fire up in the new HTML page,
but it doesn't and I can't figure out why. Any ideas? Thanks. Tag: Search documentation scripting Tag: 144136
Any way to reboot system with script?
I have a script that sets some registry values with VBScript, but I have to
reboot for the changes to take effect. Is there a way to include a command in
the script that will cause the system to shut down and reboot, as if I used Shut
down > Restart on the Start menu?
Thanks!
--
Dave "Crash" Dummy - A weapon of mass destruction
crash@gpick.com
http://lists.gpick.com Tag: Search documentation scripting Tag: 144132
Creating chart via VBA - need help with Source:=Range()
Hi,
I've got a macro that creates a chart from an Excel but I don't know how
many rows the spreadsheet may contain. The table has six columns but I only
want to graph two of them, and the aren't adjacent in the table (for
instance columns 1 and 4). Becuase I don't know how many rows, and because
the columns aren't adjacent, I'm having trouble specifying the correct range
object to the Source attribute of the
chartObjects.Chart.SeriesCollection.Add method.
I've tried numerous ways to make it work but they all have problems. For
example, this one works but I don't want to hard code the values(e.g.,
"A1:A815")
With Sheets(sheetName)
co.Chart.SeriesCollection.Add _
Source:=.Range("A1:A815,D1:D815"), _
Rowcol:=xlColumns, SeriesLabels:=True, CategoryLabels:=False
End With
Anyone got any ideas?
Thank you,
Robert Stober Tag: Search documentation scripting Tag: 144130
cdonts mail
hi
is there a way to request delivery receipt of email sent via cdonts.newmail
object ?
thanks Tag: Search documentation scripting Tag: 144129
Regular Expression problem continued
Thanks to Steve Fulton, I have been able to successfully extract this
string:
N25B-357.484A0.
from this string:
N25G1G8G43G54G90G93X57.556Y115.72Z-131.128B-357.484A0.F10.0H16M8
My question is: Why doesn't the following function work on this extracted
string if there are no values after the decimal?
Function ChangeA(Match, N, B, A, Index, Source)
ChangeA = "N" & (N+1) & "B" & (B+0.1) & "A" & (A+0.1)
End Function
If the string was N25B-357.484A123.456 it would work perfectly.
Thanks
Dan Tag: Search documentation scripting Tag: 144128
Controlling the printer from Web App
Hello,
I have an app that produces invoices. I would like to
create a button that will print all the invoices. The
only problem is that as each invoice is created on the
page and using javascript prints, it give up the windows
printer dialog box. So if you have 10 invoices to print,
you get 10 dialog boxes. Is there a better way to control
the printer? Without having to buy a third party tool.
Thanks.
p.s. My real email is
(M i c h a e l @ T h e B i g O n i o n . c o m) Tag: Search documentation scripting Tag: 144127
* Newsgroup doc. and 7269 Tips, Tricks, and Registry Hacks - 01-Oct-2003 09:00.22 *
01-Oct-2003 09:00.22.
Please see the Microsoft Newsgroups page at
http://communities.microsoft.com/newsgroups/default.asp
Visit Windows & .NET Magazine's 7269 tips at http://www.jsiinc.com - press the
"Tips & Tricks" button.
Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com Tag: Search documentation scripting Tag: 144126
setRequestHeader Content-Type with charset
Hello,
i have an Microsoft.XMLHTTP Object in VBS and do
setRequestHeader "Content-Type", "text/xml; charset=utf-8"
but the Server does return a non utf-8 xml stream.,
but i need this, because of german umlauts.
What do i wrong??
Thanks
Markus Tag: Search documentation scripting Tag: 144124
Giving the user option to expand sections
Hi
Very new to this...
I would like to set up the following:
The web user does a search of a database and the results are returned in an
HTML table. I want to present the user with a table that just shows the
salient facts (brief item description, stock value, etc).
However, I'd like to give the user the opportunity to expand (and if they
wish to contract again) any one row of the table to display things like a
picture and an extended description of the row item, rather than have them
go to a separate page for this.
I'd also like to give them the option to expand all rows in the table (and
contract them again) if they wished.
What's the best way to achieve this? I'm not sure of the target audience,
so may have to support browsers using HTML4 (may even be Netscape...)
Thanks for any advice you may be able to give
Griff Tag: Search documentation scripting Tag: 144120
[?] Object to Access 97 or Acces XP
I have installed on my Pc Access97 and AccessXP, how i can create an Object
that reference on Access97, and an other that reference AccessXp.
The instruction:
Set oApp = CreateObject("Access.Application")
create an object of the last type of mdb open
Thanks and excuse me for my english
--
Pennywise
Questo messaggio è composto al 100% da
elettroni riciclati. Nessun atomo è stato
ionizzato per trasmettere questo messaggio. Tag: Search documentation scripting Tag: 144116
unlimited timeout
Hi guyz,
anybody know how to set timeout = unlimited
AS I know the keyword is resolvetime out
but I dont know how to use it.
anybody can gimme a clue ?
Thx Tag: Search documentation scripting Tag: 144114
Graphing only two columns
Hi,
I've got a spreadsheet that contains six columns. I want to generate a chart
via a macro, but I don't know how many rows the spreadsheet may contain.
I've tried numerous ways to make it work but they all have problems. Here's
what I've tried:
' This one works but I don't want to hard code the values(e.g., "A1:A815")
With Sheets(sheetName)
co.Chart.SeriesCollection.Add _
Source:=.Range("A1:A815,D1:D815"), _
Rowcol:=xlColumns, SeriesLabels:=True, Categorylabels:=True
End With
' This one doesn't make a chart at all although it seems like it *should*
work:
Source:=.Range(.Range("A1").End(xlDown), .Range("D1").End(xlDown)), _
' This one plots columns 1,2 3, and 4 but I only want 1 and 4:
Source:=.Range(.Range("A1").EntireColumn, .Range("D1").EntireColumn), _
' This one causes compile error:
Source:=.Range(Union(Columns(1), Columns(4)), _
Anyone got the solution?
Thank you,
Robert Stober Tag: Search documentation scripting Tag: 144109
vbscript in web page
I have the following lines in a LAN application.
........
Set objNet = CreateObject("Wscript.Network")
es="User name: " & objNet.UserName
........
On my PC it works fine, on the "test" system it fails with an "Object
required" at the second line.
What program is handling the interpretation of these lines? Is it IE itself
or does it use Wscript within IE to host it, or something else still?
I know that wscript.exe on the test system is older, could this be the
cause? If so, is wscript part of a Windows Update, or must it be
specifically installed? (This latter information is needed as it will affect
our installation instructions.)
I appreciate any help or advice you can offer
--
Rickety Tag: Search documentation scripting Tag: 144108
Authenticating from separate domain
Hi,
I'm developing an Internet site that is going to be
password protected. I have one windows 2000 domain on the
Internet side of things, and another on an Intranet side.
Is there any way to authenticate a user that hits my
Internet pages against the Intranet user database?
....like a user of either domain can go to this web page,
a user from only the intranet domain can access that web
page....etc. I just don't want to have to create a new
user on the Internet domain when I already have them set
up on the Intranet....but I'll also have users that are
Internet-only and I don't want any of them to access
Intranet material. Tag: Search documentation scripting Tag: 144105