ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Skwire Empire

Release: sWeather (tray-based weather app)

<< < (133/156) > >>

skwire:
Hello, previously my sweather tray icon would show a weather condition icon such as clouds, sun rain, etc. depending on the weather for my location. Now I only see a square box with the temperature in it. Is there a way to show the nicer weather icons instead and not the temperature?-click-click (January 23, 2019, 04:24 AM)
--- End quote ---

Which Windows version are you using?

I see now there's a checkbox for the weather condition icon that can be enabled/disabled, but how do I hide the temperature icon? I don't need both (need the space). The drop-down in the settings for temperature doesn't include none and there's no enable/disable checkbox for the temperature. :( The hover info for the condition icon doesn't show the same info (less) as the temp icon -click-click (January 23, 2019, 04:24 AM)
--- End quote ---

I'll try to explain this: Natively, an AutoHotkey program can only create one icon in the tray.  Many years ago, a tray library was created that let you add and control additional tray icons.  sWeather uses this library; one of the icons is the native one and one is created by the tray library.  This worked fine until Windows 7+ brought about some significant changes in tray icon handling.  It's apparent that Windows 7+ sees the two icons differently but I have my Windows 7 install set to display all tray icons all the time, so I don't experience any tray icon issues.  However, today, I've been testing sWeather on a Windows 10 install, with both icons enabled in sWeather, and I have no issues using the native Windows 10 tray icon handling to hide/show either icon.  It survives reboots, too.  If you're using Windows 7+, have you tried changing the native tray icon settings?

Regarding the difference in the tray icon tooltips (hover info) this, again, is because of the age of the tray library.  The original library was ANSI only and was not updated to support Unicode when AutoHotkey was updated with Unicode compatibility.  I made changes to the library so it would work at all with Unicode AutoHotkey but, as you see, one of the drawbacks is it cannot display the same amount of textual data.  Why?  Probably something to do with Unicode chars taking two bytes.  At any rate, I was pleased that I got the library working at all in Unicode.  =]

I hope this helps to explain things.

Also the settings GUI button is chopped off at the bottom when using a dpi setting of 125%.-click-click (January 23, 2019, 04:24 AM)
--- End quote ---

I tested this in a VM at 125% DPI and it displays correctly.  On a hunch, what is your screen resolution?

Thanks for getting sWeather working again. :Thmbsup:-click-click (January 23, 2019, 04:24 AM)
--- End quote ---

You're welcome and thank you for helping out sportman12 earlier.

skwire:
Uploaded v1.7.8:

Website & Download
v1.7.8
   + New metric windspeed option to use meters per second instead of the kilometers per hour default.  (Thanks, BG)
    * Rearranged the Options dialog a bit.
    ! Hopefully made the menu and button icons work properly in both Windows XP and Windows 7+.  32-bit colour must be enabled in your Windows display options.  (Thanks, Drugwash)
    ! Fixed the titlebar not always displaying the time.  (Thanks, Drugwash)

@Drugwash, let me know if this fixes the icon display issue, please.

click-click:

Which Windows version are you using?-skwire (January 25, 2019, 06:07 PM)
--- End quote ---

Thanks for the explanation. I currently use Win 7/8/10. This is what I've observed regarding the tray icons:
1. For Win7 and Win8, customizing the individual icons to be shown/hidden will not work if sWeather is active.
   You cannot change the icons independently. If you change one, it automatically changes the action for the other, which
   is why I was always seeing both icons on the taskbar even though others were hidden.
2. On Win10, it doesn't matter if sWeather is active or not when selecting the on/off buttons individually, but
   since I was showing all icons, I was looking for a way to remove the temp icon via the sWeather options.

I found a work-around for win7/8 to only show one icon by exiting sWeather before entering the taskbar customizing menu. Once you do this, you can select the actions for the icons individually. Of course this will not work if showing all icons as with Win10.

Would an option to select which icon becomes the primary one (condition vs. temp) be possible?  Then the hover info would be the same for whichever icon one decides to show.  When choosing it this way, you would not have to display a 2nd icon. Right now the primary icon is fixed at temp. Just a thought and no deal breaker if it's too much work for you. I can live without it. :) I'm still not sure what the benefits of adding additional tray icons are and if even necessary.

I tested this in a VM at 125% DPI and it displays correctly.  On a hunch, what is your screen resolution?
-skwire (January 25, 2019, 06:07 PM)
--- End quote ---

1366 x 768 instead of the 1920 x 1080 which is way to small for my likes.  1366 x 768 at 125% works better for me than using the recommended resolution and a much larger DPI setting.

