Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > VB script for XP doesn't work in VISTA

Reply
Thread Tools Display Modes

VB script for XP doesn't work in VISTA

 
 
Billericay Pete
Guest
Posts: n/a

 
      06-12-2008
A kind soul kindly sent me this script which gives an audible alert when a
chat window opens on my PC.
It doesn't work on VISTA any ideas as to what needs to be changed?

set shell=createobject("wscript.shell")
while NOT shell.appactivate("Private Chat")
wscript.sleep 2000
wend
shell.run "c:/windows/media/tada.wav"
wscript.quit



Thanks
Pete

 
Reply With Quote
 
 
 
 
cheley_bonstell88@live.com
Guest
Posts: n/a

 
      06-12-2008
On Jun 12, 5:52*am, "Billericay Pete" <billericayp...@hotmail.com>
wrote:
> A kind soul kindly sent me this script which gives an audible alert when a
> chat window opens on my PC.
> It doesn't work on VISTA any ideas as to what needs to be changed?
>
> set shell=createobject("wscript.shell")
> while NOT shell.appactivate("Private Chat")
> wscript.sleep 2000
> wend
> shell.run "c:/windows/media/tada.wav"
> wscript.quit
>
> Thanks
> Pete


what sort of errors are you getting?

Does it work on Windows XP ?

 
Reply With Quote
 
Billericay Pete
Guest
Posts: n/a

 
      06-12-2008
It worked fine on XP - just doesn't do anything on vista - no errors - just
doesn't work....
thanks
Pete

<> wrote in message
news:f598cc65-9d3b-4ff5-8d66-...
> On Jun 12, 5:52 am, "Billericay Pete" <billericayp...@hotmail.com>
> wrote:
>> A kind soul kindly sent me this script which gives an audible alert when
>> a
>> chat window opens on my PC.
>> It doesn't work on VISTA any ideas as to what needs to be changed?
>>
>> set shell=createobject("wscript.shell")
>> while NOT shell.appactivate("Private Chat")
>> wscript.sleep 2000
>> wend
>> shell.run "c:/windows/media/tada.wav"
>> wscript.quit
>>
>> Thanks
>> Pete

>
> what sort of errors are you getting?
>
> Does it work on Windows XP ?
>

 
Reply With Quote
 
Mark L. Ferguson
Guest
Posts: n/a

 
      06-12-2008
Does wscript show as a process in task manager? Does
c:/windows/media/tada.wav work from the Run line?

--
click the Ratings button. Voting helps the web interface.
http://www.microsoft.com/wn3/locales...help_en-us.htm see ''rate a post''
Mark L. Ferguson

"Billericay Pete" <> wrote in message
news:4851326f$0$2492$...
> It worked fine on XP - just doesn't do anything on vista - no errors -
> just doesn't work....
> thanks
> Pete
>
> <> wrote in message
> news:f598cc65-9d3b-4ff5-8d66-...
>> On Jun 12, 5:52 am, "Billericay Pete" <billericayp...@hotmail.com>
>> wrote:
>>> A kind soul kindly sent me this script which gives an audible alert when
>>> a
>>> chat window opens on my PC.
>>> It doesn't work on VISTA any ideas as to what needs to be changed?
>>>
>>> set shell=createobject("wscript.shell")
>>> while NOT shell.appactivate("Private Chat")
>>> wscript.sleep 2000
>>> wend
>>> shell.run "c:/windows/media/tada.wav"
>>> wscript.quit
>>>
>>> Thanks
>>> Pete

>>
>> what sort of errors are you getting?
>>
>> Does it work on Windows XP ?
>>

 
Reply With Quote
 
Billericay Pete
Guest
Posts: n/a

 
      06-12-2008
Hi Mark - I had a feeling that it may have been you who wrote the script
some years ago...
I ran it again, and in fact it did give a compilation error - 'line 5 char
1 - expected statement.'
I think I may have played around with it as it didn't work (and now messed
it up completely!)
c:/windows/media/tada.wav does work from the command line.

