Здравствуйте, гость ( Вход | Регистрация )

> Working with accentuation in characters
kaltorak
сообщение 17.4.2024, 23:04
Сообщение #1


**

Neophyte
Сообщений: 21
Регистрация: 12.10.2021
Группа: Пользователи
Наличность: 0
Пользователь №: 20.106
Возраст: 30



I'm working with UoPilot Scripting (no lua)
And I came across the following problem.

I'm Brazilian, and some letters of some words in Portuguese have accents. For example:

Chpéu = Hat (Hat in English)

When I use the command
Код
send Chapéu

or
Код
say Chapéu


uopilot writes it this way:
Код
Chapйu


It inserts a different character (й) that doesn't exist in my language. Is there anything I can do to resolve this? Because there are several accents
á é í ó ú ã â ê... etc...

Thanks!
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения
 
Ответить в эту темуОткрыть новую тему
Ответов
DarkMaster
сообщение 18.4.2024, 8:46
Сообщение #2


***********

Модератор UOPilot
Сообщений: 9.745
Регистрация: 2.12.2008
Группа: Супермодераторы
Наличность: 29665
Пользователь №: 11.279



https://forum.uokit.com/index.php?s=&sh...st&p=444003
i recommend to start from that.

For paste:
Код

local ffi=require "ffi"
ffi.cdef[[
int PostMessageA(int hWnd, int Msg, int wParam, int lParam);
]]


local ext = {}
-- Вставить буфер обмена
ext.paste = function(handle)
    handle = handle or workwindow()
    return ffi.C.PostMessageA(handle, 0x302, 0, 0)
end

ext.send_clipboard = function(text)
    text = text or ext.clipboard()
    if text then
        ext.clipboard(text)
        ext.paste()
    end
end


Сообщение отредактировал DarkMaster - 18.4.2024, 14:22


--------------------
Скрипты UOPilot под заказ.
Консультации по UOpilot 15$/час.
Услуги Lua разработчика (не пилот, проекты, постоянка)
Disсоrd:
Kov____
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения
kaltorak
сообщение 19.4.2024, 15:13
Сообщение #3


**

Neophyte
Сообщений: 21
Регистрация: 12.10.2021
Группа: Пользователи
Наличность: 0
Пользователь №: 20.106
Возраст: 30



Цитата(DarkMaster @ 18.4.2024, 8:46) *

https://forum.uokit.com/index.php?s=&sh...st&p=444003
i recommend to start from that.

For paste:
Код

local ffi=require "ffi"
ffi.cdef[[
int PostMessageA(int hWnd, int Msg, int wParam, int lParam);
]]
local ext = {}
-- Вставить буфер обмена
ext.paste = function(handle)
    handle = handle or workwindow()
    return ffi.C.PostMessageA(handle, 0x302, 0, 0)
end

ext.send_clipboard = function(text)
    text = text or ext.clipboard()
    if text then
        ext.clipboard(text)
        ext.paste()
    end
end



This seems like a good option. I can leave the function that copies the text in another script tab, I pass the id of the word to be copied by the main script and call the script in lua to copy and paste the word.

Now I'm just going to try to understand how this Lua example that you sent works, because I have almost 0 knowledge of how to program in Lua.

I've already read some topics here on the forum and I'm convinced that I need to study lua because it will open up a much greater range of possibilities for working with uopilot, in addition to the speed of execution in some cases, just more time available to study.

Thanks!
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения



Ответить в эту темуОткрыть новую тему
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 

- Текстовая версия | Версия для КПК Сейчас: 17.7.2025, 22:06
Designed by Nickostyle