; Checks for the specified key in a string and gets the quoted or unquoted value after it String_ExtractValue(ByRef _String, _Key="") { If (SubStr(_String, 1, StrLen(_Key)) = _Key) { If Loc := InStr(_String, """") Result := SubStr(_String, Loc += 1, InStr(_String, """", false, 0)-Loc) Else Result := SubStr(_String, StrLen(_Key)+1) If Result { Result = %Result% StringReplace, Result, Result, &, & } Else Result := false } Else Result := false Return Result } String_SeparateVersion(ByRef _String) { If Loc := InStr(_String, " Beta") { Result := SubStr(_String, Loc + 5) _String := SubStr(_String, 1, Loc - 1) } Else If Loc := RegExMatch(_String, "i) R[0-9]+") { Result := SubStr(_String, Loc + 2) _String := SubStr(_String, 1, Loc - 1) } Else If Loc := RegExMatch(_String, "i) [0-9]+\.[0-9]+") { Result := SubStr(_String, Loc + 1) _String := SubStr(_String, 1, Loc - 1) } Else If Loc := RegExMatch(_String, "i) v[0-9]+") { Result := SubStr(_String, Loc + 2) _String := SubStr(_String, 1, Loc - 1) } Else Result := "" _String = %_String% Result = %Result% Return Result } String_Encrypt(_String, _SecretKey="") { global RC4_Pass If Not _SecretKey _SecretKey := RC4_Pass Return RC4_txt2hex(_String, _SecretKey) } String_Decrypt(_String, _SecretKey="") { global RC4_Pass If Not _SecretKey _SecretKey := RC4_Pass Return RC4_hex2txt(_String, _SecretKey) } String_GetTextSize(_Str, _Size="", _Font="", _W="", _GuiNum=99) { If Not _Size _Size := 8 If _GuiNum _GuiNum += ":" If _Size _Size := "s" . _Size If _W W := "w" . _W Else W := "r1" Gui, +LastFoundExist If Not WinExist() { Gui, %_GuiNum%Font, %_Size%, %_Font% Gui, %_GuiNum%Add, Text, %W%, %_Str% GuiControlGet T, %_GuiNum%Pos, Static1 Gui, %_GuiNum%Destroy If Not _W { Result := SA_Set(Result := "", TW, "w") Result := SA_Set(Result, TH, "h") } Else Result := TH } Else Result := false Return Result }