<?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: Activate a session via Gui scripting in Additional Q&amp;A</title>
    <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113426#M43278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ScriptMan - I tried the script you sent. Now 'Sleep' does not give an error but it gets to the set session=connection.children(1) and gives me "Object doesn't support this property or method : 'session' -  "&lt;/P&gt;&lt;P&gt;This is the script that works to the last statement below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").maximize&lt;/P&gt;&lt;P&gt;OrdNo = session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1100/subSUB_KOPF:SAPLCOIH:1102/txtCAUFVD-AUFNR").text&lt;/P&gt;&lt;P&gt;session.createsession&lt;/P&gt;&lt;P&gt;set Wshell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;wshell.run "c:\temp\sleep.vbs",1,True&lt;/P&gt;&lt;P&gt;Set session = connection.Children(1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is at this point that I want to switch to the new session and do a "/nZMM_ZCOAR002" transaction to paste the OrdNo variable into the new screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Umur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Aug 2009 16:09:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-10T16:09:30Z</dc:date>
    <item>
      <title>Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaq-p/5113415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to activate an active SAP-session via Gui Scripting or maybe a workaround?&lt;/P&gt;&lt;P&gt;There are some SAP sessions running and I want to activate a certain one of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to activate a session with:&lt;/P&gt;&lt;P&gt;AppActivate session.findById("wnd[0]").Text&lt;/P&gt;&lt;P&gt;but, as we know, if there are the same task names in Task Manager, the function will start any one of them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Stefan Benkö on Feb 9, 2009 7:07 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2009 14:14:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaq-p/5113415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-06T14:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113416#M43268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could count the SAP connectionsans sessions, then select one to activate using a form.&lt;/P&gt;&lt;P&gt;I have had sucess populating an array with the connections and sessions, then using that array to build a form for the user to select the connection and session. Then use the user's selection to set the connection and session objects.  &lt;/P&gt;&lt;P&gt;Or you could display all connections and sessions and a dialog box, and have the user specify the connection and session.&lt;/P&gt;&lt;P&gt;You will need to subtract 1 from the result to convert to base 0. For example, if this shows that you have 1 connection, then subtract 1, and set your connection to 0. Example:  "Set connection = application.Children(0)"&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example in VBS, similar to a recorded script. I use Excel VBA to build the form rather than VBS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;'&lt;/P&gt;&lt;P&gt;iConnections = application.Connections.Count &lt;/P&gt;&lt;P&gt;msgbox iConnections &amp;amp; "   Connections"&lt;/P&gt;&lt;P&gt;'&lt;/P&gt;&lt;P&gt;iSessions = application.Connections.Item(0).Sessions.Count&lt;/P&gt;&lt;P&gt;msgbox isessions &amp;amp; "   Sessions"&lt;/P&gt;&lt;P&gt;'&lt;/P&gt;&lt;P&gt;sSAP_Session = Application.Connections.Item(0).Sessions.Item(0).Info.Transaction   &lt;/P&gt;&lt;P&gt;'&lt;/P&gt;&lt;P&gt;msgbox sSAP_Session &amp;amp; "   1st session"&lt;/P&gt;&lt;P&gt;'&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 04:29:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113416#M43268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-10T04:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113417#M43269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Casmir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            suFound = False&lt;/P&gt;&lt;P&gt;            suError = False&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            sgSystem = Trim(Cells(Target.Row, scSysCol))&lt;/P&gt;&lt;P&gt;            sgClient = Trim(Cells(Target.Row, scCliCol))&lt;/P&gt;&lt;P&gt;            sgUser = Trim(Cells(Target.Row, scUsrCol))&lt;/P&gt;&lt;P&gt;            sgPW = Trim(Cells(Target.Row, scPwdCol))&lt;/P&gt;&lt;P&gt;            suError = True&lt;/P&gt;&lt;P&gt;            &lt;/P&gt;&lt;P&gt;            suError = Not ssApplication&lt;/P&gt;&lt;P&gt;            If suError Then GoTo StopSub&lt;/P&gt;&lt;P&gt;            &lt;/P&gt;&lt;P&gt;            For Each suConnection In sgApplication.Connections&lt;/P&gt;&lt;P&gt;                suSysName = suConnection.Description&lt;/P&gt;&lt;P&gt;                &lt;/P&gt;&lt;P&gt;                If suSysName = sgSystem Then&lt;/P&gt;&lt;P&gt;                    For Each suSession In suConnection.sessions&lt;/P&gt;&lt;P&gt;                        suSysClient = suSession.info.client&lt;/P&gt;&lt;P&gt;                        &lt;/P&gt;&lt;P&gt;                        If suSysClient = sgClient Then&lt;/P&gt;&lt;P&gt;                            AppActivate suSession.findById("wnd[0]").Text&lt;/P&gt;&lt;P&gt;                            &lt;/P&gt;&lt;P&gt;                            'Aktive Instanz herausfinden, SID/Client checken&lt;/P&gt;&lt;P&gt;                            Set suAkt = sgApplication.ActiveSession()&lt;/P&gt;&lt;P&gt;                            suAktName = suAkt.Parent.Description&lt;/P&gt;&lt;P&gt;                            suAktClient = suAkt.info.client&lt;/P&gt;&lt;P&gt;                            &lt;/P&gt;&lt;P&gt;                            If sgSystem &amp;lt;&amp;gt; suAktName Or sgClient &amp;lt;&amp;gt; suAktClient Then&lt;/P&gt;&lt;P&gt;                                &lt;/P&gt;&lt;P&gt;                                If Not suFound Then&lt;/P&gt;&lt;P&gt;                                    suFound = True&lt;/P&gt;&lt;P&gt;                                    &lt;/P&gt;&lt;P&gt;                                    AppActivate "Microsoft Excel"&lt;/P&gt;&lt;P&gt;                                    A = MsgBox(sgSystem &amp;amp; " - " &amp;amp; sgClient &amp;amp; "  NOT selectable", vbOKOnly + vbCritical + vbDefaultButton1, "SAP Automation")&lt;/P&gt;&lt;P&gt;                                End If&lt;/P&gt;&lt;P&gt;                                &lt;/P&gt;&lt;P&gt;                            Else&lt;/P&gt;&lt;P&gt;                                suFound = True&lt;/P&gt;&lt;P&gt;                            End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                            Exit For&lt;/P&gt;&lt;P&gt;                        End If&lt;/P&gt;&lt;P&gt;                        &lt;/P&gt;&lt;P&gt;                        suSysClient = ""&lt;/P&gt;&lt;P&gt;                    Next&lt;/P&gt;&lt;P&gt;                End If&lt;/P&gt;&lt;P&gt;                &lt;/P&gt;&lt;P&gt;                If suFound Then Exit For&lt;/P&gt;&lt;P&gt;                suSysName = ""&lt;/P&gt;&lt;P&gt;            Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, I got at that point all the necessary session and connection data.&lt;/P&gt;&lt;P&gt;There are several SAP-Tasks open and what I want is to get a specific one as active window on my screen. That doesn't work if the sessions have the same Task-name, for instance "SAP Easy Access". Because Windos is not albe to find the right SAP-task - they have the same name - and it takes usally the wrong one of them. Thats my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks for your Help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 14:21:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113417#M43269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-16T14:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113418#M43270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have had success identifying the Excel VBA objects by viewing the Locals Window in Excel VBA while stepping through the code.&lt;/P&gt;&lt;P&gt;The sessions will be in a collection beginning with item 0. You can select a session and specify the session using the collection item number.&lt;/P&gt;&lt;P&gt;If you need to activate the specified session, try GetObject ("SAPGUI")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Casimir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2009 12:45:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113418#M43270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-17T12:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113419#M43271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have a longer period of time similar problems which I am on a different way to solve that. A professional solution to this problem is haggard to me thanks "GuiXT".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. It is a script to:  &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;session.findById("wnd[0]").maximize&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. It replaces the first 14 lines as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set aw = session.activeWindow()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aw.findById("wnd[0]").maximize&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. If a window change is taking place:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;set aw = session.activeWindow()&lt;/P&gt;&lt;P&gt;aw.findById("wnd[0]").maximize&lt;/P&gt;&lt;P&gt;aw.findById("wnd ......").press&lt;/P&gt;&lt;P&gt;set aw1 = session.activeWindow()&lt;/P&gt;&lt;P&gt;aw1.findById("wnd[1]/tbar[0]/btn[0]").press&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that this problem is not only both of us interested. Unfortunately, this script only adapted from SAP to start. At a general validity is still under construction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;ScriptMan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ScriptMan on Jun 23, 2009 2:24 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ScriptMan on Jun 23, 2009 2:51 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 12:23:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113419#M43271</guid>
      <dc:creator>script_man</dc:creator>
      <dc:date>2009-06-23T12:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113420#M43272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;a general solution, I have not yet. Perhaps some of you have it perfect.&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;STRONG&gt;set aw = session.activeWindow()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;aw&lt;/STRONG&gt;.findById("wnd[0]").maximize&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;on error resume next&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SESSION_ = 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;do&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;err.clear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;aw&lt;/STRONG&gt;.findById("wnd.......").press &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;if err.number = 0 or SESSION_ = (connection.children.count - 1) then exit do&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;SESSION_ = SESSION_ + 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;Set session    = connection.Children(int(SESSION_))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;set aw = session.activeWindow()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;loop&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set aw1 = session.activeWindow()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;aw1&lt;/STRONG&gt;.findById("wnd[1]/tbar[0]/btn[0]").press&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;on error goto 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is still a problem when multiple modes include the same transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ScriptMan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ScriptMan on Jun 25, 2009 8:20 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2009 14:18:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113420#M43272</guid>
      <dc:creator>script_man</dc:creator>
      <dc:date>2009-06-23T14:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113421#M43273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understand correctly, you are logged into different instances e.g. ECD(100), ECD(120), ECQ(100) etc. and you want to pick a specific log-in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I do in script. (Where W_System = ECQ100 etc.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim il, it&lt;/P&gt;&lt;P&gt;Dim W_conn, W_Sess, W_System&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;W_System = objSheet.Cells(iRow, 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Not objSess Is Nothing Then&lt;/P&gt;&lt;P&gt;    If objSess.Info.SystemName &amp;amp; objSess.Info.Client = W_System Then&lt;/P&gt;&lt;P&gt;        Exit Function&lt;/P&gt;&lt;P&gt;    End If&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If objGui Is Nothing Then&lt;/P&gt;&lt;P&gt;   Set SapGuiAuto = GetObject("SAPGUI")&lt;/P&gt;&lt;P&gt;   Set objGui = SapGuiAuto.GetScriptingEngine&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For il = 0 To objGui.Children.Count - 1&lt;/P&gt;&lt;P&gt;    Set W_conn = objGui.Children(il + 0)&lt;/P&gt;&lt;P&gt;    For it = 0 To W_conn.Children.Count - 1&lt;/P&gt;&lt;P&gt;        Set W_Sess = W_conn.Children(it + 0)&lt;/P&gt;&lt;P&gt;        If W_Sess.Info.SystemName &amp;amp; W_Sess.Info.Client = W_System Then&lt;/P&gt;&lt;P&gt;            Set objConn = objGui.Children(il + 0)&lt;/P&gt;&lt;P&gt;            Set objSess = objConn.Children(it + 0)&lt;/P&gt;&lt;P&gt;            Exit For&lt;/P&gt;&lt;P&gt;        End If&lt;/P&gt;&lt;P&gt;    Next&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If objSess Is Nothing Then&lt;/P&gt;&lt;P&gt;   MsgBox "Not Logged into system"&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If IsObject(WScript) Then&lt;/P&gt;&lt;P&gt;   WScript.ConnectObject objSess, "on"&lt;/P&gt;&lt;P&gt;   WScript.ConnectObject objGui, "on"&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. Further if you have multiple sessions in the system you can add further check e.g. "Transaction" property etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nitin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 17:22:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113421#M43273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-06T17:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113422#M43274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also looking for a solution to this issue, which seems to be what this thread is about:&lt;/P&gt;&lt;P&gt;- I would like the users to activate a script on a standard SAP screen&lt;/P&gt;&lt;P&gt;- THe script will grab a field from the current screen&lt;/P&gt;&lt;P&gt;- in the command line it types '/o&amp;lt;a report transaction&amp;gt;" and creates a new session with that transaction running.&lt;/P&gt;&lt;P&gt;- now I have 2 sessions, one with the original transaction and the 2nd with the new report transaction&lt;/P&gt;&lt;P&gt;- I want to switch to the report transaction and paste the value I read from the 1st session into a field and execute the report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ScriptMan - can I use the last code you have in this thread?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Umur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 15:19:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113422#M43274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-06T15:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113423#M43275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Umur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's nice to once again to hear from you. After a certain time has automatically each one of us the same questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the code above, I tried to find a solution to this problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       - It has, for example, all 6 modes open.&lt;/P&gt;&lt;P&gt;       - A script is started &lt;/P&gt;&lt;P&gt;       - Itt is be executed in the active  transaction.&lt;/P&gt;&lt;P&gt;       - One knows not what the session is active.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After a switch, or a certain specific value without an error is found, it is assumed that is the requested transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know the active session, it should not be so big problem. The solution might look like this.&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;'script for the original transaktion without the first 14 Rows&lt;/P&gt;&lt;P&gt;. . .&lt;/P&gt;&lt;P&gt;session.createsession                                           '&lt;/P&gt;&lt;P&gt;set Wshell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;wshell.run "c:\temp\sleep.vbs",1,true&lt;/P&gt;&lt;P&gt;Set session    = connection.Children(1)&lt;/P&gt;&lt;P&gt;. . .&lt;/P&gt;&lt;P&gt;'script for the new session  without the first 14 Rows&lt;/P&gt;&lt;P&gt;. . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sleep.vbs contains a single line:   Wscript.Sleep 1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After opening a new mode, you have to wait a while until the new window is responsive. Otherwise an error will be reported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ScriptMan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 22:20:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113423#M43275</guid>
      <dc:creator>script_man</dc:creator>
      <dc:date>2009-08-06T22:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113424#M43276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ScriptMan - was away for a while. I tried your code but I get an 'unkown error' message with sleep script execute. I created the fiel and saved it in the right place.  When I execute the script, I create the session 2, get there but all I need to do there is somehow actiuvate that session so I can fill the data on that session 2 screen, execute the report, and switch the session back to 1. I thought the command "Set session = connection.Children(1)" was for this but does not want to work.&lt;/P&gt;&lt;P&gt;anyway if this is going to be too complicated, I can forget about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Umur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2009 20:40:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113424#M43276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-07T20:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113425#M43277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Umur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an example for you. Here will pass a parameter named as GP on the new mode. A parameter named as TEXT in the new mode is selected and returned to the original mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
