topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Saturday December 14, 2024, 5:43 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: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard  (Read 21335 times)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« on: September 23, 2020, 09:30 AM »
NANY 2021 Entry Information

Application Name ClipURLCleaner
Short Description Cleans URLs in your clipboard automatically
Supported OSes Tested on macOS and Windows 10, might work elsewhere
Web Page https://code.rosaele...n.org/clipurlcleaner
Download Link Attached
Version History
  • Update 2: Fixed Windows tray icon.
  • Update 1: Fixed Windows 10 start.
  • Initial version.


Description
Problem:
Sharing shortened URLs like bit.ly/whatever or URLs with trackers like ?utm_something=abc (or even both) is annoying.

Solution:
Watch the clipboard and clean URLs automatically.

Screenshots
Bildschirmfoto 2020-09-23 um 16.07.18.png

Known bugs:
The tool won’t work behind a corporate proxy.
« Last Edit: October 10, 2020, 03:49 AM by Tuxman »

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #1 on: September 24, 2020, 04:17 AM »
Trying to start the Windows Version does open my WebBrowser with this content.

I do not know exactly what causes that...
Single file scan with Window Defender say: nothing bad found.

For now I am unable to run it.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #2 on: September 24, 2020, 04:41 AM »
 :huh:

Fix your “security” software?  :-[

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #3 on: September 24, 2020, 05:26 AM »
How do I "fix" Windows Defender would be my next question... this is the first application where such thing happened.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #4 on: September 24, 2020, 05:29 AM »
Disable it. Instant security improvement. Seriously, virus scanners are pointless overhead.
Else, I’m pretty sure that there must be a way to declare the .exe as harmless.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #5 on: September 24, 2020, 05:42 AM »
I do not have things that I need on this sytem to check.
Does your .exe file has a windows manifest integrated? <- that would be my first step
When I am at home I do examine your .exe more deeply, maby patch & upload it so you might be able to reproduce.

Tell a User to disable Windows built-in Software can't be a solution.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #6 on: September 24, 2020, 05:50 AM »
Does your .exe file has a windows manifest integrated? <- that would be my first step

Not yet. But good point.

Here’s clipurlcleaner.exe.manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="ClipURLCleaner" type="win32"/>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
        </dependentAssembly>
    </dependency>
</assembly>

Does it work for you? If so, I might embed it.

(I wonder why my Windows 10 has not complained then.)

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #7 on: September 24, 2020, 09:15 AM »
(I wonder why my Windows 10 has not complained then.)
Windows 10 appears to be a many headed beast :-\
Tom

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #8 on: September 25, 2020, 01:35 AM »
Does it work for you? If so, I might embed it.

(I wonder why my Windows 10 has not complained then.)

Yesterdays research result:
I was not able to add/modify resource section of the .exe since it has none.
On my home pc all works fine!
My workstations Windows Defender is configured/fixed/static/unchangable to block "strange" files.

Testing as external manifest file isnt able aswell since I cannot modify system-registry.
If someone is interested, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide  needs a sub-key PreferExternalManifest with DWORD value of 1.
Afterwards you can do things like "clipurlcleaner.exe.manifest" with content that Tuxman showed to have at least Windows XP look activated what is kinda pointless in that application.
I would suggest to add to that manifest Windows compatiblity and Access-Level "as Invoker".

Best wishes!

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #9 on: September 25, 2020, 02:18 AM »
How could I do that?  :-\

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #10 on: September 25, 2020, 03:35 AM »
How could I do that?  :-\
Microsoft offers help to every Microsoft feature. Here you find official instructions.
Here you find examples for Delphi and C++.
(i know that you do not use any of these, GO x64 is your language)

Now follows an example that used things I mentioned (Windows compatiblity and AsInvoker switches, also your XP look is included)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
  <asmv3:application>
    <asmv3:windowsSettings>
      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
      <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
    </asmv3:windowsSettings>
  </asmv3:application>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
        type="win32"
        name="Microsoft.Windows.Common-Controls"
        version="6.0.0.0"
        publicKeyToken="6595b64144ccf1df"
        language="*"
        processorArchitecture="*"/>
    </dependentAssembly>
  </dependency>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel
          level="asInvoker"
          uiAccess="false"
        />
      </requestedPrivileges>
    </security>
  </trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
   <application>
      <!--The ID below indicates app support for Windows Vista -->
      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
      <!--The ID below indicates app support for Windows 7 -->
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
      <!--The ID below indicates app support for Windows 8 -->
      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
      <!--The ID below indicates app support for Windows 8.1 -->
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
      <!--The ID below indicates app support for Windows 10 -->
      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>       
   </application>
</compatibility>
</assembly>

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #11 on: September 25, 2020, 03:41 AM »
I was hoping that it would be easier. Oh well...
I’ll play with that next weekend, thank you.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #12 on: September 25, 2020, 03:45 AM »
It would be nice if you embed it into your .exe. (no modifications needed, just be sure you save it correct encoded, utf-8)
And if able, please include any icon for the notify area, however it look. anything is better than a complete transparent "thing"  :Thmbsup:

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #13 on: September 25, 2020, 04:10 AM »
How’s this?

edit: The version in the OP is the best one. ;)
« Last Edit: September 28, 2020, 03:43 AM by Tuxman »

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #14 on: September 25, 2020, 04:17 AM »
How’s this?

