AutoHotkey Broken Special Characters Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
darch24

AutoHotkey Broken Special Characters

22 Jun 2018, 20:21

So basically what happened was i have a master script that opens my game hotkeys, auto correct, and numpad programs. One day i was adding something to my auto correct to where if i typed ^2 it would replace it with a squared symbol and this worked for a while then it started being super buggy and eventually this happens when i type it: ² (i have tried changing my computer language also) but i just don't know what whats happening. This happens with words like cliche when when i type it with the script on its supposed to but a ' above the e but it instead does this: cliché

WHYYYYYYYYYYYY

I have no idea that's the issue ive tried to get an alpha 2.0 version and that says that 90% of my script is incorrect and it doesn't get to opening the auto correct script (i NEED the master script so even if the auto correct does work its still bad that i cant use the rest). Ive also used 1.1.29.00, 1.1.29.00, 1.1.29.01 and it did say 1.1.29.02 (when the script was originally broken then i downgraded to try fix) but i cant find that to reinstall only 1.1.29.01.

There is nothing on the issue and i would post the auto correct but its 5500 lines long XD

i will however post the master script (CONTROL) for you to look at and some of the auto correct that is broken...

----------------------------

Code: Select all

SetWorkingDir %A_ScriptDir%
#NoEnv
#InstallKeybdHook
#Persistent
#MaxThreadsPerHotkey 2
#MaxHotkeysPerInterval 2000
#SingleInstance
#HotkeyInterval,100
#SingleInstance force
;double comma    v v    needs to be there...
Process, Priority, , H
SendMode Input
CoordMode, mouse, screen
SetKeyDelay, –1
SetTitleMatchMode, 2

;-------------------;
;------I C O N------;
;---C H A N G E R---;
;-------------------;

I_Icon = C:\_data\home\ahk\ICONS\LETTERS\C\violet.ico
ICON [I_Icon]
if I_Icon <>
IfExist, %I_Icon%
	Menu, Tray, Icon, %I_Icon%

;-------------------;
;---R E F R E S H---;
;---S C R I P T S---;
;-------------------;

DetectHiddenWindows, On
SetTitleMatchMode, 2

Loop
{
IfWinNotExist, AUTOCORRECT.ahk
	{
	Run, C:\_data\home\ahk\AUTOCORRECT.ahk
	Sleep 200
	}
IfWinNotExist, NUMPAD_PROGRAMS.ahk
	{
	Run, C:\_data\home\ahk\NUMPAD_PROGRAMS.ahk
	Sleep 200
	}
IfWinNotExist, GAME_MACROS.ahk
	{
	Run, C:\_data\home\ahk\GAME_MACROS.ahk
	Sleep 200
	}
Sleep 4000
}

#t::
{
IfWinActive, ahk_class WindowsForms10.Window.8.app.0.190610d_r12_ad1
  {
  Run, C:\_data\home\ahk\TERRARIA.ahk
  }
}
Return

#IfWinNotActive, ahk_class UnityWndClass
{
SC149::Reload
}

;---------------------;
;---A L T - M E N U---;
;-------F I X---------;
;---------------------;

LAlt::
sendinput, {LAlt down}
sendinput, {SC0E8 down}
KeyWait, LAlt
return

LAlt up::
sendinput, {LAlt up}
sendinput, {SC0E8 up}
return


RAlt::
sendinput, {RAlt down}
sendinput, {SC0E8 down}
KeyWait, RAlt
return

RAlt up::
sendinput, {RAlt up}
sendinput, {SC0E8 up} 
return

;-------------------------;
;---L I N U X - L I K E---;
;---------D R A G---------;
;-------------------------;

Alt & LButton::
CoordMode, Mouse
MouseGetPos, EWD_MouseStartX, EWD_MouseStartY, EWD_MouseWin
WinGetPos, EWD_OriginalPosX, EWD_OriginalPosY,,, ahk_id %EWD_MouseWin%
WinGet, EWD_WinState, MinMax, ahk_id %EWD_MouseWin% 
if EWD_WinState = 0  
    SetTimer, EWD_WatchMouse, 10 
return