If Not IsObject(application) Then
. . .
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd" ).text = "/nrecn"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/subSUB_OBJSEL:SAPLRECN_GUI_CN_SEL:1000/ctxtRECN_CONTRACT_X-BUKRS").text = "1234"
session.findById("wnd[0]/usr/subSUB_OBJSEL:SAPLRECN_GUI_CN_SEL:1000/ctxtRECN_CONTRACT_X-RECNNR").text = "1002"
session.findById("wnd[0]/tbar[1]/btn[5]").press
GP = session.findById("wnd[0]/...FASTENTRY:0034/ctxtREGCFLDS_FE-PARTNER").text
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
session.createsession
set Wshell = CreateObject("WScript.Shell")
wshell.run "c:\temp\sleep.vbs",1,true
Set session = connection.Children(1)
session.findById("wnd[0]/tbar[0]/okcd").text = "/nbp"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/mbar/menu[0]/menu[0]").select
session.findById("wnd[1]/usr/ctxtBUS_JOEL_MAIN-OPEN_NUMBER").text = GP
session.findById("wnd[1]/tbar[0]/btn[0]").press
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
session.findById("wnd[0]/usr/subSCREEN_3000_...PARTNER_ROLE").setFocus
session.findById("wnd[0]/usr/subSCREEN_3000_...PARTNER_ROLE").key = "X01000"
session.findById("wnd[0]/usr/subSCREEN_3000_...TABSTRIP/tabpSCREEN_1100_TAB_06").select
TEXT = session.findById("wnd[0]/usr/...subA02P01:SAPLFSBP_03:0010/txtBP1010-SOL_TXT").text
session.findById("wnd[0]").close
wshell.run "c:\temp\sleep.vbs",1,true
Set session = connection.Children(0)
session.findById("wnd[0]/tbar[0]/btn[3]").press
session.findById("wnd[0]/usr/subSUB_OBJSEL:SAPLRECN_GUI_CN_SEL:1000/ctxtRECN_CONTRACT_X-RECNNR").text = TEXT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try to start the script sleep.vbs iindividually. There must be no errors occur. You can make also a link to the following script on the desktop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
set wshell = createObject("WScript.shell")
set args = wscript.arguments
if args.count&amp;gt;0 then
   wshell.run "WScript.exe //x " + chr(34) + args(0) + chr(34)
