Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-02-2007, 03:53 AM
tatster tatster is offline
Registered User
 
Join Date: Aug 2006
Posts: 10
Send a message via MSN to tatster
WSH.Run not using variable as I expect it should!

Hi,

I've been working on a script and I've run into a problem on the last part of the code!
I am trying to get the script to open Notepad and open a text file (that has been written earlier in the script.

Below is the relevant piece of the script. The crt message box appears correctly and display the contents of the variable mypath correctly (which is the full path name of the file, but I can't get the myshell.Run line to work properly.

Please can anyone point out what I'm missing as it's driving me crazy!

Thanks,

Anthony

Code:
Dim mypath
mypath = crt.Dialog.MessageBox(""&mydocs&"" & ""&Logfiles&"" & "\NoConnect.txt")
mypath = mydocs & Logfiles & "\NoConnect.txt"
result = crt.Dialog.MessageBox(""&mypath&"")
myshell.Run "c:\windows\notepad.exe "&mypath&"
Reply With Quote
  #2  
Old 05-02-2007, 03:56 AM
tatster tatster is offline
Registered User
 
Join Date: Aug 2006
Posts: 10
Send a message via MSN to tatster
Hi - me again!
Ahhhhh - who'd have thought that 1 " would make all the difference!!

All sorted now.

Anthony
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:50 PM.