Author Topic: Windows tablet - lock/turn off screen  (Read 3604 times)

Shinobi

  • Guest
Windows tablet - lock/turn off screen
« on: October 22, 2018, 12:16:24 PM »
Hi guys,

has anyone experience in using voiceattack with a windows tablet?

1.) Is it possible to bind a command to turn off the screen and lock the device?

2.) Is voiceattack running and listening also when the device is locked and can it turn on the screen automatically?

I wanna build a smart mirror, thats why i have this specific use case. Any feedback or suggestions are welcome!

Thanks a lot!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Windows tablet - lock/turn off screen
« Reply #1 on: October 22, 2018, 12:30:24 PM »
1.) Is it possible to bind a command to turn off the screen and lock the device?

Have you tried the "Lock Workstation" option of the "Windows Miscellaneous Functions" action(found under "Other >", "Windows ⯈", "Windows Miscellaneous Functions")?

Shinobi

  • Guest
Re: Windows tablet - lock/turn off screen
« Reply #2 on: October 22, 2018, 04:02:56 PM »
thanks, i will check that out. any idea about VA activity when the device is locked?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Windows tablet - lock/turn off screen
« Reply #3 on: October 22, 2018, 04:49:36 PM »
Having a quick look at it, the speech engine itself actually stops working when the screen is locked, so VoiceAttack can't recognize speech on the lockscreen(this is a limitation of the Microsoft Speech Recognition Engine, not VoiceAttack itself).

Shinobi

  • Guest
Re: Windows tablet - lock/turn off screen
« Reply #4 on: October 24, 2018, 01:47:14 PM »
thats actually not such a big problem. for the unlock i will probably use a finger print reader anyway. the locking/turn off screen function is more important. i will test it in the next few days...

courtier

  • Newbie
  • *
  • Posts: 1
Re: Windows tablet - lock/turn off screen
« Reply #5 on: January 01, 2020, 03:52:23 PM »
I'm using the C# command execution to switch off monitor



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

public class VAInline
{
   [System.Runtime.InteropServices.DllImport("user32.dll")]
   public static extern IntPtr SendMessage(int hWnd, int Msg, int wParam, int lParam);
   
   public void main()
   {
      SendMessage(0xFFFF, 0x0112, 0xF170, 2);
   }
}