02-22-2017, 06:03 PM
I have one macro that routinely freezes my computer. I don't understand why this happens especially since it seems to be random.
Summary: it cleans up a selected piece of text of weird misc characters by doing a series of findreplace functions.
Macro cleanup text - clean up pdf text copies -
Trigger Wc
Summary: it cleans up a selected piece of text of weird misc characters by doing a series of findreplace functions.
Macro cleanup text - clean up pdf text copies -
Trigger Wc
str inputstring
inputstring.getsel
spe 100
;combo non-alphanumeric characters
inputstring.findreplace("___" " ")
inputstring.findreplace("__" " ")
inputstring.findreplace("_-_" " ")
inputstring.findreplace("--" " ")
;single non-alphanumeric characters
inputstring.findreplace("_" " ")
inputstring.findreplace("-" " ")
inputstring.findreplace("+" " ")
inputstring.findreplace(":" " - ")
inputstring.findreplace("~" " ")
inputstring.findreplace("''" "'") ;;replaces "
inputstring.findreplace("?" " - ")
inputstring.findreplace("/" " ")
inputstring.findreplace("\" " ")
inputstring.findreplace("|" " - ")
inputstring.findreplace("»" " - ")
inputstring.findreplace("<" "" 8)
inputstring.findreplace(">" "" 8)
inputstring.findreplace("*" "" 8)
inputstring.findreplace(" " " " 8) ;; the weird non-space space character when text copied from pdf - only works in word
inputstring.findreplace(" " " " 8) ;; the weird non-space space character when text copied from pdf - works in text editor
inputstring.setsel