I want to remove characters, without english letters.
I found a few scripts for the task.
all the scripts make me put the text in the code.
ex.
v2_text = 123dfs@♥ ♧ ♣ ⊙ ◈ ▣ abcdASDF`!`@`#`$`%
v2 := RegExReplace(v2_text, "[^a-zA-Z0-9]")
MsgBox % v2
I want to do it by a hotkey in other text editors ( ms-word, google document, notepad and others ).
How can I get the results ?
How to remove characters, without english letters??
Re: How to remove characters, without english letters??
conceptually
- get the text u want to make changes to. use whatever method u prefer/are familiar with/is available(clipboard, messages, Accessibility, other available custom APIs provided)
- alter the retrieved text according to ur needs(u already got the regex for doing just that)
- paste/replace the text back into the target application. use whatever method u prefer/are familiar with/is available(clipboard, messages, Accessibility, other available custom APIs provided)
Re: How to remove characters, without english letters??
@swagfag I want to get the result without copy & paste by a hotkey.
getting the result isn't possible ? ^^
getting the result isn't possible ? ^^
Re: How to remove characters, without english letters??
Why wouldn’t you want to use copy and paste with a hotkey? You can have one hotkey do both and also restore the previous contents of the clipboard, so it’s not like you would even know it used copy/paste (unless you check clipboard history).
Re: How to remove characters, without english letters??
@boiler Ok. Reading the first reply carefully, I found it's available.
I understand the concept of code.
but I can't make it by myself.
I understand the concept of code.
but I can't make it by myself.
Re: How to remove characters, without english letters??
With the code below, you would highlight the text you want to replace, then press Ctrl+Tab. It uses the RegEx pattern you suggested. It will also remove things like spaces and tabs, so if you want to keep things like that, they would have to be added.
Code: Select all
^Tab::
Clipboard := ClipSave
Clipboard := ""
Send, ^c
ClipWait, 1
if ErrorLevel
return
Clipboard := RegExReplace(Clipboard, "[^a-zA-Z0-9]")
Send, ^v
Sleep, 500
ClipSave := Clipboard
return
Re: How to remove characters, without english letters??
@boiler
Thanks a lot.
It helps my problem fastly.
I replaced "[^a-zA-Z0-9]") to "[^a-zA-Z0-9_ \n]") to keep space. ^^
Thanks a lot.
It helps my problem fastly.
I replaced "[^a-zA-Z0-9]") to "[^a-zA-Z0-9_ \n]") to keep space. ^^
Who is online
Users browsing this forum: JoeWinograd, Xtra and 150 guests