EWD_WatchMouse:
GetKeyState, EWD_LButtonState, LButton, P
if EWD_LButtonState = U  
{
    SetTimer, EWD_WatchMouse, off
    return
}
GetKeyState, EWD_EscapeState, Escape, P
if EWD_EscapeState = D  
{
    SetTimer, EWD_WatchMouse, off
    WinMove, ahk_id %EWD_MouseWin%,, %EWD_OriginalPosX%, %EWD_OriginalPosY%
    return
}
CoordMode, Mouse
MouseGetPos, EWD_MouseX, EWD_MouseY
WinGetPos, EWD_WinX, EWD_WinY,,, ahk_id %EWD_MouseWin%
SetWinDelay, -1 
WinMove, ahk_id %EWD_MouseWin%,, EWD_WinX + EWD_MouseX - EWD_MouseStartX, EWD_WinY + EWD_MouseY - EWD_MouseStartY
EWD_MouseStartX := EWD_MouseX  
EWD_MouseStartY := EWD_MouseY
return

;-----------------;
;--D I S C O R D--;
;----S L O T S----;
;-----------------;

#!s::
  $stop := 0
  Loop, 
  { 
    Send ---slots 1 
    Send {Enter}
    Sleep 10200 
    if ($stop)
    {
      return
    }
  }

#!e:: $stop := 1

;-----------------;
;-----O P E N-----;
;---W I N D O W---;
;------S P Y------;
;-----------------;

#s::
run, C:\_data\programs\_generic\ahk\WindowSpy.ahk
return
;-----------------;
;-----H I D E-----;
;---C H R O M E---;
;-----------------;

<^Tab:: ; Press left control + capslock to hide
{
Send {Alt}{Shift}{m}
;Send {Volume_Mute}
WinHide, Google Chrome ; Place desired window title instead of Google Chrome
Return
}

<+Tab:: ; press left shift + capslock to reveal
{
Sleep 100
DetectHiddenWindows, On
WinShow, Google Chrome
Send {Alt}{Shift}{m}
;Send {Volume_Mute}
Return
}

;-------------------;
;------S E N D------;
;---D O U B L E S---;
;-------------------;

${::
#IfWinNotActive, ahk_class PX_WINDOW_CLASS
Send, {{}{}}
Send {Left}
Return

$[::
#IfWinNotActive, ahk_class PX_WINDOW_CLASS
SendRaw, []   
Send {Left}
Return

$"::
#IfWinNotActive, ahk_class PX_WINDOW_CLASS
SendRaw, ""
Send {Left}
Return

$(::
#IfWinNotActive, ahk_class PX_WINDOW_CLASS
SendRaw, ()
Send {Left}
Return

;---------------;
;---E M A I L---;
;-----F I X-----;
;---------------;

:?*:@@::[email protected]

^^ this is the website killing itself not  my script its actually a ? *

---------------------------------

::^2::²

² 

::cliche::cliché\

cliché 

::cafe::café

café
sorry for the **** post I'm just confused
User avatar
divanebaba
Posts: 805
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: AutoHotkey Broken Special Characters  Topic is solved

23 Jun 2018, 05:06

Hi.

It looks like a decoding problem. According to my knowledge, AutoHotkey has different encoding types.
ANSI- and UNICODE-versions. If you have installed UNICODE-version of AutoHotkey, I think, you have to store your scripts as UTF-8.

But I'm not encoding-specialist, it is only my guess. Please look for encoding type and report.
Einfach nur ein toller Typ. :mrgreen:
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: AutoHotkey Broken Special Characters

23 Jun 2018, 23:11

:arrow: FAQ: Why are the non-ASCII characters in my script displaying or sending incorrectly?
AutoHotkey has different encoding types.
The world at large has many different encoding types. AutoHotkey just decodes what it is given according to a few simple rules.
If you have installed UNICODE-version of AutoHotkey, I think, you have to store your scripts as UTF-8.
This seems to be a common misconception. I explained in detail here: Ansi VS Unicode

It is more likely that the OP has inadvertently saved the file as UTF-8 without BOM, which will not work by default because AutoHotkey will misinterpret it as ANSI. Saving the file as ANSI will work, but may prevent the file from containing certain characters (i.e. any not contained by the system's default ANSI codepage). Saving the file as UTF-8 with BOM will work.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 185 guests