第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在C#中的SAP GUIContainerShell上設(shè)置當(dāng)前單元格?

如何在C#中的SAP GUIContainerShell上設(shè)置當(dāng)前單元格?

C#
開心每一天1111 2021-05-20 18:19:52
目前,我正在使用SAP GUI腳本使我的工作自動化,并且在嘗試重新創(chuàng)建記錄的宏時,我在某個特定點(diǎn)遇到了一個問題,該問題我不知道如何翻譯。session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell").setCurrentCell 1,"MAKTX2"session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell").doubleClickCurrentCellsession.findById("wnd[1]/tbar[0]/btn[0]").press我已經(jīng)閱讀了SAP GUI Scripting API pdf,并且正在努力查看如何操作該.setCurrentCell 1,"MAKTX2"零件。我正在通過以下方式訪問容器單元:GuiContainerShell materials = (GuiContainerShell)session.FindById("wnd[0]/shellcont/shell/shellcont[1]/shell");如何使“材料”雙擊“ MAKTX2”?編輯:完整的SAP GUI腳本:SapROTWr.CSapROTWrapper sapROTWrapper = new SapROTWr.CSapROTWrapper();object SapGuilRot = sapROTWrapper.GetROTEntry("SAPGUI");object engine = SapGuilRot.GetType().InvokeMember("GetScriptingEngine", 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("wnd[0]");GuiTextField jobsite = (GuiTextField)session.FindById("wnd[0]/usr/subSA_0100_1:SAPMZCX_CSDSLSBM5001_OFS_OTS:2410/subSA_2410_1:SAPMZCX_CSDSLSBM5001_OFS_OTS:2510/ctxtKUWEV-KUNNR");jobsite.Text = "I033";frame.SendVKey(0);GuiLabel aggregates = (GuiLabel)session.FindById("wnd[1]/usr/lbl[12,3]");aggregates.SetFocus();GuiFrameWindow frame2 = (GuiFrameWindow)session.FindById("wnd[1]");frame2.SendVKey(1);GuiContainerShell materials = (GuiContainerShell)session.FindById("wnd[0]/shellcont/shell/shellcont[1]/shell");
查看完整描述

1 回答

?
慕標(biāo)5832272

TA貢獻(xiàn)1966條經(jīng)驗(yàn) 獲得超4個贊

老實(shí)說,我無法為您提供C#的幫助,但也許SAP接口足夠通用。session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell")事實(shí)是,您可以引用GuiShell或GuiContainerShell類型的對象或任何被調(diào)用的對象。在此參考上,您可以調(diào)用為此類型定義的方法。因此,當(dāng)您這樣做時


session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell").setCurrentCell 1,"MAKTX2"

您只需要先獲得引用,然后setCurrentCell在同一行上應(yīng)用該方法即可。


當(dāng)您在C#中執(zhí)行操作時


GuiContainerShell materials = (GuiContainerShell)session.FindById("wnd[0]/shellcont/shell/shellcont[1]/shell");

您給此引用起了一個名字materials,并提供了正確的行,我想您現(xiàn)在可以說:


materials.setCurrentCell(1, "MAKTX2")

materials.doubleClickCurrentCell


查看完整回答
反對 回復(fù) 2021-05-23
  • 1 回答
  • 0 關(guān)注
  • 411 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號