4 posts in this topic
I recently upgraded my laptop to one with Windows 10 and higher screen resolution. In the process I found that some of my scripts did not work right when using Autoit's @DesktopWidth and @DesktopHeight macros. Insteat of 1920 x 1080 resolution Autoit detects 1536 x 864. Thus, GUIs designed to appear near the right edge of the screen displayed closer to the horizontal middle of the screen. I assume others may have the same problem.
A search on this forum and Microsoft Script Center helped me to write the following script that gets the true screen width and height from WMI.
MsgBox(0, '', _GetMonitorInfo())
Local $oWMI, $Listing, $sWidth = 0, $sHeight = 0
$oWMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2")
If IsObj($oWMI) Then
$Listing = $oWMI.ExecQuery("SELECT * FROM Win32_DesktopMonitor")
If IsObj($Listing) Then
For $oItem In $Listing
$sHeight = $oItem.ScreenHeight
$sWidth = $oItem.ScreenWidth
Return "Width: " & $sWidth & @CRLF & "Height: " & $sHeight
Hopefully it will benefit others. I for sure am very happy with all the samples I been able to find here in the past.
I am working at a script (thanks @Chimp for the help on my previous thread) operating on Firefox, based on two time-set loops that are doing the same operations with some differences.
Now I need to execute a local video at a determinated hour (between 12 and 4).
My question is
What is the best way to determine a precise hour (hh:mm)? I tried
While @Hour >= 12 & @MIN >= 00 And @HOUR <= 14 & @MIN < 30 But the loop is being ignored, although in the moment I use only @Min for my tests everything works fine.
This is the essential - and working - structure of the present script:
#include <ff.au3> _FFStart() While @MIN >= 00 And @MIN < 30 ; 1st Firefox loop Firefox url loop (contains functions and if conditions) WEnd ;Open a new tab and runs a local video; While @MIN >= 32 And @MIN <= 59 ; 2nd Firefox loop Firefox url loop (contains functions and if conditions) WEnd Thanks in advance
Happy Friday everyone!
I would like to ask a pretty basic question, precisly whats the different between @ScriptDir and @AppDataDir? I know that @ScriptDir is the path for where the script (compiled/uncompiled version) is. Just today I read around some of the codes posted, and to me they seem to be similar after I read the help file. I didn't want to ask it in PM from the poster of the code where I read it
Sorry for the elemetary question, and thank you for the enlightenment!