end if
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to try then a script, You need to drag and drop the script on this link and you can try it gradually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ScriptMan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ScriptMan on Aug 8, 2009 6:51 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Aug 2009 13:39:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113425#M43277</guid>
      <dc:creator>script_man</dc:creator>
      <dc:date>2009-08-08T13:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113426#M43278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ScriptMan - I tried the script you sent. Now 'Sleep' does not give an error but it gets to the set session=connection.children(1) and gives me "Object doesn't support this property or method : 'session' -  "&lt;/P&gt;&lt;P&gt;This is the script that works to the last statement below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").maximize&lt;/P&gt;&lt;P&gt;OrdNo = session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1100/subSUB_KOPF:SAPLCOIH:1102/txtCAUFVD-AUFNR").text&lt;/P&gt;&lt;P&gt;session.createsession&lt;/P&gt;&lt;P&gt;set Wshell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;wshell.run "c:\temp\sleep.vbs",1,True&lt;/P&gt;&lt;P&gt;Set session = connection.Children(1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is at this point that I want to switch to the new session and do a "/nZMM_ZCOAR002" transaction to paste the OrdNo variable into the new screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Umur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2009 16:09:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113426#M43278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-10T16:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113427#M43279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Umur,&lt;/P&gt;&lt;P&gt;the above script works, if it is started e.g. from a Windows Explorer.  Although it is to work under SAP,  it must look as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
