Skip to content

Instantly share code, notes, and snippets.

@JamoCA
Created July 26, 2013 15:39
Show Gist options
  • Save JamoCA/6089880 to your computer and use it in GitHub Desktop.
Save JamoCA/6089880 to your computer and use it in GitHub Desktop.
AutoHotKey script to sort and removed duplicate values from a column of data (ie, column of values from a spreadsheet). (CTRL+SHIFT+U)
SANITIZE: ;sanitize characters (optional, see below)
AutoTrim,Off
StringCaseSense,On
StringReplace,string,string,chr(160),A_Space,All ;Non-breaking space
StringReplace,string,string,–,-,All ;emdash
StringReplace,string,string,´,',All
StringReplace,string,string,’,',All
StringReplace,string,string,©,(C),All
StringReplace,string,string,“,",All ;left quote
StringReplace,string,string,”,",All ;right quote
StringReplace,string,string,®,(R),All
StringReplace,string,string,¼,1/4,All
StringReplace,string,string,½,1/2,All
StringReplace,string,string,¾,3/4,All
StringReplace,string,string,™,TM,All
StringReplace,string,string,«,<<,All
StringReplace,string,string,»,>>,All
StringReplace,string,string,„,",All
StringReplace,string,string,•,-,All ;bullet
StringReplace,string,string,…,...,All
Return
^+u:: ; CTRL-SHIFT+U Column Alphabetize & Unique Filter
string = %clipboard%
Gosub,SANITIZE ;remove if you don't want santized values
Sort,string,C U
clipboard := string
SendPlay,^v
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment