Ticker: An RSS Scroller

Post your working scripts, libraries and tools for AHK v1.1 and older
LnC
Posts: 5
Joined: 21 Apr 2016, 02:06

Re: Ticker: An RSS Scroller

22 Apr 2016, 01:23

One (hopefully) final question regarding the ticker. It works perfectly in my test enviroment (1600 x 900), it displays the full "head lines" of the local rss feed, but when i use the ticker in my "work" enviroment it doesn't show the full headline, only a portion of it.
Could it be that the resolution in my work enviroment, which is 3840 x 2160, is the one to blame? I can't find something in the script that has something to do with my "problem".
I'll keep on looking and testting, but hopefully you could shed a light on it.
Thanks :D
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: Ticker: An RSS Scroller

22 Apr 2016, 07:59

Windows considers 3840 x 2160 as a high resolution display (who wouldn't ;)) and adjusts the DPI settings so your windows caption don't shrink to nothing (type 'dpi' in your start menu and pres enter to confirm it's above 100%). AHK adheres to this setting by making the labels bigger but the spacing that's determined by the script does not change, resulting in overlap, missing text or even flickering and drawing corruption.

So you need to prevent this scaling from happening. (Untested:) This can be done by changing the properties setting of autohotkey.exe so it doesn't apply the scaling setting (Compatibility tab) or change the script to this specific GUI doesn't scale.
Replace: Gui,+ToolWindow -SysMenu -Caption +LastFound hwndTickerhWnd
with: Gui,+ToolWindow -SysMenu -Caption +LastFound hwndTickerhWnd -DPIScale

An invisible GUI is temporarily created by the GetTextSize() function in order to determine the text width per headline. I think this already does not scale, otherwise there would not be a problem, but it may need adjustment too it above change is insufficient.
carno
Posts: 265
Joined: 20 Jun 2014, 16:48

Re: Ticker: An RSS Scroller

23 Apr 2016, 13:51

I am still using the original script when it was posted first. Are there any latest updates since then?
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: Ticker: An RSS Scroller

24 Apr 2016, 05:49

The first line of the script has the version number (1.09). Nothing has been changed recently.
LnC
Posts: 5
Joined: 21 Apr 2016, 02:06

Re: Ticker: An RSS Scroller

25 Apr 2016, 01:28

I'm currently testing the DPI rule and settings in the script. I will let you know if i run into anything.
Thanks again for the quick response.
LnC
Posts: 5
Joined: 21 Apr 2016, 02:06

Re: Ticker: An RSS Scroller

25 Apr 2016, 03:41

Little feedback from my side.
Changed the DPI in windows to 100%, increased the font size in the script. Also the script reads perfectly from two local rss feeds.
I'm happy for now :dance:
Thanks.
User avatar
moefr01
Posts: 115
Joined: 25 Nov 2015, 09:01
Location: Germany

Re: Ticker: An RSS Scroller

29 Jan 2017, 10:21

Very nice code... Nextron :thumbup:
I was looking for a working smoothy ticker on my Razer Blade Stealth with 3840x2160 pixels and defined 200% display solution. I found out neither -DPIScale nor exe-settings did work (every textline truncated after 3-5 words). In addition the settings of LnC are not my thing, because displayscale must be set with 200%. The only workaround I coded was to change/append the following line:

GetTextSize(pStr, pSize="%TickerTextSize%", pFont="", pHeight=false) { ....
......
---> Return pHeight ? TW "," TH : TW * factor

factor: TW multiplied by a value from 3 to 5 shows the whole textline but adds a big gap between the quotes !

Do you have any idea to cut these gaps effectively?

;) moefr01
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: Ticker: An RSS Scroller

29 Jan 2017, 13:11

Thanks! :D

It's likely the value of factor is too great, causing the text field to be too wide, resulting in white space in excess of the TickerSeperation distance.

Since my DPI scaling is 100% and I didn't want to mess with that :P, I had to wait until I had access to a virtual machine to try something. In addition to the -DPIscale for the Ticker GUI, the GetTextSize() function also requires it to function properly. So remove the factor you've added and add the following line to the top of the function: Gui TextSize:-DPIscale. (I've also applied the changes to the first post code)
User avatar
moefr01
Posts: 115
Joined: 25 Nov 2015, 09:01
Location: Germany

Re: Ticker: An RSS Scroller

30 Jan 2017, 14:21

IT WORKS!!!
I checked my buggy code and rearranged it successfully :dance:

To fulfil my needs I added the following:
- vertical position of the banner with y-value ....... added: TickerGuiY:=2032
- manual height of the banner (new: TickerHeightDif=12 ....... modified: TickerGuiH:=SubStr(TickerGuiH,Instr(TickerGuiH,",")+1)+TickerHeightDif
- make the banner (not the text) fully transparent... nice effect: If TickerBackgroundColorFadeSteps=0 ...=> WinSet,TransColor,TickerBackgroundColor%


Nextron, thank you for your code and hints....... :bravo: :bravo: :bravo:

:wave: moefr01
fenchai
Posts: 292
Joined: 28 Mar 2016, 07:57

Re: Ticker: An RSS Scroller

01 Feb 2017, 21:11

Hi! Are you going to implement more than 1 row Rss feeds?
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: Ticker: An RSS Scroller

02 Feb 2017, 01:37

I have played around with that, but it caused a lot of stutter and even some corruption of the redrawing of the moving text labels. If you want multiple rows, it may be best to run a second copy of the script with a custom offset from the screen edge, equaling the height of the gui of the first instance of the scipt.
fenchai
Posts: 292
Joined: 28 Mar 2016, 07:57

Re: Ticker: An RSS Scroller

02 Feb 2017, 08:35

Nextron wrote:I have played around with that, but it caused a lot of stutter and even some corruption of the redrawing of the moving text labels. If you want multiple rows, it may be best to run a second copy of the script with a custom offset from the screen edge, equaling the height of the gui of the first instance of the scipt.
That may be a bit more troublesome but it makes sense :) thanks I will tinker around. Thanks for great script! It looks very nice above taskbar and always on top.
TVTomy

27 Jan 2018, 16:11

Great ticker! :thumbup:

I use it at home and everything is perfect but unfortunately at the office it doesn't work (the ticker is empty). Could the reason be that we have a proxy-connection at work?

Besides this I wonder if these features are possible:
- right-click on the ticker to switch between "in background" and "always on top"
- mouse over for little more information (feed name, item description, item date)
- new items since previous RSS update in a different color

Thanks for your help!
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re:

27 Jan 2018, 19:08

TVTomy wrote:Great ticker! :thumbup:
Thanks!
I use it at home and everything is perfect but unfortunately at the office it doesn't work (the ticker is empty). Could the reason be that we have a proxy-connection at work?
Probably, it could be your proxy requires authentication which isn't provided by default or perhaps your guided to a captive portal requiring you to agree to a company policy which sets a global access cookie. Try replacing the UrlDownloadToVar function in the code with the one below. It uses a hidden Internet Explorer window to retrieve the RSS, but it's a lot slower, so especially the initial loading will make a difference.

Code: Select all

UrlDownloadToVar(Url){
	;wb := ComObjCreate("InternetExplorer.Application") ;Low security
	wb := ComObjCreate("{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}") ;Medium security
	wb.Navigate(Url)
	;wb.Visible := true
	while wb.busy or wb.ReadyState != 4
		sleep 10
	Html:=wb.document.documentElement.outerHTML
	wb.quit()
	Sleep,500 ;allows closing of IE before the next call
	wb:=""
	return Html
}
Besides this I wonder if these features are possible:
- right-click on the ticker to switch between "in background" and "always on top"
Untested, but below the line #If, MouseOver(TickerhWnd) add
RButton::WinSet,% (TickerTopMostInsteadOfBottom:=!TickerTopMostInsteadOfBottom) ? "Topmost" : "Bottom",,ahk_id %TickerhWnd%
If think this should toggle the behavior when you right click any ticker area (even if another window is covering it :eh: )
- mouse over for little more information (feed name, item description, item date)
I remember wanting to add this feature from the beginning -a small gui showing the item's description- and the description text is even already available in the TickerRssUpdate function, but I didn't implement it since it couldn't make up my mind on how to trigger it (hover/click) or where to show it (fixed area/near cursor).
Let me think on it. It's been a while since I looked at this code.
- new items since previous RSS update in a different color
Nope. That requires each label having its own color. I already wanted each feed to have a separate color (groups of labels), but giving each label its own color while moving it caused weird window rendering issues. So I ended up changing the color of the entire bar when the last item of a feed moves out of view as a better-than-nothing solution.
TVTomy

30 Jan 2018, 06:26

Thanks for the answer!
Nextron wrote:Untested, but below the line #If, MouseOver(TickerhWnd) add
RButton::WinSet,% (TickerTopMostInsteadOfBottom:=!TickerTopMostInsteadOfBottom) ? "Topmost" : "Bottom",,ahk_id %TickerhWnd%
If think this should toggle the behavior when you right click any ticker area (even if another window is covering it :eh: )
Works perfect!
Nextron wrote:Probably, it could be your proxy requires authentication which isn't provided by default or perhaps your guided to a captive portal requiring you to agree to a company policy which sets a global access cookie. Try replacing the UrlDownloadToVar function in the code with the one below. It uses a hidden Internet Explorer window to retrieve the RSS, but it's a lot slower, so especially the initial loading will make a difference.

Code: Select all

UrlDownloadToVar(Url){
	;wb := ComObjCreate("InternetExplorer.Application") ;Low security
	wb := ComObjCreate("{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}") ;Medium security
	wb.Navigate(Url)
	;wb.Visible := true
	while wb.busy or wb.ReadyState != 4
		sleep 10
	Html:=wb.document.documentElement.outerHTML
	wb.quit()
	Sleep,500 ;allows closing of IE before the next call
	wb:=""
	return Html
}
Unfortunately I get an error message:

Error: 0x80004001 - Nicht implementiert

Specifically: documentElement

Line#
---> 323: Html:=wb.document.documentElement.outerHTML


Do you have any idea about this?
phoenixaim
Posts: 2
Joined: 02 Mar 2018, 05:00

Re: Ticker: An RSS Scroller

02 Mar 2018, 06:37

Any help

how this Ticker code can display notepad contents stored at a location.

Much appreciate support on this.
carno
Posts: 265
Joined: 20 Jun 2014, 16:48

Re: Ticker: An RSS Scroller

11 Mar 2018, 10:04

I tested the latest version on my XP and it works great!

AutoHotkey : v1.1.24.04 Unicode 32-bit (Installed)
SystemOS : WIN_XP 32-bit Service Pack 2 v5.1.2600 (WIN32_NT)
phoenixaim
Posts: 2
Joined: 02 Mar 2018, 05:00

Re: Ticker: An RSS Scroller

14 Mar 2018, 15:32

how this Ticker code can scroll content from a notepad file????

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: KruschenZ and 105 guests