If Not IsObject(application) Then
. . .
Set session    = connection.Children(0)
. . .
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "/nrecn"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/subSUB_OBJSEL:SAPLRECN_GUI_CN_SEL:1000/ctxtRECN_CONTRACT_X-BUKRS").text = "1234"
session.findById("wnd[0]/usr/subSUB_OBJSEL:SAPLRECN_GUI_CN_SEL:1000/ctxtRECN_CONTRACT_X-RECNNR").text = "1002"
session.findById("wnd[0]/tbar[1]/btn[5]").press
GP = session.findById("wnd[0]/usr/subSUB_BDT: . . . ctxtREGCFLDS_FE-PARTNER").text
session.createsession
set Wshell = CreateObject("WScript.Shell")
wshell.run "c:\temp\sleep.vbs",1,true
wshell.run "c:\temp\script1.vbs " &amp;amp; GP,1,true
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;script1.vbs:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
If Not IsObject(application) Then
. . .
   Set session    = connection.Children(1)
. . .
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "/nbp"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/mbar/menu[0]/menu[0]").select
session.findById("wnd[1]/usr/ctxtBUS_JOEL_MAIN-OPEN_NUMBER").text = Wscript.Arguments(0)
session.findById("wnd[1]/tbar[0]/btn[0]").press
session.findById("wnd[0]/usr/subSCREEN_3000_RESIZING_AREA: . . .JOEL_MAIN-PARTNER_ROLE").setFocus
session.findById("wnd[0]/usr/subSCREEN_3000_RESIZING_AREA: . . .JOEL_MAIN-PARTNER_ROLE").key = "X01000"
session.findById("wnd[0]/usr/subSCREEN_3000_RESIZING_AREA: . . TABSTRIP/tabpSCREEN_1100_TAB_06").select
TEXT = session.findById("wnd[0]/usr/subSCREEN_3000_RESIZING_AREA: . . .txtBP1010-SOL_TXT").text
session.findById("wnd[0]").close
set Wshell = CreateObject("WScript.Shell")
wshell.run "c:\temp\sleep.vbs",1,true
wshell.run "c:\temp\script2.vbs " &amp;amp; TEXT,1,true
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;script2.vbs:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
If Not IsObject(application) Then
. . .
   Set session    = connection.Children(0)