Thanks
Pete


"Mark L. Ferguson" <> wrote in
message news:98F7C7F5-B52F-446A-837B-...
> Does wscript show as a process in task manager? Does
> c:/windows/media/tada.wav work from the Run line?
>
> --
> click the Ratings button. Voting helps the web interface.
> http://www.microsoft.com/wn3/locales...help_en-us.htm see ''rate a
> post''
> Mark L. Ferguson
>
> "Billericay Pete" <> wrote in message
> news:4851326f$0$2492$...
>> It worked fine on XP - just doesn't do anything on vista - no errors -
>> just doesn't work....
>> thanks
>> Pete
>>
>> <> wrote in message
>> news:f598cc65-9d3b-4ff5-8d66-...
>>> On Jun 12, 5:52 am, "Billericay Pete" <billericayp...@hotmail.com>
>>> wrote:
>>>> A kind soul kindly sent me this script which gives an audible alert
>>>> when a
>>>> chat window opens on my PC.
>>>> It doesn't work on VISTA any ideas as to what needs to be changed?
>>>>
>>>> set shell=createobject("wscript.shell")
>>>> while NOT shell.appactivate("Private Chat")
>>>> wscript.sleep 2000
>>>> wend
>>>> shell.run "c:/windows/media/tada.wav"
>>>> wscript.quit
>>>>
>>>> Thanks
>>>> Pete
>>>
>>> what sort of errors are you getting?
>>>
>>> Does it work on Windows XP ?
>>>

 
Reply With Quote
 
the wharf rat
Guest
Posts: n/a

 
      06-12-2008
In article <98F7C7F5-B52F-446A-837B->,
Mark L. Ferguson <> wrote:
>Does wscript show as a process in task manager? Does
>c:/windows/media/tada.wav work from the Run line?
>
>--


Is the private chat window called Private Chat in Vista?

 
Reply With Quote
 
Billericay Pete
Guest
Posts: n/a

 
      06-12-2008
Yes it is

Thanks
Pete

"the wharf rat" <> wrote in message
news:g2rdth$83a$...
> In article <98F7C7F5-B52F-446A-837B->,
> Mark L. Ferguson <> wrote:
>>Does wscript show as a process in task manager? Does
>>c:/windows/media/tada.wav work from the Run line?
>>
>>--

>
> Is the private chat window called Private Chat in Vista?
>

 
Reply With Quote
 
Mark L. Ferguson
Guest
Posts: n/a

 
      06-12-2008
--Private Chat.VBS--
set shell=createobject("wscript.shell")
while NOT shell.appactivate("Private Chat")
wscript.sleep 5000
wend

shell.run "wmplayer.exe" & " /Play c:/windows/media/tada.wav"
wscript.sleep 2000
shell.run "taskkill /IM wmplayer.exe"

wscript.quit
--end file--
Save this as "Private Chat.VBS", and keep notepad open while you run the
test, to give it a window with "Private Chat' in it.

--
click the Ratings button. Voting helps the web interface.
http://www.microsoft.com/wn3/locales...help_en-us.htm see ''rate a post''
Mark L. Ferguson

