prevent character doesn't exist pop ups on launch

Get help with using AutoHotkey and its commands and hotkeys
Posts: 5
Joined: 23 Jan 2018, 19:17

prevent character doesn't exist pop ups on launch

19 Sep 2018, 19:44

without the foreign characters, this here script is an amazing English to any other language translator. it translates what ever you type in english to what ever language you choose very quickly, its compatible with everything, be it discord chat rooms, video games ect, all you need to make the program work is google chrome and a windows pc.

that was untill i tried making it work for people whos keyboards arent English. for every foreign character i added, i would get a pop up when the script loaded, the pop ups say: The hotkey (foreigncharacter) will not be active because it does not exist in the current keyboard layout. ( no shit )
this is a big problem because im going to have hundreds of these foreign characters, and everytime you use the script it reloads triggering the hundreds of pop ups again,

i need some way of preventing these notifications, ive given try and catch functions a try, i even combined it with the #ErrorStdOut function to no avail,
i really need a simple solution for this, maybe a clever use of the last 3 functions.
if you want to cut the foreign characters and use it as a translator heres how it works: press the rightshift to start recording your key presses, once youve written the sentence you want to translate, hit the right shift again, then choose the language and press right shift again to replace your sentence with the translation. ctrl+0 is the kill switch
my goal is to keep this script simple so that even beginners can easily understand it and use it.
and yes i made a cheap keylogger in order to make it work, please dont flip out.

suspend, on

suspend, permit
IfWinNotExist, Google Translate
run, chrome.exe -new-window
sleep, 4000
WinMinimize, Google Translate

Suspend, Permit

~q:: text=%text%q
~w:: text=%text%w
~e:: text=%text%e
~r:: text=%text%r
~t:: text=%text%t
~y:: text=%text%y
~u:: text=%text%u
~i:: text=%text%i
~o:: text=%text%o
~p:: text=%text%p
~a:: text=%text%a
~s:: text=%text%s
~d:: text=%text%d
~f:: text=%text%f
~g:: text=%text%g
~h:: text=%text%h
~j:: text=%text%j
~k:: text=%text%k
~l:: text=%text%l
~z:: text=%text%z
~x:: text=%text%x
~c:: text=%text%c
~v:: text=%text%v
~b:: text=%text%b
~n:: text=%text%n
~m:: text=%text%m
~,:: text=%text%,
~.:: text=%text%.
~/:: text=%text%/
~;:: text=%text%;
~':: text=%text%'
~\:: text=%text%\
~1:: text=%text%1
~2:: text=%text%2
~3:: text=%text%3
~4:: text=%text%4
~5:: text=%text%5
~6:: text=%text%6
~7:: text=%text%7
~8:: text=%text%8
~9:: text=%text%9
~0:: text=%text%0
~-:: text=%text%-
~=:: text=%text%=
~!:: text=%text%!
[email protected]:: text=%text%@
~#:: text=%text%#
~$:: text=%text%$
~%:: text=%text%percent
~^:: text=%text%^
~&:: text=%text%&
~*:: text=%text%*
~(:: text=%text%(
~):: text=%text%)
~<:: text=%text%<
~>:: text=%text%>
~?:: text=%text%?
~|:: text=%text%|
~[:: text=%text%[
~]:: text=%text%]
~+':: text=%text%"
~+;:: text=%text%:
~_:: text=%text%_
~*é:: text=%text%é
~*è:: text=%text%è
~*à:: text=%text%à
~*â:: text=%text%â
~*ê:: text=%text%ê
~*î:: text=%text%î
~*ô:: text=%text%ô
~*û:: text=%text%û
~*ù:: text=%text%ù
~*ï:: text=%text%ï
~*ü:: text=%text%ü
~*í:: text=%text%í
~*ó:: text=%text%ó
~*ú:: text=%text%ú
~*¿:: text=%text%¿
~*¡:: text=%text%¡
~*ñ:: text=%text%ñ
~*я:: text=%text%я
~*ш:: text=%text%ш
~*т:: text=%text%т
~*ы:: text=%text%ы
~*и:: text=%text%и
~*п:: text=%text%п
~*ю:: text=%text%ю
~*щ:: text=%text%щ
~*й:: text=%text%й
~*л:: text=%text%л
~*ь:: text=%text%ь
~*ж:: text=%text%ж
~*з:: text=%text%з
~*ц:: text=%text%ц
~*в:: text=%text%в
~*б:: text=%text%б
~*ъ:: text=%text%ъ
~*€:: text=%text%€
~*№:: text=%text%№
~*́:: text=%text%́
~*–:: text=%text%–
~*—:: text=%text%—

~BackSpace::StringTrimRight, text, text, 1

~space:: text=%text%漢

~enter:: replace= dont

Rshift up::
suspend, off

keywait, Rshift, D
StringReplace, text, text, 漢, %a_space%, All
WinMaximize, Google Translate
WinActivate, Google Translate
if(replace= dont)
clear= dont
Clipboard := text
send, ^v
keywait, Rshift, D
send, ^+s
send, ^a
send, ^c
send, ^+s
send, {tab}
send, {enter}
WinMinimize, Google Translate
if(clear= dont)
Send, %ClipBoard%
StringLen, Length, text
send, {backspace %length%}
send, %clipboard%

Return to “Ask For Help”

Who is online

Users browsing this forum: 1100++, aircooled, Portwolf, sinkfaze and 195 guests