Photo Gallery
Member List
Search
Calendars
FAQ
Ticket List
Log Out
Forums
Register
Login
My Profile
Inbox
Address Book
My Subscription
My Forums
Script debug is fine but it doesn't do exactly what I want it to do
Logged in as: Guest
arrSession:exec spGetSession 2,2,65085
Active Users: There are
0
members and
0
guests.
Users viewing this topic: none
Printable Version
All Forums
>>
[Scripting]
>>
WSH & Client Side VBScript
>> Script debug is fine but it doesn't do exactly what I want it to do
Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page:
[1]
Login
Message
<< Older Topic
Newer Topic >>
Script debug is fine but it doesn't do exactly what I w... -
10/14/2008 8:24:37 PM
muckv
Posts: 1
Score: 0
Joined: 10/14/2008
Status:
offline
The script does not write anything in the log.txt when it runs. (all the other stuff works). Can somebody see what's going on?
Option Explicit On error Resume Next Dim objShellApp Dim argument Dim strFile Set objLogFile = objFSO.OpenTextFile("C:\detach\log.txt", 8, True) If WScript.Arguments.Count < 1 Then WScript.Echo("Usage: printfile.vbs file.doc") WScript.Quit End If strFile = Wscript.Arguments(0) Set objShellApp = WScript.CreateObject("Shell.Application") objShellApp.ShellExecute strFile, "", "", "print", 0 If err.number <> 0 Then strerror = date & " Fout bij het afprinten van " & strfile objLogFile.Write strerror objLogFile.Close Err.Clear Else Wscript.Sleep(5000) Set objShellApp = Nothing dim strsuccess strsuccess = date & "printen van " & strFile &" gelukt" objLogFile.Write strsuccess objLogFile.Close End If
Post #: 1
RE: Script debug is fine but it doesn't do exactly what... -
10/15/2008 12:18:33 AM
dm_4ever
Posts: 2669
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status:
offline
comment out the "On Error Resume Next"....do you get any errors.
_____________________________
dm_4ever
My philosophy:
K.I.S.S - Keep It Simple Stupid
Read Me:
http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff:
http://www.visualbasicscript.com/m_47117/tm.htm
(in reply to
muckv
)
Post #: 2
If you found our site useful please link to us
<a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>
.
All Forums
>>
[Scripting]
>>
WSH & Client Side VBScript
>> Script debug is fine but it doesn't do exactly what I want it to do
Page:
[1]
Jump to:
Select a Forum
All Forums
----------------------
[Welcome]
- - Forum Rules
- - Test Posting Messages
- - New Member Area/Introduction
[Scripting]
- - WSH & Client Side VBScript
- - WSH & Client Side VBScript Tutorial
- - Post a VBScript
- - Windows PowerShell
- - ASP
- - ASP.NET
- - Windows Script Components
[General Forum]
- - Other Programming/Scripting Languages
- - Suggestions & Feedback
- - Off-Topic Lounge
New Messages
No New Messages
Hot Topic w/ New Messages
Hot Topic w/o New Messages
Locked w/ New Messages
Locked w/o New Messages
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
Forum Software ©
ASPPlayground.NET
Advanced Edition
2.5.5 ANSI