title: How to set current cell on SAP GUIContainerShell in C#?
body: <p>I am automating my work with SAP GUI script at the moment and whilst trying to recreate the recorded macro I am having an issue at one particular point which I don't know how to translate.</p>
  <pre><code>session.findById(&quot;wnd[0]/shellcont/shell/shellcont[1]/shell&quot;).setCurrentCell 1,&quot;MAKTX2&quot;
  session.findById(&quot;wnd[0]/shellcont/shell/shellcont[1]/shell&quot;).doubleClickCurrentCell
  session.findById(&quot;wnd[1]/tbar[0]/btn[0]&quot;).press
  </code></pre>
  <p>I have read through the SAP GUI Scripting API pdf and am struggling to see how I action the <code>.setCurrentCell 1,&quot;MAKTX2&quot;</code> part. I am accessing the container cell with the following:</p>
  <pre><code>GuiContainerShell materials = (GuiContainerShell)session.FindById(&quot;wnd[0]/shellcont/shell/shellcont[1]/shell&quot;);
  </code></pre>
  <p>How do I make &quot;materials&quot; double click &quot;MAKTX2&quot;?</p>
  <p>Edit: Full SAP GUI script:</p>
  <pre><code>SapROTWr.CSapROTWrapper sapROTWrapper = new SapROTWr.CSapROTWrapper();
  object SapGuilRot = sapROTWrapper.GetROTEntry(&quot;SAPGUI&quot;);
  object engine = SapGuilRot.GetType().InvokeMember(&quot;GetScriptingEngine&quot;, System.Reflection.BindingFlags.InvokeMethod, null, SapGuilRot, null);
  GuiApplication GuiApp = (GuiApplication)engine;
  GuiConnection connection = (GuiConnection)GuiApp.Connections.ElementAt(0);
  GuiSession session = (GuiSession)connection.Children.ElementAt(0);
  GuiFrameWindow frame = (GuiFrameWindow)session.FindById(&quot;wnd[0]&quot;);
  GuiTextField jobsite = (GuiTextField)session.FindById(&quot;wnd[0]/usr/subSA_0100_1:SAPMZCX_CSDSLSBM5001_OFS_OTS:2410/subSA_2410_1:SAPMZCX_CSDSLSBM5001_OFS_OTS:2510/ctxtKUWEV-KUNNR&quot;);
  jobsite.Text = &quot;I033&quot;;
  frame.SendVKey(0);
  GuiLabel aggregates = (GuiLabel)session.FindById(&quot;wnd[1]/usr/lbl[12,3]&quot;);
  aggregates.SetFocus();
  GuiFrameWindow frame2 = (GuiFrameWindow)session.FindById(&quot;wnd[1]&quot;);
  frame2.SendVKey(1);
  GuiContainerShell materials = (GuiContainerShell)session.FindById(&quot;wnd[0]/shellcont/shell/shellcont[1]/shell&quot;);
  </code></pre>