"Billericay Pete" <> wrote in message
news:48513aa8$0$26090$...
> Hi Mark - I had a feeling that it may have been you who wrote the script
> some years ago...
> I ran it again, and in fact it did give a compilation error - 'line 5 char
> 1 - expected statement.'
> I think I may have played around with it as it didn't work (and now messed
> it up completely!)
> c:/windows/media/tada.wav does work from the command line.
>
> Thanks
> Pete
>
>
> "Mark L. Ferguson" <> wrote in
> message news:98F7C7F5-B52F-446A-837B-...
>> Does wscript show as a process in task manager? Does
>> c:/windows/media/tada.wav work from the Run line?
>>
>> --
>> click the Ratings button. Voting helps the web interface.
>> http://www.microsoft.com/wn3/locales...help_en-us.htm see ''rate a
>> post''
>> Mark L. Ferguson
>>
>> "Billericay Pete" <> wrote in message
>> news:4851326f$0$2492$...
>>> It worked fine on XP - just doesn't do anything on vista - no errors -
>>> just doesn't work....
>>> thanks
>>> Pete
>>>
>>> <> wrote in message
>>> news:f598cc65-9d3b-4ff5-8d66-...
>>>> On Jun 12, 5:52 am, "Billericay Pete" <billericayp...@hotmail.com>
>>>> wrote:
>>>>> A kind soul kindly sent me this script which gives an audible alert
>>>>> when a
>>>>> chat window opens on my PC.
>>>>> It doesn't work on VISTA any ideas as to what needs to be changed?
>>>>>
>>>>> set shell=createobject("wscript.shell")
>>>>> while NOT shell.appactivate("Private Chat")
>>>>> wscript.sleep 2000
>>>>> wend
>>>>> shell.run "c:/windows/media/tada.wav"
>>>>> wscript.quit
>>>>>
>>>>> Thanks
>>>>> Pete
>>>>
>>>> what sort of errors are you getting?
>>>>
>>>> Does it work on Windows XP ?
>>>>

 
Reply With Quote
 
Billericay Pete
Guest
Posts: n/a

 
      06-12-2008
want to rate your post, but can't see a rating button........
thanks again
Pete

"Mark L. Ferguson" <> wrote in
message news:0BDAAB1B-6010-4C06-A4AC-...
> --Private Chat.VBS--
> set shell=createobject("wscript.shell")
> while NOT shell.appactivate("Private Chat")
> wscript.sleep 5000
> wend
>
> shell.run "wmplayer.exe" & " /Play c:/windows/media/tada.wav"
> wscript.sleep 2000
> shell.run "taskkill /IM wmplayer.exe"
>
> wscript.quit
> --end file--
> Save this as "Private Chat.VBS", and keep notepad open while you run the
> test, to give it a window with "Private Chat' in it.
>
> --
> click the Ratings button. Voting helps the web interface.
> http://www.microsoft.com/wn3/locales...help_en-us.htm see ''rate a
> post''
> Mark L. Ferguson
>
> "Billericay Pete" <> wrote in message
> news:48513aa8$0$26090$...
>> Hi Mark - I had a feeling that it may have been you who wrote the script
>> some years ago...
>> I ran it again, and in fact it did give a compilation error - 'line 5
>> char 1 - expected statement.'
>> I think I may have played around with it as it didn't work (and now
>> messed it up completely!)
>> c:/windows/media/tada.wav does work from the command line.
>>
>> Thanks
>> Pete
>>
>>
>> "Mark L. Ferguson" <> wrote in
>> message news:98F7C7F5-B52F-446A-837B-...
>>> Does wscript show as a process in task manager? Does
>>> c:/windows/media/tada.wav work from the Run line?
>>>
>>> --
>>> click the Ratings button. Voting helps the web interface.
>>> http://www.microsoft.com/wn3/locales...help_en-us.htm see ''rate a
>>> post''
>>> Mark L. Ferguson
>>>
>>> "Billericay Pete" <> wrote in message
>>> news:4851326f$0$2492$...
>>>> It worked fine on XP - just doesn't do anything on vista - no errors -
>>>> just doesn't work....
>>>> thanks
>>>> Pete
>>>>
>>>> <> wrote in message
>>>> news:f598cc65-9d3b-4ff5-8d66-...
>>>>> On Jun 12, 5:52 am, "Billericay Pete" <billericayp...@hotmail.com>
>>>>> wrote:
>>>>>> A kind soul kindly sent me this script which gives an audible alert
>>>>>> when a
>>>>>> chat window opens on my PC.
>>>>>> It doesn't work on VISTA any ideas as to what needs to be changed?
>>>>>>
>>>>>> set shell=createobject("wscript.shell")
>>>>>> while NOT shell.appactivate("Private Chat")
>>>>>> wscript.sleep 2000
>>>>>> wend
>>>>>> shell.run "c:/windows/media/tada.wav"
>>>>>> wscript.quit
>>>>>>
>>>>>> Thanks
>>>>>> Pete
>>>>>
>>>>> what sort of errors are you getting?
>>>>>
>>>>> Does it work on Windows XP ?
>>>>>

 
Reply With Quote
 
