topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 4:53 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Release: sWeather (tray-based weather app)  (Read 472547 times)

Brothbeard

  • Supporting Member
  • Joined in 2014
  • **
  • Posts: 13
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #650 on: January 24, 2019, 02:42 AM »
I know it says 1.7.6 but it's actually 1.7.7!

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #651 on: January 24, 2019, 04:58 AM »
And also the changelog in the help/about screen is updated upto 1.7.6, not 1.7.7...

Drugwash

  • Participant
  • Joined in 2009
  • *
  • Posts: 54
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #652 on: January 24, 2019, 05:13 AM »
They're actually icons but I tested with PNG files and got the same results.  I can't win here.
I really don't want to go back to extra loose files if I can help it.
Ah, I remember now how the icons are created. Overly complicated IMHO. However, the Create_xxx_ico() functions look identical between 1.7.5 and 1.7.6+ so there must be some change in the way they are applied or somewhere else.
There is a lot of redundant code in those functions, and most importantly too many LoadLibrary/FreeLibrary on gdiplus.dll and GdiplusStartup/GdiplusShutdown pairs, which are known to be quite slow.


Reminder: date/time still dissapears from titlebar when in TooWindow mode. The tray click is the trigger.
-Drugwash (23 January 2019, 15:05:37)

Still working on this.  Sometimes it goes away, sometimes it stays.  There's really no rhyme or reason to it.

Misbehavior is consistent here. So (in ToolWindow mode):
1. after main window appears and gets populated with data, just click on the condition icon in the tray: the date/time dissapears from titlebar.
2. go to menu > Options > Configure and in the configuration panel just click 'Save': all data is updated and date/time appears again in the titlebar.
3. click the temperature tray icon: date/time stays in titlebar.
4. click the condition tray icon: the date/time dissapears from titlebar.
5. repeat #2 to #4 (#3 may be omitted at will): behavior will be consistent.

I'll look into the code, try to fix it locally and if I succeed I'll send/post the necessary patches. It'd be of great help if I had the original sources including separate libraries instead of a single bulk file but I can manage with that too if needed - it'll just take (much) more time.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #653 on: January 24, 2019, 07:43 AM »
Sorry, all.  As you found out, there was a typo in the changelog and I forgot to update the version number on the webpage.  For now, I've recompiled it, without any changes, to v1.7.7.2.  Changelog and webpage have been updated as well.

@Drugwash: I will fix both issues.

click-click

  • Participant
  • Joined in 2016
  • *
  • Posts: 17
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #654 on: January 24, 2019, 11:53 AM »
Sorry, all.  As you found out, there was a typo in the changelog and I forgot to update the version number on the webpage.  For now, I've recompiled it, without any changes, to v1.7.7.2.  Changelog and webpage have been updated as well.

@Drugwash: I will fix both issues.

Do you have any comments regarding my previous post?
Hello,previously my sweather tray icon ...
« Last Edit: January 24, 2019, 12:11 PM by click-click »

sportman12

  • Participant
  • Joined in 2016
  • *
  • default avatar
  • Posts: 71
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #655 on: January 24, 2019, 01:37 PM »
Can you please tell me the woeid number for Philadelphia I can not seem to find it ?

click-click

  • Participant
  • Joined in 2016
  • *
  • Posts: 17
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #656 on: January 24, 2019, 04:41 PM »
Can you please tell me the woeid number for Philadelphia I can not seem to find it ?
2471217. Follow link in options window for Instructions on finding woeids 
« Last Edit: January 24, 2019, 04:47 PM by click-click »

sportman12

  • Participant
  • Joined in 2016
  • *
  • default avatar
  • Posts: 71
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #657 on: January 24, 2019, 11:08 PM »
I followed the link in options window for Instructions on finding woeids  and messed up everytime I go to configuesweather.PNGRelease: sWeather (tray-based weather app) says above the fix is?
« Last Edit: January 24, 2019, 11:16 PM by sportman12 »

click-click

  • Participant
  • Joined in 2016
  • *
  • Posts: 17
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #658 on: January 25, 2019, 05:58 AM »
This is what I have after updating the config.
sweather0.jpgRelease: sWeather (tray-based weather app)sweather.jpgRelease: sWeather (tray-based weather app)
« Last Edit: January 25, 2019, 06:04 AM by click-click »

click-click

  • Participant
  • Joined in 2016
  • *
  • Posts: 17
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #659 on: January 25, 2019, 06:19 AM »

