Skip to Content

GUI scripting - "Upload from Clipboard" fails when desktop is locked

Hello! I have some Excel VBA macros that run SAP reports via GUI scripting, and for the past year they have been running via Windows Task Scheduler on a couple of old Windows 7 PCs, unattended, with locked desktops, without issue. Now I'm trying to move these to Windows 10, and it seems that any scripts that involve clicking SAP's "Upload from Clipboard" button silently fail to upload any data from the clipboard when the Windows desktop is locked. It still works fine with an unlocked desktop,

but if I schedule a task for 1 minute in the future and quickly lock my desktop, the “Upload from Clipboard” button click will not upload any data. There's no error message or anything -- it just doesn't paste anything into the GUI.

Any thoughts? I've tried it on Windows 10 1803 (with 32-bit Excel) and 1809 (with 64-bit Excel). SAP is 7400.3.8.3346. Thanks!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on May 08 at 02:15 PM

    Update! Further testing showed that clipboard errors happened in any cross-application scenario I tried: Excel-to-SAP, Excel-to-Word, Notepad-to-Excel... So, it's not an SAP issue.

    But I discovered that I don't get the clipboard errors any more if I login to the Windows 10 PC via Remote Desktop Connection instead of the keyboard/console. I can login, schedule my tasks, disconnect, and they run fine now.

    It breaks again if I unlock the desktop via the keyboard, though, so I guess I'll just never do that again, ever.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 20 at 06:53 PM

    Hi James Porter,

    As per SAP Note: 66971, you can use SAP-GUI 7.6 along with IE11 in your Windows10 system, just saying as you have not mentioned this in your question

    Now, coming back to your actual issue query, the question is when the Windows 10 system is in locked mode, is the system still active, i mean there are laptop settings for Power-Saver to pause any activities or a file download during system is in locked mode to save battery-power

    We also did not get to know your scripting tool details or settings. Meanwhile, please check if a Group-policy is set as below for your windows 10 system by default,

    https://success.panaya.com/Omega/973304981/How-to-set-the-group-policy-for-Panaya-Omega.htm

    Thanks,

    Kaushik

    Add a comment
    10|10000 characters needed characters exceeded

    • Thanks for your reply! Power settings have been ruled out. PCs are plugged in, and set to never go to sleep. Additionally, I can schedule a task for literally 1 minute in the future, lock the PC with a quick control-alt-delete, and stare at the trippy screen saver for a couple of minutes. Then, when I control-alt-delete unlock the PC, I'll see that the Excel VBA script has crashed because the SAP GUI is sitting there with a statusbar error about no parameters having been entered instead of showing the expected results. Scripting tools details: I'm not sure if this is what you're asking, but I use a utility called "Tracker" to record GUI scripts in VBscript. Then, those get transferred into Excel VBA code modules. Then, any Excel VBA subs that needs to be run overnight via Windows Task Scheduler are publicly exposed so they can be executed by a VBS file. Re: policy settings: I won't have permission to tweak any policies, but thank you for suggesting that. If anybody from my help desk ever gets back to me I will suggest that is an area they may want to look.

  • Posted on Feb 20 at 07:13 PM

    Hi James.

    1. Try to use the latest version of SAPGUI either 7.50 or 7.60, Since the SAPGUI 7.40 already end of support.

    2. If possible get the support from Microsoft for windows 10 task schedule, because in Microsoft community so many threads are pointing the same issue but they don't have the answers.

    Regards

    Sriram

    Add a comment
    10|10000 characters needed characters exceeded

    • Thanks for your reply! Sadly, my company computers are very tightly managed and it doesn't look like we have anything newer than 7.40 GUI as an option, but I will ask about it if anyone ever replies to my help desk ticket. :-) Re: support for Microsoft task Scheduler, I'm open to options, but for whatever it's worth, if I schedule a task for 1 minute in the future and DON'T lock my desktop, the script will run fine. It's only failing when the desktop is locked. But since you got me thinking about it, maybe I can rule out the Task Scheduler itself. The Excel application object has a Timer() function of some sort built into it, so after I figure out the syntax to use it, I'll see if that still fails under a locked desktop and report back.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.