Author Topic: how to i make a macro that will disable or enable high contrast  (Read 5722 times)

axonMagnus

  • Jr. Member
  • **
  • Posts: 62
i have tried to make it with voice attacks even tried the recorder and they all dont work , it seems it only works if i press the key physically.

the shortcut for it is [
Code: [Select]
alt+shift+Prtsc]

i look forward to your assistance :D . thank you gentlemen.

Quote

"doubt kills more dreams than failure ever will"

Unknown

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: how to i make a macro that will disable or enable high contrast
« Reply #1 on: July 13, 2016, 10:27:53 PM »
the shortcut for it is
Code: [Select]
alt+shift+Prtsc
It appears that shortcut functions much like Ctrl+Alt+Del, which means it's very difficult to reproduce or intercept(It's designed that way for security reasons).

I tried to find you a workaround, which is a bit of hack, but it does work:
Code: [Select]
Run application 'cmd'
Pause 0,1 seconds
Move mouse cursor to Application Center
Click left mouse button
Quick Input, 'sethc 251[ENTER]'

The only reason I'm clicking in the center of the window, rather than simply focusing on it using "Display window "cmd.exe" as [Normal]" is that for whatever reason it "shrugs off" focus(perhaps to prevent programmatically inputting malicious commands).

"sethc 251" will toggle between high contrast and the previous theme.
Annoyingly, you can't just launch "sethc.exe; It'll run, but won't actually act upon the "251" command.


Very much imperfect, obviously, but functional.

axonMagnus

  • Jr. Member
  • **
  • Posts: 62
Re: how to i make a macro that will disable or enable high contrast
« Reply #2 on: July 20, 2016, 11:48:04 AM »
hey buddy :)  , it tried that and it didnt work http://prntscr.com/bvc79t

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: how to i make a macro that will disable or enable high contrast
« Reply #3 on: July 20, 2016, 12:58:41 PM »
I don't have a Windows 10 machine to test with, but I was under the impression "sethc" was available still. Sorry :-\


EDIT: It probably won't solve your problem, but I hadn't considered this before: You can use a command line argument to execute a command as if you typed it into cmd.

Code: [Select]
Run application 'cmd.exe' -with parameters '/c sethc 251'

This works much better than mucking about with window focus, as you'd expect.
« Last Edit: July 21, 2016, 02:15:18 PM by Pfeil »