Billericay Pete
Guest
Posts: n/a

 
      06-12-2008
Thanks Mark - you're a star!!
Pete

"Mark L. Ferguson" <> wrote in
message news:0BDAAB1B-6010-4C06-A4AC-...
> --Private Chat.VBS--
> set shell=createobject("wscript.shell")
> while NOT shell.appactivate("Private Chat")
> wscript.sleep 5000
> wend
>
> shell.run "wmplayer.exe" & " /Play c:/windows/media/tada.wav"
> wscript.sleep 2000
> shell.run "taskkill /IM wmplayer.exe"
>
> wscript.quit
> --end file--
> Save this as "Private Chat.VBS", and keep notepad open while you run the
> test, to give it a window with "Private Chat' in it.
>
> --
> click the Ratings button. Voting helps the web interface.
> http://www.microsoft.com/wn3/locales...help_en-us.htm see ''rate a
> post''
> Mark L. Ferguson
>
> "Billericay Pete" <> wrote in message
> news:48513aa8$0$26090$...
>> Hi Mark - I had a feeling that it may have been you who wrote the script
>> some years ago...
>> I ran it again, and in fact it did give a compilation error - 'line 5
>> char 1 - expected statement.'
>> I think I may have played around with it as it didn't work (and now
>> messed it up completely!)
>> c:/windows/media/tada.wav does work from the command line.
>>
>> Thanks
>> Pete
>>
>>
>> "Mark L. Ferguson" <> wrote in
>> message news:98F7C7F5-B52F-446A-837B-...
>>> Does wscript show as a process in task manager? Does
>>> c:/windows/media/tada.wav work from the Run line?
>>>
>>> --
>>> click the Ratings button. Voting helps the web interface.
>>> http://www.microsoft.com/wn3/locales...help_en-us.htm see ''rate a
>>> post''
>>> Mark L. Ferguson
>>>
>>> "Billericay Pete" <> wrote in message
>>> news:4851326f$0$2492$...
>>>> It worked fine on XP - just doesn't do anything on vista - no errors -
>>>> just doesn't work....
>>>> thanks
>>>> Pete
>>>>
>>>> <> wrote in message
>>>> news:f598cc65-9d3b-4ff5-8d66-...
>>>>> On Jun 12, 5:52 am, "Billericay Pete" <billericayp...@hotmail.com>
>>>>> wrote:
>>>>>> A kind soul kindly sent me this script which gives an audible alert
>>>>>> when a
>>>>>> chat window opens on my PC.
>>>>>> It doesn't work on VISTA any ideas as to what needs to be changed?
>>>>>>
>>>>>> set shell=createobject("wscript.shell")
>>>>>> while NOT shell.appactivate("Private Chat")
>>>>>> wscript.sleep 2000
>>>>>> wend
>>>>>> shell.run "c:/windows/media/tada.wav"
>>>>>> wscript.quit
>>>>>>
>>>>>> Thanks
>>>>>> Pete
>>>>>
>>>>> what sort of errors are you getting?
>>>>>
>>>>> Does it work on Windows XP ?
>>>>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printer logon script doesn't work with Vista D.P. Roberts Windows Vista General Discussion 5 05-30-2008 01:44 PM
Printer logon script doesn't work with Vista D.P. Roberts Windows Vista Networking 5 05-30-2008 01:44 PM
Windows Script Host has no script engine for ".js" files Stephan G. Windows Vista General Discussion 9 04-24-2008 08:04 PM
Why won't this script work in Vista? ToddAndMargo Windows Vista General Discussion 5 01-28-2008 06:16 AM
Why doesn't this mapping script work in Vista? mark1210 Windows Vista Networking 5 04-05-2007 06:21 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59