4. click the condition tray icon: the date/time dissapears from titlebar.

I'll look into the code, try to fix it locally and if I succeed I'll send/post the necessary patches. It'd be of great help if I had the original sources including separate libraries instead of a single bulk file but I can manage with that too if needed - it'll just take (much) more time.

If this gets fixed, could the hover info for the condition show the same info as when hovering over the temp in the systray?
Also, can the temp systray icon be made optional like the condition one?

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #660 on: January 25, 2019, 06:07 PM »
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?

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

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%.

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:

You're welcome and thank you for helping out sportman12 earlier.
« Last Edit: January 26, 2019, 03:05 AM by skwire »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #661 on: January 26, 2019, 03:07 AM »
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

  • Participant
  • Joined in 2016
  • *
  • Posts: 17
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #662 on: January 26, 2019, 05:49 AM »

Which Windows version are you using?

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?

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.
« Last Edit: January 26, 2019, 07:14 AM by click-click »

Drugwash

  • Participant
  • Joined in 2009
  • *
  • Posts: 54
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #663 on: January 26, 2019, 10:42 AM »
@Drugwash, let me know if this fixes the icon display issue, please.
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 [Select]
  1. CoordMode, Mouse, Screen
  2. SetFormat, Integer, H
  3. Menu, Tray, Tip, %A_Space%
  4. Gui, -Caption +ToolWindow +Border +AlwaysOnTop
  5. Gui, Color, White, White
  6. Gui, Add, Text,, This is just a test
  7. Gui, Add, Text, w110 h130 vdbg,
  8. Gui, +LastFound
  9. Gui, Show, Hide
  10. hMain := WinExist()
  11. hCursM := DllCall("LoadCursor", "Ptr", NULL, "Int", 32646, "Ptr")       ; IDC_SIZEALL
  12. OnMessage(0x201, "winmove")     ; WM_LBUTTONDOWN
  13. OnMessage(0x404, "test")
  14. Return
  15. ;================================================================
  16. guioff:
  17. Gui, Hide
  18. Return
  19. ;================================================================
  20. test(wP, lP, msg, hwnd)
  21. ;================================================================
  22. {
  23. Global hMain, custompos
  24. SetFormat, Integer, D
  25. SysGet, m, MonitorPrimary
  26. SysGet, mon, Monitor, m
  27. screenW := monRight-monLeft, screenH := monBottom-monTop
  28. ; ahk_class TrayNotifyWnd1
  29. ; calculate optimal position
  30. WinGetPos,,, gw, gh, ahk_id %hMain%
  31. WinGetPos,,, w, h, ahk_class Shell_TrayWnd
  32. if (w<h)
  33.         z:=w, w:=h, h:=z
  34.  if (x<h)                       ; taskbar vertical-left
  35.         {
  36.         gx := h+10, gy := y+gh>screenH ? screenH-gh-10 : y-8
  37.         pos=taskbar vertical-left
  38.         }
  39.  else if (y<h)  ; taskbar horiz-up
  40.         {
  41.         gx := x+gw>screenW ? screenW-gw-10 : x-8, gy := h+10
  42.         pos=taskbar horiz-up
  43.         }
  44.  else if ((x>h) and y>(screenH-h)) ; taskbar horiz-down
  45.         {
  46.         gx := x+gw>screenW ? screenW-gw-10 : x-8, gy := screenH-gh-h-10
  47.         pos=taskbar horiz-down
  48.         }
  49.  else                           ; taskbar-vert-right
  50.         {
  51.         gx := screenW-h-gw-10, gy := y+gh>screenH ? screenH-gh-10 : y-8
  52.         pos=taskbar-vert-right
  53.         }
  54. GuiControl,, dbg,
  55. (
  56. wP=%wP%
  57. lP=%lP%
  58. msg=%msg%
  59. hwnd=%hwnd%
  60.  
  61. mouse at x%x% y%y%
  62. taskbar w%w% h%h%
  63. screen w%screenW% h%screenH%
  64. %pos%
  65. GUI at x%gx% y%gy%
  66. )
  67. if lP=0x201
  68.         custompos:=0
  69. if custompos
  70.         Gui, Show
  71. else Gui, Show, x%gx% y%gy%
  72. SetTimer, guioff, -3500
  73. }
  74. ;================================================================
  75. winmove(wP, lP, msg, hwnd)              ; WM_LBUTTONDOWN
  76. ;================================================================
  77. {
  78. Global
  79. SetTimer, guioff, off
  80. custompos:=1
  81. DllCall("SetCursor", "Ptr", hCursM)
  82. PostMessage, 0xA1, 2,,, ahk_id %hMain%          ; WM_NCLBUTTONDOWN
  83. }
