function Right2Left() local function GetWindowLong(hWnd, nIndex) return tonumber(DLL.CallFunction("User32.dll", "GetWindowLongA", hWnd..", "..nIndex, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)) end local function SetWindowLong(hWnd, nIndex, dwNewLong) return tonumber(DLL.CallFunction("User32.dll", "SetWindowLongA", hWnd..", "..nIndex..", "..dwNewLong, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)) end local Object_hwnd local ExStyle local Type local WS_EX_LAYOUTRTL = 4194304 -- For Window Object_hwnd = Application.GetWndHandle() ExStyle = GetWindowLong(Object_hwnd ,-20) --SetWindowLong(Object_hwnd, -20, ExStyle + WS_EX_LAYOUTRTL) objects = Page.EnumerateObjects() if objects ~= nil then Application.SetRedraw(false) for index, object in pairs(objects) do Type = Page.GetObjectType(object) -- For ComboBox if Type == OBJECT_COMBOBOX then Object_hwnd = ComboBox.GetProperties(object).WindowHandle ExStyle = GetWindowLong(Object_hwnd ,-20) SetWindowLong(Object_hwnd, -20, ExStyle + WS_EX_LAYOUTRTL) ComboBox.SetProperties(object, {ReadOrder = READ_RIGHT_TO_LEFT}) -- For Input elseif Type == OBJECT_INPUT then Input.SetProperties(object, {ReadOrder = READ_RIGHT_TO_LEFT, Alignment = ALIGN_RIGHT}) -- For ListBox elseif Type == OBJECT_LISTBOX then Object_hwnd = ListBox.GetProperties(object).WindowHandle ExStyle = GetWindowLong(Object_hwnd ,-20) SetWindowLong(Object_hwnd, -20, ExStyle + WS_EX_LAYOUTRTL) ListBox.SetProperties(object, {ReadOrder = READ_RIGHT_TO_LEFT}) -- For RadioButton elseif Type == OBJECT_RADIOBUTTON then RadioButton.SetProperties(object, {TextAlignment = ALIGN_RIGHT, ReadOrder = READ_RIGHT_TO_LEFT, ButtonAlignment = BTN_ALIGN_RIGHT}) -- For Tree elseif Type == OBJECT_TREE then Object_hwnd = Tree.GetProperties(object).WindowHandle ExStyle = GetWindowLong(Object_hwnd ,-20) SetWindowLong(Object_hwnd, -20, ExStyle + WS_EX_LAYOUTRTL) Tree.SetProperties(object, {ReadOrder = READ_RIGHT_TO_LEFT}) end end Application.SetRedraw(true) end end