Moderators Melba23 Posted May 7, 2015 Author Moderators Posted May 7, 2015 argumentum,Can you please run this code on your setup and let me know what is returned:#include <Array.au3> $tWorkArea = DllStructCreate("long Left;long Top;long Right;long Bottom") DllCall("user32.dll", "bool", "SystemParametersInfoW", "uint", 48, "uint", 0, "ptr", DllStructGetPtr($tWorkArea), "uint", 0) If @error Then ConsoleWrite("Error" & @CRLF) Local $aRight[2] = [DllStructGetData($tWorkArea, "Right"), @DesktopWidth] _ArrayDisplay($aRight, "", Default, 8)M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
argumentum Posted May 7, 2015 Posted May 7, 2015 Can you please run this code on your setup and let me know what is returned:Row|Col 0 [0]|1920 [1]|1920 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Moderators Melba23 Posted May 7, 2015 Author Moderators Posted May 7, 2015 argumentum,Which is obviously not the edge of the second screen. What resolutions do you have?M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
argumentum Posted May 7, 2015 Posted May 7, 2015 (edited) Which is obviously not the edge of the second screen. What resolutions do you have?1920 x 1200 on the 1st one and1920 x 1200 on the 2nd one (same monitor resolutions)edit: I've changed the resolution on the 2nd monitor and the code returns the same. So yes, the code does not return what's expected. Edited May 7, 2015 by argumentum Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted May 7, 2015 Posted May 7, 2015 ; code from http://www.autoitscript.com/forum/topic/82353-dual-monitor-resolution-detection/?do=findComment&comment=590685 0 - L:, T:, R:3600, B:1200 1 - L:0, T:0, R:1920, B:1200 2 - L:1920, T:0, R:3600, B:1050for when I changed the resolution, and now, back to normal ; code from http://www.autoitscript.com/forum/topic/82353-dual-monitor-resolution-detection/?do=findComment&comment=590685 0 - L:, T:, R:3840, B:1200 1 - L:0, T:0, R:1920, B:1200 2 - L:1920, T:0, R:3840, B:1200 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Moderators Melba23 Posted May 7, 2015 Author Moderators Posted May 7, 2015 argumentum,Already been looking there - great minds, eh?Can you run this please and let me know what you get:#include <WinAPIGdi.au3> #include <WinAPISys.au3> #include <Array.au3> Global $aEDM = _WinAPI_EnumDisplayMonitors();$hDC = 0, $tRECT = 0 If @error Then MsgBox(0, 'Error', '_WinAPI_EnumDisplayMonitors') Global $aCoords[$aEDM[0][0] + 1][4] = [["Top", "Left", "Right", "Bottom"]] Global $hDisplay, $tRect For $i = 1 To $aEDM[0][0] $hDisplay = $aEDM[$i][0]; 1 for first handle, 2 for second $tRect = _WinAPI_GetMonitorInfo($hDisplay) If @error Then MsgBox(0, 'Error', '_WinAPI_GetMonitorInfo') $aCoords[$i][0] = DllStructGetData($tRect[1], 'Left') $aCoords[$i][1] = DllStructGetData($tRect[1], 'Top') $aCoords[$i][2] = DllStructGetData($tRect[1], 'Right') $aCoords[$i][3] = DllStructGetData($tRect[1], 'Bottom') Next _ArrayDisplay($aCoords, "", Default, 8)M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
argumentum Posted May 7, 2015 Posted May 7, 2015 Already been looking there - great minds, eh?Can you run this please and let me know what you get:Row|Col 0|Col 1|Col 2|Col 3 [0]|Top|Left|Right|Bottom [1]|0|0|1920|1160 [2]|1920|0|3840|1200 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Moderators Melba23 Posted May 7, 2015 Author Moderators Posted May 7, 2015 argumentum,That code looks like the answer (allowing for my error in labelling the columns) - I will now try and integrate that into a function within the UDF. But please do not hold your breath - I am quite busy for the next few days.M23 argumentum 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Moderators Melba23 Posted May 9, 2015 Author Moderators Posted May 9, 2015 (edited) argumentum,Can you please try this Beta code and see if it works for you - preferably with all 4 $iLocation parameters (0-3). I have tested it successfully with the monitor data you posted above, but nothing beats the real thing. <snip>And if anyone else with multiple monitors wishes to test and comment - please do so.M23 Edited May 10, 2015 by Melba23 Beta code removed Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
argumentum Posted May 9, 2015 Posted May 9, 2015 (edited) argumentum,Can you please try this Beta codeto take this snapshot, instead of my PC, where it behaved as shown, I used a virtual PC and added a 2nd monitor, as to have small screens that would fit in the space of this postEdit: The way you can test with 1 monitor would be to change @DesktopWidth to $DesktopWidth = @DesktopWidth / 2 unless you wanna push everything to the edge, then , use ProgramManager WinGetPos Edited May 9, 2015 by argumentum Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Moderators Melba23 Posted May 10, 2015 Author Moderators Posted May 10, 2015 (edited) argumentum,Sorry, I left a @DeskTopWidth in the location formula for the "click to bring onto screen" notifications rather then using the new calculated value I used for the others. Please try this modified version: <snip>M23 Edited May 11, 2015 by Melba23 Beta code removed argumentum 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
argumentum Posted May 10, 2015 Posted May 10, 2015 argumentum,Sorry, I left a @DeskTopWidth in the location formula for the "click to bring onto screen"all good Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted May 10, 2015 Posted May 10, 2015 please make the while loop in the example While $aNotify_Data[0][0] :) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Moderators Melba23 Posted May 10, 2015 Author Moderators Posted May 10, 2015 argumentum,Delighted that it works for you - I will release a new version soon. And the example is just that - an example - so feel free to change it for yourself.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Moderators Melba23 Posted May 11, 2015 Author Moderators Posted May 11, 2015 [NEW VERSION] - 11 May 15Changed: New code to cater for multiple monitors. Thanks to argumentum for the idea.New UDF in the first post.M23 argumentum 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
ringerl Posted May 22, 2015 Posted May 22, 2015 TheDcoder,And all you did was click on the notifications in very quick succession? If so, then it sounds like this bug report from last year which I could not reproduce. I will look again at how I might prevent the UDF from producing such an error.M23Hi Melba23!I experience the same problem when closing multiple notifications in rapid succession, AutoIt usually crashes.
ringerl Posted May 22, 2015 Posted May 22, 2015 Another thing that I don't get - default auto-sizing Notify dimensions are set, but with title or text too long to fit in the notification it gets discared/not shown without any warning.It would be nice to have the content truncated or resized if it doesn't fit.
Moderators Melba23 Posted May 22, 2015 Author Moderators Posted May 22, 2015 ringer1,Does this happen with the latest version of the UDF? I rewrote it so that clicking on a notification while another was still reacting to a previous click had no effect.I will look into the auto-sizing code and see what I can do.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
ringerl Posted May 22, 2015 Posted May 22, 2015 Melba23, I've just a few minutes ago rebuilt the tool with the latest UDF and will investigate further.
Moderators Melba23 Posted May 22, 2015 Author Moderators Posted May 22, 2015 ringer1,At present, the UDF returns an error if the title/text is too long to fit in the widest allowable notification - so you do get a warning that the notification will not appear if you code your script to check for this. I will look into how I might allow for truncated title/text as an option.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
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