Jump to content

how can i turn off only the second monitor


Go to solution Solved by MagnumXL,

Recommended Posts

  • Developers
Posted (edited)

Push the power button?

.. or is your question about something else?

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Posted (edited)
On 4/29/2024 at 4:52 PM, Jos said:

Push the power button?

.. or is your question about something else?

I need the code in Autoit to do that

Edited by Netol
Link to comment
Share on other sites

Posted (edited)
On 4/29/2024 at 6:50 PM, Nine said:

Or you can use my example :

 

 

Your information does not solution my problem, but help me in other question that i have.

Thanks a lot

 

Edited by Netol
Link to comment
Share on other sites

11 hours ago, Netol said:

Your information does nat solution my problem

Unless I don't understand what turn off monitor means, my example (read the entire post) does toggle monitor on/off (look at 0xD6 vcp code)...

Link to comment
Share on other sites

On 4/30/2024 at 7:43 AM, Nine said:

Unless I don't understand what turn off monitor means, my example (read the entire post) does toggle monitor on/off (look at 0xD6 vcp code)...

 

On 4/30/2024 at 7:43 AM, Nine said:

Unless I don't understand what turn off monitor means, my example (read the entire post) does toggle monitor on/off (look at 0xD6 vcp code)...

Hi my friend,

 

Your information is very god, but i cant turn off only the second monitor with autoit code.

I don't know how to modify the code you sent me to turn off only the second monitor

Link to comment
Share on other sites

Posted (edited)

Sorry I will not write the code for you.  You will never learn how to program in AutoIt if all you want is already written code that fits your requirements.  We are here to teach how to fish, not to give you fish.

You will have to make an effort and post the code you have tried that does not work.  Everything you need is inside the example I showed you.

ps. Do not reproduce the same code as I gave you, I will simply ignore your post.

Edited by Nine
Link to comment
Share on other sites

I have a similar situation but I am using just the secondary monitor and I use displayswitch. If you are on Win 11 (probably available on other OSs) then you can use this:

ShellExecute('DisplaySwitch.exe', '/internal', @WindowsDir & '\Sysnative', Default, @SW_HIDE)

This will turn on primary display and turn off all other displays.  You have here the full syntax:

Quote
Syntax
      DISPLAYSWITCH /Option

Options

       /internal    Switch to use the primary display only.
       1            All other connected displays will be disabled. 

       /clone       The primary display will be mirrored on a second screen.
       2        

       /extend      Expand the Desktop to a secondary display.
       3            This allows one desktop to span multiple displays. (Default).

       /external    Switch to the external display only (second screen).
       4            The current main display will be disabled.

 

When the words fail... music speaks.

Link to comment
Share on other sites

4 hours ago, Andreik said:

I have a similar situation but I am using just the secondary monitor and I use displayswitch. If you are on Win 11 (probably available on other OSs) then you can use this:

ShellExecute('DisplaySwitch.exe', '/internal', @WindowsDir & '\Sysnative', Default, @SW_HIDE)

This will turn on primary display and turn off all other displays.  You have here the full syntax:

 

Thanks a lot my friend.

 

When i put your code the windows display this new windows with this options.

image.png.7ebd7b1299cd7c20f6563adf19f87410.png

probably my requirement is much more technical.

Thanks a lot but the second monitor is not offline

 

Link to comment
Share on other sites

It's nothing technical, it looks like the application start without being aware of the passed argument. Try using numerical arguments (see the previous post).

When the words fail... music speaks.

Link to comment
Share on other sites

On 5/2/2024 at 8:45 AM, Andreik said:

It's nothing technical, it looks like the application start without being aware of the passed argument. Try using numerical arguments (see the previous post).

Ok my friend.

Thanks

 

best regards

Link to comment
Share on other sites

  • Solution

Years ago, I made a program with Autoit3 to turn off the monitors of any PC I was connected to remotely, Autoit3 can turn off any one or more monitors on a PC natively with no third-party solution needed although, if I recall correctly, it will need to be run as administrator. I recommend this post to get started.

Link to comment
Share on other sites

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...