Drugwash:
@Drugwash, let me know if this fixes the icon display issue, please.
-skwire (January 26, 2019, 03:07 AM)
--- End quote ---
Yes, v1.7.8 is confirmed to work correctly in regard to GUI icons and titlebar date/time. Thank you very much!  :Thmbsup:

Actually I had a reply half-written when I started performing some tests and then power went down for a second, UPS shut down too (low battery) and lost it all. In fact I wanted to suggest precisely the same thing as suggested by click-click above: option to select which icon to use as main:

Main tray icon:
(•) Condition
( ) Temperature
[_] Show additional icon in tray

As for tooltips (remember mine are off at the top for an unknown reason), I've put together a test script for 'fake tooltips', as a demo. Since it uses a regular GUI it can hold any kind of pictures, formatted text, links and so on.
The only thing left to do is to get rid of the original tooltip since AHK doesn't sport a Menu, Tray, NoTip command.

--- Code: Autohotkey ---#PersistentCoordMode, Mouse, ScreenDetectHiddenWindows, OnSetFormat, Integer, HMenu, Tray, Tip, %A_Space%Gui, -Caption +ToolWindow +Border +AlwaysOnTopGui, Color, White, WhiteGui, Add, Text,, This is just a testGui, Add, Text, w110 h130 vdbg,Gui, +LastFoundGui, Show, HidehMain := WinExist()hCursM := DllCall("LoadCursor", "Ptr", NULL, "Int", 32646, "Ptr")       ; IDC_SIZEALLOnMessage(0x201, "winmove")     ; WM_LBUTTONDOWNOnMessage(0x404, "test")Return;================================================================GuiContextMenu:guioff:Gui, HideReturn;================================================================test(wP, lP, msg, hwnd);================================================================{Global hMain, customposSetFormat, Integer, DMouseGetPos, x, ySysGet, m, MonitorPrimarySysGet, mon, Monitor, mscreenW := monRight-monLeft, screenH := monBottom-monTop; ahk_class TrayNotifyWnd1; calculate optimal positionWinGetPos,,, gw, gh, ahk_id %hMain%WinGetPos,,, w, h, ahk_class Shell_TrayWndif (w<h)        z:=w, w:=h, h:=z if (x<h)                       ; taskbar vertical-left        {        gx := h+10, gy := y+gh>screenH ? screenH-gh-10 : y-8        pos=taskbar vertical-left        } else if (y<h)  ; taskbar horiz-up        {        gx := x+gw>screenW ? screenW-gw-10 : x-8, gy := h+10        pos=taskbar horiz-up        } else if ((x>h) and y>(screenH-h)) ; taskbar horiz-down        {        gx := x+gw>screenW ? screenW-gw-10 : x-8, gy := screenH-gh-h-10        pos=taskbar horiz-down        } else                           ; taskbar-vert-right        {        gx := screenW-h-gw-10, gy := y+gh>screenH ? screenH-gh-10 : y-8        pos=taskbar-vert-right        }GuiControl,, dbg, (wP=%wP%lP=%lP%msg=%msg%hwnd=%hwnd% mouse at x%x% y%y%taskbar w%w% h%h%screen w%screenW% h%screenH%%pos%GUI at x%gx% y%gy%)if lP=0x201        custompos:=0if custompos        Gui, Showelse Gui, Show, x%gx% y%gy%SetTimer, guioff, -3500};================================================================winmove(wP, lP, msg, hwnd)              ; WM_LBUTTONDOWN;================================================================{GlobalSetTimer, guioff, offcustompos:=1DllCall("SetCursor", "Ptr", hCursM)PostMessage, 0xA1, 2,,, ahk_id %hMain%          ; WM_NCLBUTTONDOWN}

Mboxer511:
Uploaded v1.7.8:

Website & Download
v1.7.8
   + New metric windspeed option to use meters per second instead of the kilometers per hour default.  (Thanks, BG)
    * Rearranged the Options dialog a bit.
    ! Hopefully made the menu and button icons work properly in both Windows XP and Windows 7+.  32-bit colour must be enabled in your Windows display options.  (Thanks, Drugwash)
    ! Fixed the titlebar not always displaying the time.  (Thanks, Drugwash)

@Drugwash, let me know if this fixes the icon display issue, please.
-skwire (January 26, 2019, 03:07 AM)
--- End quote ---

I've set up this newest version of your app on windows 8.1.  For me everything seems fine EXCEPT I noticed the icons in the lower right (for linking to the yahoo website) no longer appear. Please refer to the screen shots

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version