Answered VBE(windows) script not running in Windows 7

  • 3 พฤษภาคม 2555 3:43
     
     

    Hi friends ,

    Following script is working well in Windows XP but not in Windows 7 , can you please correct it.I am running this script in .vbe extention file.

    This script forgrounds an already opened minimized www.yahoomail.com webpage.


    Set objShell = WScript.CreateObject("WScript.Shell")                        
    objShell.AppActivate("Yahoo! Mail: The best web-based email! - Microsoft Internet Explorer")
    objShell.SendKeys"%{enter}"

    Thanks and Regards

    Robbs

ตอบทั้งหมด

  • 3 พฤษภาคม 2555 4:54
     
     

    VBE is anencoded script.  You cannot use that eextension on any scipt.  The encode creates that extension when you encode a script.

    AppActivate is very unrealiable. It may wll not work on Windows 7 and will seldom work if an application is minimized.

    There is likely no solution to your issue.


    ¯\_(ツ)_/¯

  • 4 พฤษภาคม 2555 18:07
     
     

    Hi ,'

    So can you please suggest any method how to do it in windows 7??

    The script  that  forgrounds an already opened minimized www.yahoomail.com webpage.

    Thanks

    Robbs

  • 4 พฤษภาคม 2555 18:14
    ผู้ดูแล
     
     

    Hi,

    Describe the problem and your goal, not the steps.

    Bill

  • 4 พฤษภาคม 2555 18:50
     
     

    Hi ,'

    So can you please suggest any method how to do it in windows 7??

    The script  that  forgrounds an already opened minimized www.yahoomail.com webpage.

    Thanks

    Robbs

    I posted:

    AppActivate is very unrealiable. It may wll not work on Windows 7 and will seldom work if an application is minimized. There is likely no solution to your issue.


    ¯\_(ツ)_/¯

  • 5 พฤษภาคม 2555 11:31
     
     

    Thank you AbqBill for replying ,

    I actually want to automate a process(based on IE) in which for each case i put fixed keystrokes(16 fixed keystrokes) manually ,i need to process 700 cases per day, i need to make a script whereby whenever i will press any specific assigned hot-key , it will send those fixed keystrokes on the foregrounded window.Also before sending the keystrokes first it will check if the foregrounded window is the desired window or not(For example - WWW.yahoomail.com) , if it is then it il send those fixed key strokes .

    The above script which i wrote was working good in windows XP but whenever i run it in Windows 7 , it is not working , giving me no response or open up  the property of that VBE script file containing the code.

    Is there any way you can help me by writing the desired script which will run in Windows 7.

    Thanks and Regards

    Robbs

  • 5 พฤษภาคม 2555 11:34
     
     

    Does it mean VBE script works good in Windows XP but not in Windows 7??

    My goal  already been accomplished in XP but not in Windows 7 with the same script.?

  • 5 พฤษภาคม 2555 14:50
     
      มีโค้ด

    Does it mean VBE script works good in Windows XP but not in Windows 7??

    My goal  already been accomplished in XP but not in Windows 7 with the same script.?

    Ihe extension VBE is not a ususual script extensio.  It is the extension given th scrits that have been encrypted.  I am not sure but this might create some issues on Windows 7.

    IN WIndows 7 many things have been changed.  One seems to be that no keystrokes can be sent to a minimizes application because 'AppActivate' does not restore the window.

    The version of IE that runs on Win 7 also runs in greated isolation to prevent cross application access for security reasons.    I have not found anyone who has had any measure of success diong what you are trying to do.

    We do not write scripts on request.  We will help you write or fix your script.  If someone has a script that will work they may post it for you.

    The script you posted will not work on XP with Ie7 or later unless you have somhow altered the system security to get it to work. It should work with IE6.  As far as I know, IE6 will not run on Windows 7

    YOu can try this version to see what error you may be getting.

    Set objShell = WScript.CreateObject("WScript.Shell")                        
    ret=objShell.AppActivate("Yahoo! Mail: The best web-based email! - Microsoft Internet Explorer ")
    if Not ret Then
         msgbox "Cannot find a Windows with that name"
    Else
         WScript.Sleep 200
         objShell.SendKeys"{enter}"
    End If

    This version will display a message if it cannot find the window by name. 

    In XP with IE8 and Windows 7 with IE9 we can find the window by name but you cannot add the " - Internet Explorer" to the name. Even if we find the Window no characters should be entered if the browser is running with correct security.

    I suspect that you are running IE6 in XP or that the security has been altered to allow external programs to access the broswer.

    I have no isea how you can fix this.  YOu can probably do this using Outlook but you will need to set Outlook up to receive your Yahoo mail.

    http://help.yahoo.com/kb/index?page=content&y=PROD_MAIL_CLASSIC&locale=en_SG&id=SLN3216

    Macro keys can be defined in Outlook that can be used create all kinds of automation and tricks..  Ther eis a Macro recorder that wwill let you record your keystriokes and play them back along with automatic detection of forms and detection of email content.


    ¯\_(ツ)_/¯

  • 7 พฤษภาคม 2555 14:18
     
     

    Thank you JRV for your reply,

    and what all you said is correct , its about IE 6 and IE 8.My code working well with IE 6 but not with IE 8 .

    Is there any way i can do it for IE 8 , i need to change the syntax of code for IE 8 ???

    My purpose is not to automate mailbox ,but something else, yahoo was just an example.Basically i want to send some fixed key strokes on IE 8 with the help of hot key.

    I hope there must be any solution??

    Thanks

    Robbs

  • 7 พฤษภาคม 2555 14:48
     
     

    Sorry but that is no longer possible.  You are not the first to have been bitten by hti scahnge.  Switch your Yahoo mail over to Outlook using the Pop method I  posted above.  You can create macros in Outlook that can do what you are trying to do in IE.

    Sorry.


    ¯\_(ツ)_/¯

  • 8 พฤษภาคม 2555 18:27
     
     

    Are you sure ,is that possible i can make a macro for hotkey in outlook which can send fixed keystrokes on any IE - 8 window?

    If so please guide a little more...

    Thanks

    Robbs

  • 8 พฤษภาคม 2555 18:30
     
     

    Are you sure ,is that possible i can make a macro for hotkey in outlook which can send fixed keystrokes on any IE - 8 window?

    If so please guide a little more...

    Thanks

    Robbs

    No.  You cannot send keys to IE windows.

    In Outlook you will connect to your Yahoo mailbox and use macros to process the mail.  It is the only thing you can do.


    ¯\_(ツ)_/¯

  • 9 พฤษภาคม 2555 18:49
     
     
    But i want to send key strokes on IE 8 window?
  • 9 พฤษภาคม 2555 19:25
    ผู้ดูแล
     
     
  • 9 พฤษภาคม 2555 19:32
     
     คำตอบ
    But i want to send key strokes on IE 8 window?

    You cannot do what you are trying to do in IE 7 or later and IE6 will not run on Windows 2008 or later.

    ¯\_(ツ)_/¯

  • 16 พฤษภาคม 2555 1:22
    ผู้ดูแล
     
     

    As there has been no activity in this thread for a few days, we assume the issue is resolved. We will mark it as "answered" to assist others in similar situations. If you disagree, please reply with further information. You can unmark the answer if you wish. If a reply helped answer your question, please mark it as the answer.


    Richard Mueller - MVP Directory Services