Jump to content

jrsofsd

Active Members
  • Posts

    29
  • Joined

  • Last visited

Everything posted by jrsofsd

  1. The function _WinAPI_FormatMessage() in the include file WinAPI.au3 appears to have an unused line of code: If $sBufferType = "wstr" Then $pBuffer = $aResult[5]
  2. RunningStats calculates running (moving) statistics: Standard Deviation, Variance, and Mean . The single function _RunningStats(), queries, clears, restores, or adds to the running statistics. Example.au3 adds 7 samples of data to running statistics and displays the results using _ArrayDisplay(). Example-Persistent-Storage.au3 adds the first 6 samples to the running statistics and stores the results in an INI file. The data is read from the INI file and restored to the running statistics. The 7th sample is added and the results displayed, matching the results from Example.au3. Credits: John D. Cook for his article "Accurately computing running variance" at http://www.johndcook.com/blog/standard_deviation/ RunningStats.zip
  3. Hi Melba I've read the ExtMsgBox and StringSize code more than I had ever planned. Now I'm curious as to why there two different methods of retrieving the "default" (message box) font data. ExtMsgBox retrieves name and size from the Autoit theme specific "font used to display messages in a message box" - MessageFont in Non-Client Metrics StringSize retrieves the font metrics for the system "font used in message boxes" - TMT_MSGBOXFONT in GetThemeSysFont function Do you mind commenting?
  4. Hi Melba All The examples work fine (except as the last, as expected). Nice bit of detective work, especially since the Stackoverflow post just states that Windows lies, not how to compensate for the lie! I like the use of the ternary operator.
  5. Hi Melba Thanks for sticking with me on this My assumption was that both of us were "correct" The latest code works fine on my 800x600 custom Aero theme with 125% DPI scaling. My graphics setup is outside the mainstream but not by choice. I'm legally blind, and do everything I can to make text legible and still have a usable system. The way I see it (insert joke here) I'm a good test case. Thanks again for some code I can't work without, especially StringSze and GuiListViewEx!
  6. Hi Melba A can of worms. I performed the following: Drivers - Updated my graphics drivers to the current release. Fonts - Control Panel -> Fonts -> Font Settings -> Restore default font settings DPI - Set to 100 (default), The title was still truncated, so I changed themes. Once I discovered that the Windows 7 Basic theme worked, I tried changing the following settings in a failing theme: Cleartype - on/off. No change. DPI - "Use Windows XP style DPI scaling" had no effect. Resolution - I tested with 800x600, 1024x768, and 1280x1024. No change in results. Again, of the themes I tested, only Windows 7 Basic displayed the title without truncation. All tested Aero themes failed. Note that the info for #1 and #3 is identical, but #1 is OK and #3 fails. Non-Aero Themes 1. Windows 7 Basic - OK: aTitleSize string: OCR Detection Status aTitleSize height: 15 aTitleSize Rwisth: 113 aTitleSize Rheight: 19 Default Font Name: Segoe UI Default Font Size: 9 Font Name: 9 Font Size: Segoe UI iMsg_Width minus 70: 80 g_aEMB_Settings[7]: 500 g_aEMB_Settings[12]: 67 Dialog Width: 180 2. Windows Classic - Failed: aTitleSize string: OCR Detection Status aTitleSize height: 13 aTitleSize Rwisth: 105 aTitleSize Rheight: 17 Default Font Name: Tahoma Default Font Size: 8.5 Font Name: 8.5 Font Size: Tahoma iMsg_Width minus 70: 80 g_aEMB_Settings[7]: 500 g_aEMB_Settings[12]: 50 Dialog Width: 155 Aero Themes (all tested Aero themes failed). 3. Aero - Windows 7 - Failed: aTitleSize string: OCR Detection Status aTitleSize height: 15 aTitleSize Rwisth: 113 aTitleSize Rheight: 19 Default Font Name: Segoe UI Default Font Size: 9 Font Name: 9 Font Size: Segoe UI iMsg_Width minus 70: 80 g_aEMB_Settings[7]: 500 g_aEMB_Settings[12]: 67 Dialog Width: 180 4. Aero - High Contrast #1 - Failed: aTitleSize string: OCR Detection Status aTitleSize height: 13 aTitleSize R width: 105 aTitleSize R height: 17 Default Font Name: Microsoft Sans Serif Default Font Size: 8.5 Font Name: 8.5 Font Size: Microsoft Sans Serif iMsg_Width minus 70: 80 g_aEMB_Settings[7]: 500 g_aEMB_Settings[12]: 52 Dialog Width: 157 5. Aero - Architecture - Failed: 6. Aero - Nature - Failed: I refuse to apologize for the formatting, this new editor is seriously crippled. A step backwards.
  7. Melba I changed my DPI setting to 100% (default) and tried the test at 800x600 screen resolution: aTitleSize[2]: 113 iMsg_Width minus 70: 80 g_aEMB_Settings[7]: 500 g_aEMB_Settings[12]: 67 Dialog Width: 180 The results were the same for 1024x768 and 1280x1024. Is it possible you posted the wrong modified script? I won't be able to test again until Monday...
  8. Hi Melba This is the data on my system immediately after the line starting with "Local $aTitleSize =" aTitleSize[2]: 142 iMsg_Width minus 70: 80 g_aEMB_Settings[7]: 500 g_aEMB_Settings[12]: 83 The dialog width is adjusted in the line after "; Adjust dialog width up to absolute dialog width value". The adjusted width: Dialog Width: 225 The window width as measured with Autoit Window Info is 231, the "bang" icon is 32x32. Hope this helps.
  9. Hi Melba I did use an icon, 64. I'm sure the different results are explained by my non-standard DPI settings. I'll post some diagnostic info in a few hours.
  10. Hi Melba You make good points. I was perhaps a bit myopic since the only "editable" column in my application is a 2-element read-only combo! I think you would understand my request better if you saw my application. If you're interested, let me know whether your environment is 32 or 64 bit I'll send you an EXE in a ~week (going out of town; no coding
  11. Hi Melba The examples work fine, but title = "OCR Detection Status" and text = "Connected" fails.
  12. Hi Melba I have an easy feature - double-clicking on a read-only 2 element combo is logically just a toggle; no dropdown list is required. The only changed function is _GUIListViewEx_EditProcess(); I coded it the way I thought you would. I'm assuming that it's better to upload the changed GuiListViewEx.au3 in a ZIP file rather than use a code box for this amount of code. GUIListViewEx.zip
  13. Hi Melba It would be nice if Extended Message Box didn't truncate long titles when the text is short. I hesitate to provide an example as my monitor DPI setting is non-standard, and it's trivial to recreate the effect. My apologies if this subject has been covered before but you can appreciate the difficulty in searching for "title" and/or "width" in this topic!
  14. Thank you Authenticity! I'm very impressed that you would write this code in response to a question.
  15. Hi Guiness Thanks for the compliment re the question I suspected the function return datatype was abstracted, but the use of a handle had me wondering. If the variable was named "$v" (Variant) instead of $h (Handle) the datatype abstraction would have been clear to me. However, now that I've done some research, "handle" is entirely appropriate: Win32 API Computing Until I did the research I was going to suggest a new datatype: $u (UDF abstract return value). Now that my old school beliefs about handles have been, uh, updated, I'm on board. BTW, it takes a special programmer to rewrite code, especially "working" code.. We all learn and get better but it's the special mind that revisits old code when there's SO much new code to write! Kudos. P.S. Yes, I'm interested in following the discussion.
  16. Hi Guiness Thanks for the UDF - it saved me the coding and debugging! BTW, why is the array returned from _GUICtrlMenu_RecentCreate() called a handle rather than an array? I know it doesn't make any difference, but I'm curious re the coding (naming) style. Thanks.
  17. First, all credit goes to Zedna! One of my projects has TWO Listviews, and I wanted to add ToolTips to both of them. I've modified Zedna's example to accommodate multiple Listviews with ToolTips with the function _ListView_ToolTips() in ListView_ToolTips.au3. The function takes two parameters: a 0-based 1D or 2D ToolTip array and the ID of the Listview control. Create a 1D array of ToolTips if the Listview has one column, a 2D array if the Listview has multiple columns. Row zero is for header ToolTips. The function is called in the GUIGetMsg() Loop; this code snippet handles ToolTips for 2 Listviews: While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_MOUSEMOVE If Not _ListView_ToolTips ( $aToolTips2D_Gems, $idListView_Gems ) Then _GUICtrlStatusBar_SetText( $StatusBar, StringFormat("Gems _ListView_ToolTips error: %d", @error) ) EndIf If Not _ListView_ToolTips ( $aToolTips2D_Cats, $idListView_Cats ) Then _GUICtrlStatusBar_SetText( $StatusBar, StringFormat("Cats _ListView_ToolTips error: %d", @error) ) EndIf EndSwitch WEnd I've included 5 example scripts, of which the most interesting is: "2 X 2D Listview - Header Item Subitem ToolTips.au3". This example GUI has two multi-column Listviews with ToolTips. ListView_ToolTips.zip
  18. Hi guinness I made the same "mistake" as an another poster - I assumed the latest version of _Startup (or any other UDF) was located in the ZIP file. I'm aware this is probably not the right place to broach this, but since you're friendly, responsive, and influential I'm going to take a chance. How does one update a ZIP file? My searches didn't turn up anything. Shouldn't UDF's be managed on GitHub or SourceForge, with version control? Experimental modifications to stable UDF's could easily be "released", but labeled as purely experimental. I favor limiting code embedded in posts to fragments rather then complete UDF's. I look forward to seeing your comments! BTW, your newly coded version of _Startup() was very instructive, especially your use of "Local Const".
  19. Hi guinness Thanks for adding _StartupFolder_Install() and expecially _StartupRegistry_Exists(); much appreciated jrs
  20. Thanks guinness for this very useful script! Could you add 2 functions to test whether a startup entry already exists in a startup folder or registry location? Those functions would be useful to me and perhaps to others as well. jrs
  21. Thanks guinness for this very useful script! Could you add 2 functions to test whether a startup entry already exists in a startup folder or registry location? Those functions would be useful to me and perhaps to others as well. jrs
  22. M23, Thanks for the great utility. It wasn't my intention to maintain a sepatate version of Toast but it it IS your code! It would be immensely helpful if you could notify me when a new version of Toast is avaiable. BTW, would it make sense to remove the Return statement at the end of the 'Case Default' for the '$vJust' parameter in _Toast_Set() (line 101)? Since setting '$vJust' to 'Default' sets all remaining parameters to their defaults, a statement like this: _Toast_Set(Default, -1, -1, -1, -1, -1, -1, 3) would set ths first 7 parameters to their defaults and specify that the Taskbar is on a secondary monitor to the left. Just a thought... jrs
  23. Thaniks Polymath for catching the error! I couldn't find a way to update my original post with a fixed zip so I'm reposting... Toast.zip
×
×
  • Create New...