<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Can not make Wscript.Sleep work in my script. in Additional Q&amp;A</title>
    <link>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251786#M19653</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wscript.Sleep 60000 is right statement to do Wait functionaliy. It works properly in VBScript, Let me know whether you are not able to wait the program or it is not working ? any errors ? because i could not understand how its now working ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2008 06:11:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-31T06:11:42Z</dc:date>
    <item>
      <title>Can not make Wscript.Sleep work in my script.</title>
      <link>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaq-p/3251785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need help understanding why this errors out at &lt;STRONG&gt;Wscript.Sleep 60000&lt;/STRONG&gt;.  I need the script to wait until the transaction executes before going to the next step in the script.  I am trying to use the CS12 transaction to export the BOM for several different Materials.  Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Not IsObject(application) Then&lt;/P&gt;&lt;P&gt;   Set SapGuiAuto  = GetObject("SAPGUI")&lt;/P&gt;&lt;P&gt;   Set application = SapGuiAuto.GetScriptingEngine&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;If Not IsObject(connection) Then&lt;/P&gt;&lt;P&gt;   Set connection = application.Children(0)&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;If Not IsObject(session) Then&lt;/P&gt;&lt;P&gt;   Set session    = connection.Children(0)&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;If IsObject(WScript) Then&lt;/P&gt;&lt;P&gt;   WScript.ConnectObject session,     "on"&lt;/P&gt;&lt;P&gt;   WScript.ConnectObject application, "on"&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").maximize&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/ctxtRC29L-MATNR").text = "&lt;EM&gt;firstMaterial&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/ctxtRC29L-MATNR").caretPosition = 10&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").sendVKey 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Wscript.Sleep 60000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").sendVKey 45&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]").sendVKey 0&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]/usr/ctxtDY_FILENAME").text = "&lt;EM&gt;filename&lt;/EM&gt;.txt"&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]/usr/ctxtDY_FILENAME").caretPosition = 7&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]").sendVKey 7&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").sendVKey 3&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/ctxtRC29L-MATNR").text = "&lt;EM&gt;nextMaterial&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]/usr/ctxtRC29L-MATNR").caretPosition = 13&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").sendVKey 8&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").sendVKey 45&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]").sendVKey 0&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]/usr/ctxtDY_FILENAME").text = "&lt;EM&gt;filename&lt;/EM&gt;.txt"&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]/usr/ctxtDY_FILENAME").caretPosition = 7&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]").sendVKey 7&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").sendVKey 3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 20:17:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaq-p/3251785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T20:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can not make Wscript.Sleep work in my script.</title>
      <link>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251786#M19653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wscript.Sleep 60000 is right statement to do Wait functionaliy. It works properly in VBScript, Let me know whether you are not able to wait the program or it is not working ? any errors ? because i could not understand how its now working ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2008 06:11:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251786#M19653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-31T06:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can not make Wscript.Sleep work in my script.</title>
      <link>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251787#M19654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting the error, Object required: 'WScript'- when I run the script.  Maybe I do not even need Wscript.Sleep in the script, it seems to run fine without it but I was thinking I needed the script to wait for the requested data to return before going to the next statement in the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2008 13:55:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251787#M19654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-31T13:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can not make Wscript.Sleep work in my script.</title>
      <link>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251788#M19655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to run your script with wscript.exe&lt;/P&gt;&lt;P&gt;eg&amp;gt; wscript.exe c:\test.vbs&lt;/P&gt;&lt;P&gt;Check you are getting same error now ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 07:16:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251788#M19655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T07:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can not make Wscript.Sleep work in my script.</title>
      <link>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251789#M19656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,  I am not familiar with your transaction however, I usually grab the window title and compare or I check for the existance of something else unique and process based on that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: check for first instance of SAP.  If first instance we get a SAP Easy Access screen after login, otherwise a make some selection screen to cancel login or create another instance etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if session.findById("wnd[0]/titl").text="SAP Easy Access" then&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]/usr/rad[1]").select&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]/usr/rad[1]").setFocus&lt;/P&gt;&lt;P&gt;session.findById("wnd[1]").sendVKey 0&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 18:51:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251789#M19656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T18:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can not make Wscript.Sleep work in my script.</title>
      <link>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251790#M19657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my experience, you don't need the Sleep instructions.  I tested the code you had on my system and it appeared to work fine - at least the Sleep instruction.  I did notice, however, that I was being prompted for the Plant and BOM Application as well.  So it could be that other system messages need to be trapped and handled if they appear (such as a hard error message in the status bar).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2008 21:45:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251790#M19657</guid>
      <dc:creator>bryan_lanning2</dc:creator>
      <dc:date>2008-04-04T21:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can not make Wscript.Sleep work in my script.</title>
      <link>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251791#M19658</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have the same error..  Object required: 'WScript' when I use this :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Wscript.Sleep 60000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there a solution please ?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 17:56:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251791#M19658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-12-15T17:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can not make Wscript.Sleep work in my script.</title>
      <link>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251792#M19659</link>
      <description>&lt;P&gt;Hi
there,&lt;/P&gt;&lt;P&gt;You
have a question and need help by the community? Instead of posting into an old
question thread, it is more helpful for you, if you create your own question.
Here is how to get started:&lt;/P&gt;&lt;OL&gt;
 
&lt;LI&gt;Learn about asking and
     answering questions in SAP Community with this tutorial: &lt;A href="https://developers.sap.com/tutorials/community-qa.html"&gt;https://developers.sap.com/tutorials/community-qa.html&lt;/A&gt;&lt;/LI&gt; 
&lt;LI&gt;Ask your detailed question
     here: &lt;A href="https://answers.sap.com/questions/ask.html"&gt;https://answers.sap.com/questions/ask.html&lt;/A&gt;&lt;/LI&gt; 
&lt;LI&gt;Wait for a response.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;That's
it. Thank you!&lt;/P&gt;&lt;P&gt;Best
regards,&lt;/P&gt;&lt;P&gt;Your
SAP Community moderator&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 17:56:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/can-not-make-wscript-sleep-work-in-my-script/qaa-p/3251792#M19659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-12-15T17:56:44Z</dc:date>
    </item>
  </channel>
</rss>

