Netol Posted May 28, 2024 Posted May 28, 2024 hy my friend, just to ask How to open Explorer in a first monitor (i have two) ShellExecute(@ScriptDir ) this command open the windows explorer in the second monitor
donnyh13 Posted May 28, 2024 Posted May 28, 2024 Until somebody actually experienced in this chimes in, I will add my minor comment. I don't think you can choose which monitor the window opens in, however, as a suggestion you could quickly move the program to the other monitor, once the program opens. For dual monitors, you could look at forum topics such as the below to help in moving the program to the desired monitor using WinMove. https://www.autoitscript.com/forum/topic/113584-winmove-second-screen/ https://www.autoitscript.com/forum/topic/204441-multiple-monitors-how-to-modify-script-to-keep-app-on-current-monitor-instead-of-defaulting-back-to-first-monitor/ Netol 1 LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."
Solution ioa747 Posted May 28, 2024 Solution Posted May 28, 2024 take a test, how it works for you Run("Explorer " & @MyDocumentsDir) ConsoleWrite("@DocumentsCommonDir=" & @MyDocumentsDir & @CRLF) Local $hWnd = WinWaitActive("Documents") ConsoleWrite("$hWnd=" & $hWnd & @CRLF) WinMove($hWnd, "", -7, 0, @DesktopWidth / 2, @DesktopHeight - 40) Look at: WinAPI_GetWorkArea() 210826-moves-andor-resizes-and-arrange-windows-between-multi-monitors/ donnyh13 and Netol 2 I know that I know nothing
Netol Posted May 28, 2024 Author Posted May 28, 2024 Thanks a lot ioa747 i modified your code and this working fine! best regards ioa747 1
Netol Posted May 28, 2024 Author Posted May 28, 2024 5 hours ago, donnyh13 said: Until somebody actually experienced in this chimes in, I will add my minor comment. I don't think you can choose which monitor the window opens in, however, as a suggestion you could quickly move the program to the other monitor, once the program opens. For dual monitors, you could look at forum topics such as the below to help in moving the program to the desired monitor using WinMove. https://www.autoitscript.com/forum/topic/113584-winmove-second-screen/ https://www.autoitscript.com/forum/topic/204441-multiple-monitors-how-to-modify-script-to-keep-app-on-current-monitor-instead-of-defaulting-back-to-first-monitor/ thanks a lot donnyh13 Your information is very god best regards donnyh13 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now