« Last Edit: January 26, 2019, 10:48 AM by Drugwash »

Mboxer511

  • Participant
  • Joined in 2019
  • *
  • default avatar
  • Posts: 8
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #664 on: January 26, 2019, 08:28 PM »
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.

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

Drugwash

  • Participant
  • Joined in 2009
  • *
  • Posts: 54
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #665 on: January 27, 2019, 02:48 AM »
[…] EXCEPT I noticed the icons in the lower right (for linking to the yahoo website) no longer appear.
Ah, you're right, they're missing here too, and their tooltips are also missing! I was so eager to check the other icons in menus, About box etc that I completely overlooked the statusbar icons. Shame on me.  :-[
Anyway, good news is all others are displayed properly. :)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #666 on: January 28, 2019, 08:55 AM »
For me everything seems fine EXCEPT I noticed the icons in the lower right (for linking to the yahoo website) no longer appear.

Good eye.   ;)

Website & Download
v1.7.9 - 2019-01-28
    ! Statusbar icons were missing.  (Thanks, Mboxer511)


selesn777

  • Participant
  • Joined in 2019
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #667 on: January 30, 2019, 04:22 AM »
Can you please tell me how to set the temperature display only in Celsius?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #668 on: January 30, 2019, 07:19 AM »
I'm late to the party, but just wanted to report sweather is working well here.  -14 degrees, polar vortex country.

Drugwash

  • Participant
  • Joined in 2009
  • *
  • Posts: 54
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #669 on: January 30, 2019, 07:55 AM »
nevermind
« Last Edit: January 30, 2019, 09:08 AM by Drugwash, Reason: someone clearly doesn\'t want me to post code so I\'m outta here »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #670 on: January 30, 2019, 03:33 PM »
Hi, selesn777, and welcome to the DonationCoder site.   :up:

Can you please tell me how to set the temperature display only in Celsius?

From the main sWeather window, choose Options > Configure from the menu.  In the Options window, enable the "Use metric units" option and, optionally, enable the "Add 'C' or 'F' to temperatures" option.





selesn777

  • Participant
  • Joined in 2019
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #671 on: January 30, 2019, 04:31 PM »
From the main sWeather window, choose Options > Configure from the menu.  In the Options window, enable the "Use metric units" option and, optionally, enable the "Add 'C' or 'F' to temperatures" option.

Thanks!  :Thmbsup:

Mboxer511

  • Participant
  • Joined in 2019
  • *
  • default avatar
  • Posts: 8
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #672 on: January 30, 2019, 10:04 PM »
For me everything seems fine EXCEPT I noticed the icons in the lower right (for linking to the yahoo website) no longer appear.

Good eye.   ;)

Website & Download
v1.7.9 - 2019-01-28
    ! Statusbar icons were missing.  (Thanks, Mboxer511)


Everything looks great now! Haven't come across any issues on Windows 8.1. Works just like it did before the change in the API.

On tip I wanted to mention is if anyone is updating the software, if you save the files "config.ini" and "locations.lst" then all your settings will carry over to the new update. So just make a back up of those files, then use them to overwrite the new ones when you install an updated version.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #673 on: January 30, 2019, 11:30 PM »
Everything looks great now! Haven't come across any issues on Windows 8.1. Works just like it did before the change in the API.

Good to hear and thanks for the report.

On tip I wanted to mention is if anyone is updating the software, if you save the files "config.ini" and "locations.lst" then all your settings will carry over to the new update. So just make a back up of those files, then use them to overwrite the new ones when you install an updated version.

Thanks for the tip, though there shouldn't be any need to back up those files beforehand.  The zip file download doesn't contain a config.ini nor a locations.lst, so you can simply unpack the zip file to your sWeather install folder.  Now, that said, one should always have backups.   :Thmbsup:

click-click

  • Participant
  • Joined in 2016
  • *
  • Posts: 17
    • View Profile
    • Donate to Member
Re: Release: sWeather (tray-based weather app)
« Reply #674 on: January 31, 2019, 06:20 AM »
@skwire

Are you considering doing anything about being able to select which icon to use as main as suggested by me and Drugwash?