It works! (just missing notify icon, but atleast i can run it on my workstation, thanks!)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #15 on: September 25, 2020, 04:22 AM »
just missing notify icon

Windows does not accept emojis and Windows does not accept images anymore? Oh my...

It is surprisingly uneasy to write multi-platform desktop applications in Go. Sorry for the inconveniences. Next time I’ll use Delphi again.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #16 on: September 25, 2020, 05:23 AM »
The notify icon should be in icon format (.ico), at least 16x16 pixel.
Official Microsoft Help for that subject with Code example can be found here.
Just skip the ".net" stuff, basics are the same.

How to do in GO x64 = no idea.

How to do in Delphi = here  :-*
(Delphi accept .png or other image formats native and convert to .ico internal)

And yes, CrossPlatform development can be very time consuming.
Thats why I just create WinApi applications. (easy to do and easy to care)


Have a great Weekend,

regards!

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #17 on: September 25, 2020, 05:30 AM »
The notify icon should be in icon format (.ico), at least 16x16 pixel.

Mine’s 72x72:
https://code.rosaele...ondata.go&ci=tip

(.ico -> []byte)

And yes, CrossPlatform development can be very time consuming.
Thats why I just create WinApi applications. (easy to do and easy to care)

This tool grew out of a Twitter suggestion, someone asked for a Windows/macOS tool. As I bought a MacBook last year (and I use it more than my Windows machine currently), I could fulfill his wish rather easily. :)
Sometimes, Windows-only is a good idea, but only if you’re using Windows as your only desktop system...

(For example, the dehexify tool I published earlier is a Windows-only application I wrote for my actual day work, only to be run on my work computer which is a Windows 10 one.)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #18 on: September 26, 2020, 06:30 PM »
How’s this?
Why this clip.zip have three downloads and the main one in the beginning of the post 0 downloads !!!!!!
 :-* :P

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #19 on: September 26, 2020, 06:33 PM »
Why the file from the windows version download before to uncompress is flickering the type all the time ?
 :-* :P

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #20 on: September 27, 2020, 01:17 PM »
Your system is bad?  ;D

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #21 on: September 27, 2020, 02:00 PM »
Your system is bad?  ;D
>:(
My system is exquisite and professional after so many years in DC. I am very proud of it.
 :-* :P

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #22 on: September 28, 2020, 03:47 AM »
I fixed the tray icon. Find the updated version attached to the original posting.

Surprisingly, Windows only accepts the .ico format.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #23 on: September 28, 2020, 06:11 AM »
updated version is working great, finally an icon  :Thmbsup:

my approach would be minimal different. i'd apply icon as applications "MainIcon" and use that also for notify.
(not urgently needed, but looks better than windows standard icon for applications)

Thank you für Updating Windows version!

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: N.A.N.Y. 2021: ClipURLCleaner - Clean URLs in your clipboard
« Reply #24 on: September 28, 2020, 06:45 AM »
Surprisingly, Windows only accepts the .ico format.

An annoyance to be sure.  The only reason I work with .ico anymore  >:(