. . .
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/btn[3]").press
session.findById("wnd[0]/usr/subSUB_OBJSEL: . . .RECN_CONTRACT_X-RECNNR").text = Wscript.Arguments(0)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ScriptMan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ScriptMan on Aug 11, 2009 8:57 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2009 06:41:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113427#M43279</guid>
      <dc:creator>script_man</dc:creator>
      <dc:date>2009-08-11T06:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113428#M43280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ScriptMan - works like a charm! Great code, and I already have people lined up to use this functionality. If only there was a way to auto-start a script (pretty much like an autoexec.bat file) when you sign on to SAP...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Umur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2009 14:16:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113428#M43280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-12T14:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a session via Gui scripting</title>
      <link>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113429#M43281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Umur, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how about ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. create a link to SAP via Alt / F12 on your desktop e.g. like "S11 Login.sap"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. create a link to the autoscript.vbs in the script directory that will be started automatically e.g. like "autoscript.vbs.lnk"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. create Start_Script.vbs&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set Wshell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;Do &lt;/P&gt;&lt;P&gt; bWindowFound = Wshell.AppActivate("SAP Easy Access")&lt;/P&gt;&lt;P&gt; WScript.Sleep 1000&lt;/P&gt;&lt;P&gt; Loop Until bWindowFound&lt;/P&gt;&lt;P&gt;wshell.run chr(34) &amp;amp; "C:\. . .\autoscript.vbs.lnk" &amp;amp; chr(34), , false&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;3. create Start_Sap.bat on your desktop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;"S11 Login.sap"&lt;/P&gt;&lt;P&gt;"Path + start_script.vbs"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Done&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ScriptMan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2009 07:01:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/additional-q-a/activate-a-session-via-gui-scripting/qaa-p/5113429#M43281</guid>
      <dc:creator>script_man</dc:creator>
      <dc:date>2009-08-13T07:01:03Z</dc:date>
    </item>
  </channel>
</rss>

