Sascha_77 Posted March 28, 2019 Share Posted March 28, 2019 Hi Folx. I´m new to AutoIt. I used since years "PowerPro" but AutoIt seems to be more flexible. Now I think it´s time to change to AutoIT. :) Now my Problem. I press the red marked Button via Shortcut CTRL+F1 to get to a another Mask. These is the Code: Send("{CTRLDOWN}+{F1}") WinWait("FIS/edc® Workflowanwendung ändern") It changed to this: To press the Green Button I´m using MouseClick($MOUSE_CLICK_LEFT, 240, 540) After that the Iconbar looks like this and a "White Sheet" with Tooltip "Workflow anlegen" appears: WinWait("FIS/edc® Workflowanwendung ändern") MouseClick($MOUSE_CLICK_LEFT, 1070, 200) Push it with the Code above. Now my Question. Sometimes SAP is laggy and the White Sheet appeared with a delay. Is AutoIt able to detect if there is a pressable Button on the Screen or if there is nothing to press? The White Sheet has no shortcut. Only the Tool Tip. Link to comment Share on other sites More sharing options...
Earthshine Posted March 28, 2019 Share Posted March 28, 2019 (edited) yes, you can wait for controls, but it may not be able to talk directly to that control with standard AutoIt script. Look at the help file for the ControlSend functions and related functions. you need to be the one to wait for controls in your script Edited March 28, 2019 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
water Posted March 28, 2019 Share Posted March 28, 2019 Please check the wiki for the SAP UDF. It allows to automate the SAP GUI uisng SAPScript.https://www.autoitscript.com/wiki/User_Defined_Functions#Other_Applications My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Sascha_77 Posted March 29, 2019 Author Share Posted March 29, 2019 The SAP Samples I found are not working here. SAP.au3 is throwing Errors. But I found another way to check if the White Sheet Button is present. Before: And after (when the Button appears): How to trigger ClassnameNN "ToolbarWindow324"? If ClassnameNN = "ToolbarWindow324" then Mouseclick x,y Link to comment Share on other sites More sharing options...
Sascha_77 Posted March 29, 2019 Author Share Posted March 29, 2019 Ok I Found a sample and modified it. But it doesn´t work. #include <Constants.au3> #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> #include <SAP.au3> #include <SAPGUI.au3> Global $hCtrl = 0, $Waiting = True While (1) If $Waiting And WinExists("FIS/edc® Workflowanwendung ändern") Then $hCtrl = ControlGetHandle("FIS/edc® Workflowanwendung ändern", "", "ToolbarWindow324") If $hCtrl Then ; we got the handle, so the button is there ; now do whatever you need to do MsgBox($MB_SYSTEMMODAL, "", "Button is available") $Waiting = False EndIf EndIf WEnd Link to comment Share on other sites More sharing options...
Sascha_77 Posted March 29, 2019 Author Share Posted March 29, 2019 Got it. Using another "ToolbarWindow" ID did the trick. Nice. Link to comment Share on other sites More sharing options...
Earthshine Posted March 29, 2019 Share Posted March 29, 2019 then you should post your solution here so others with the same issue can maybe get the help they seek as well. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Sascha_77 Posted April 2, 2019 Author Share Posted April 2, 2019 It´s the code above. I only changed the ToolbarWindowID to another number. Nothing more. Link to comment Share on other sites More sharing options...
Earthshine Posted April 2, 2019 Share Posted April 2, 2019 It is customary to post the code that is working My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now