Windows 10 blocks send keystrokes?

Discuss RoboTask here

Windows 10 blocks send keystrokes?

Postby chris.james » Mon Jan 14, 2019 7:02 pm

I've had Robotask for a couple months now and I really like it. But I've just moved to a Windows 10 from a Windows 7 PC and the "send keystrokes" part of my tasks do not work anymore when my PC is locked?
Anyone else had this issue and how can I fix it? Thanks!
chris.james
 
Posts: 11
Joined: Fri Oct 26, 2018 9:45 pm

Re: Windows 10 blocks send keystrokes?

Postby Oleg » Mon Jan 14, 2019 9:37 pm

But I've just moved to a Windows 10 from a Windows 7 PC and the "send keystrokes" part of my tasks do not work anymore when my PC is locked?

I can say that Send keystrokes and mouse actions doesn't work when PC is locked on Windows 7 too.
System ignores mouse and keyboard simulation within locked session. This is the property of system security
Oleg Yershov
Oleg
Site Admin
 
Posts: 2380
Joined: Thu Jan 01, 1970 1:00 am

Re: Windows 10 blocks send keystrokes?

Postby chris.james » Mon Jan 14, 2019 10:16 pm

It worked fine on my Windows 7 system, but maybe I had something enabled or disabled on it that allowed it to work? Any suggestions of how I can get around this?
chris.james
 
Posts: 11
Joined: Fri Oct 26, 2018 9:45 pm

Re: Windows 10 blocks send keystrokes?

Postby Oleg » Mon Jan 14, 2019 10:34 pm

maybe the session was not locked
System ignores keyboard simulation on Windows 7 when session is locked. This is exact information.
Press Win+L to lock the session and try the task on Windows 7
Oleg Yershov
Oleg
Site Admin
 
Posts: 2380
Joined: Thu Jan 01, 1970 1:00 am

Re: Windows 10 blocks send keystrokes?

Postby chris.james » Mon Jan 14, 2019 11:08 pm

OK thanks. I have decided to go a different route and I built a macro to save and close the workbook. I have added the Excel run macro action and then I log off to see if it will work, but I keep getting an error message that says "Excel object doesn't exists. Open Document first" but the document is open. I set this action up just like the instructions on your website says.
chris.james
 
Posts: 11
Joined: Fri Oct 26, 2018 9:45 pm

Re: Windows 10 blocks send keystrokes?

Postby chris.james » Mon Jan 14, 2019 11:47 pm

I finally got this working by using the regular "Open Excel document" action first instead of the command line open. It works perfectly now even when my PC is locked! Thank you for the awesome software!
chris.james
 
Posts: 11
Joined: Fri Oct 26, 2018 9:45 pm

Re: Windows 10 blocks send keystrokes?

Postby Oleg » Tue Jan 15, 2019 9:45 am

...but I keep getting an error message that says "Excel object doesn't exists. Open Document first" but the document is open...

I finally got this working by using the regular "Open Excel document" action first instead of the command line open.

Yes of course. You have to use Open Excel document action before you use any other Excel actions
Oleg Yershov
Oleg
Site Admin
 
Posts: 2380
Joined: Thu Jan 01, 1970 1:00 am

Re: Windows 10 blocks send keystrokes?

Postby chris.james » Fri Jan 18, 2019 9:44 pm

Ok, I thought it was working properly, however it is only partially working.
The task opens the excel spreadsheet and after my "pause" commands, it saves, closes and emails the spreadsheet as it should. However, nothing actually updates while the PC is locked. Macros and VBA code doesn't run and neither does data automatically refresh as it does when the PC is unlocked. Is there anyway to allow these macros and VBA code and auto data refresh to work while PC is locked?
I've cut off macro security within Excel and made sure it is located in a trusted location, but it still will not update properly.
chris.james
 
Posts: 11
Joined: Fri Oct 26, 2018 9:45 pm

Re: Windows 10 blocks send keystrokes?

Postby Oleg » Mon Jan 21, 2019 11:34 am

Unfortunately I can say nothing without your task... Also I want to see the Excel document with your macros
Excel actions should work in locked session.
Oleg Yershov
Oleg
Site Admin
 
Posts: 2380
Joined: Thu Jan 01, 1970 1:00 am

Re: Windows 10 blocks send keystrokes?

Postby Rukbunker » Tue Jan 22, 2019 12:36 pm

Just my 2 cents on this topic. Maybe it gives you some ideas.

We have about 30 tasks which all do practically the same. Opening Excel, execute a macro, wait for a pixel, and closes the file. In our case we don't use the "Excel" features in Robotask. We just do a application opening the file.

Robo1.PNG
Robo1.PNG (19.13 KiB) Viewed 172 times

Our macro in Excel has a shortcut key assigned, in our case Control+M. This is only of the few shortcuts which is normally not used in Excel. Step 6 (see screenshot) wait until a certain pixel is there and therefore the document is loaded. Step 7 triggers the shortcut-key to execute the macro. At the end of the macro, a file in %Appdata% will be generated. Robotask wait until that file appears (Step 8).

Code: Select all
Sub Check_File()
'
' Check_File Macro
'
   
  Dim fileName As String, textData As String, textRow As String, fileNo As Integer
    fileName = Environ("AppData") & "\ExcelMacroFinished.txt"
    fileNo = FreeFile 'Get first free file number
    textData = ""
    Open fileName For Output As #fileNo
    Write #fileNo, textData
    Close #fileNo
'
End Sub


At the end an Alt+F4 and the work is done. It works great.
Using version 7.2.0.955
Rukbunker
 
Posts: 80
Joined: Mon Feb 22, 2016 4:06 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: Bing [Bot] and 12 guests

cron