Так после создания GUI из библиотеки - смотрите код и повторяя его ручками учитесь.я без библиотек имел в видуКак на будущее
Анализировать чужие скрипты!Подскажите, где можно набраться азов в gfx рипера?
Я через простые прошел ужеИ так штук 10 и вникнешь в процесс, ну а потом и функции можешь дергать, дернул посмотрел что не так - поправил под свой скрипт и ни каких ошибок, про которые ты некогда не узнаешь.
Поразбирай вот этот кусок пост #3 тут Женя все подробно расписал - все понятноНа самом деле мне не понятен больше процесс присваивания мыши к кнопкам. Чтобы потом от этого отталкиваться при запуске функций
    local function gfxSaveScrin_buf( buf,w,h);
        gfx.dest = buf;
        gfx.setimgdim(buf, -1, -1);
        gfx.setimgdim(buf, w, h);
        gfx.a = 1;
    end;
    ---
    local function gfxRestScrin_buf(buf,x,y,w,h);
        gfx.dest = -1;
        gfx.a = 1;
        gfx.blit(buf,1,0, x,y,w,h,x,y,w,h,0,0);
    end;
    --======================================================
    local CaretPos,Nabirat_Text,Text_x,car_x,flicker;
    local function GetSetInputText(x,y,w,h,Press_OK);
    gfx.setfont(1,"Verdana", h/1.15);
        -------------------------
        local function Sub(s,i,j);
            local c,str,x = 0,"",0;
            for _, code in utf8.codes(s)do;
                c = c + 1;if not j or j<0 then;j = c+i;x=1;end;
                if c >= i and c <= j then;local symb = utf8.char(code);str = str..symb;end;
                if x == 1 then j = nil end;
            end;
            return str;
        end
        ------------------
        x = (x + 2); w = (w - 5);
             
        local Rus_char = {  [184]='ё',[224]='а',[225]='б',[226]='в',[227]='г',[228]='д',[229]='е',[230]='ж',
        [231]='з',[232]='и',[233]='й',[234]='к',[235]='л',[236]='м',[237]='н',[238]='о',[239]='п',[240]='р',
        [241]='с',[242]='т',[243]='у',[244]='ф',[245]='х',[246]='ц',[247]='ч',[248]='ш',[249]='щ',[250]='ъ',
        [251]='ы',[252]='ь',[253]='э',[254]='ю',[255]='я',[168]='Ё',[192]='А',[193]='Б',[194]='В',[195]='Г',
        [196]='Д',[197]='Е',[198]='Ж',[199]='З',[200]='И',[201]='Й',[202]='К',[203]='Л',[204]='М',[205]='Н',
        [206]='О',[207]='П',[208]='Р',[209]='С',[210]='Т',[211]='У',[212]='Ф',[213]='Х',[214]='Ц',[215]='Ч',
        [216]='Ш',[217]='Щ',[218]='Ъ',[219]='Ы',[220]='Ь',[221]='Э',[222]='Ю',[223]='Я'}
 
        if not Nabirat_Text then Nabirat_Text =("")end;
        if not CaretPos then CaretPos =(utf8.len(""))end;
        local Enter,pressed,char = false,false,gfx.getchar();
        if Press_OK == 1 then Enter = true end;
 
        if char > 0 then;
            if char == 13 then; -- "Enter"
                Enter = true;
            elseif char == 1818584692 then; -- left <
                CaretPos = math.min(math.max(CaretPos-1,0), utf8.len(Nabirat_Text));
            elseif char == 1919379572 then; -- right >
                CaretPos = math.min(math.max(CaretPos+1,0),utf8.len(Nabirat_Text));
            elseif char == 8 then; -- "Backspace ←"
                if CaretPos > 0 then;
                    Nabirat_Text = Sub(Nabirat_Text,1,CaretPos-1)..Sub(Nabirat_Text,CaretPos+1,-1);
                    CaretPos = math.min(math.max((CaretPos-1),0), utf8.len(Nabirat_Text));
                end;
            elseif char == 6579564 then; -- Delete
                Nabirat_Text = Sub(Nabirat_Text,1,CaretPos)..Sub(Nabirat_Text,CaretPos+2,-1);
            elseif char > 31 and char < 127 then; -- Input_Text   
                Nabirat_Text = Sub(Nabirat_Text,1,CaretPos)..string.char(char)..Sub(Nabirat_Text,CaretPos+1,utf8.len(Nabirat_Text));
                CaretPos = math.min(CaretPos + 1, utf8.len(Nabirat_Text));
            elseif char > 127 and char < 256 then; -- Input_Text_Cyrillic
                Nabirat_Text = Sub(Nabirat_Text,1,CaretPos)..Rus_char[char]..Sub(Nabirat_Text,CaretPos+1,utf8.len(Nabirat_Text));
                CaretPos = math.min(CaretPos + 1, utf8.len(Nabirat_Text));
            end;
            pressed = true;
        end;
        -----------------------------------
 
        gfxSaveScrin_buf(1023,gfx.w,gfx.h);
 
        ---/ поле ввода /-/ input field /---               
        gfx.set(0.32, 0.31, 0.3);
        gfx.rect(x-2,y,w+5,h);-- прямоуг
        gfx.set(0.7,0.7,0.7);
        gfx.rect(x,y+2,w+1,h-4);-- прямоуг
        ---------------------------------
 
        ------/ MovingText /-------------
        Text_x = x;
        car_x = x + gfx.measurestr(Sub(Nabirat_Text,1,CaretPos));
        if (car_x-x) >= (w) then;
             Text_x = (w+x)+x - car_x;
             car_x=(w + x);
        end;
        -------------------------------
 
        -------/ Text /-----------------
        gfx.setfont(1,"Verdana", h/1.15);
        gfx.x = Text_x; gfx.y = y;
        gfx.set(0.11, 0.11, 0.11);
        gfx.drawstr(Nabirat_Text);
        --------------------------
   
        -------/ BlinkingCursor /---------------------
        if not tonumber(flicker) then flicker = 0 end;
        if  pressed == true then flicker = 0 end;
        if flicker < 15 then; -- мерцание
            gfx.set(0,0,0);
            gfx.rect(car_x, y+5, 1, h-10);
        end;
        flicker = flicker < 30 and flicker + 1 or 0;
        --------------------------------------------
 
        gfxRestScrin_buf(1023,x-2,y,w+5,h);
 
        ------/ Рамка /-/ Frame /-------                 
        gfx.set(0.7,0.7,0.7);
        gfx.rect(x-2,y,w+5,h,0); -- прямоуг рамка
        -----------------------------------------
 
        gfx.set(0,0,0);
        if Enter == true then return Nabirat_Text end;
        ----------------------------------------------
    end
    --================================================
    function mainloop()
         gfx.gradrect(0,0,400,110, 0.3,0.3,0.3,1)           
         GetSetInputText(15, 15,300,25)
         gfx.x = 345; gfx.y = 85;
         gfx.set(0.7,0.7,0.7,0.4);
         gfx.setfont(1,"Tahoma",17,105);
         gfx.drawstr("Archie.");
         reaper.defer(mainloop)
    end
    gfx.init("Archie_User_Input",400,110,0,80,150)
    mainloop()
	Как мне получить item, который находится над курсором, пока мышь остается на envelop line?
local function GetItemUnderMouseCursorOfEnvelope(Envelope);
    local Alloc = reaper.BR_EnvAlloc(Envelope,false);
    local tr = reaper.BR_EnvGetParentTrack(Alloc);
    reaper.BR_EnvFree(Alloc,false);
    local PosCur = reaper.BR_PositionAtMouseCursor(true);
    for i = 1, reaper.CountTrackMediaItems(tr) do;
       local it = reaper.GetTrackMediaItem(tr,i-1);
       local PosIt = reaper.GetMediaItemInfo_Value(it,"D_POSITION");
       local LenIt = reaper.GetMediaItemInfo_Value(it,"D_LENGTH");
       if PosIt < PosCur and PosIt + LenIt > PosCur then;
       return it;
       end;
    end;
    return -1;
end;
-- Пример:
local Envelope = reaper.GetSelectedEnvelope(0);
local Item = GetItemUnderMouseCursorOfEnvelope(Envelope);
reaper.SelectAllMediaItems(0,0);
reaper.SetMediaItemSelected(Item,1);
	@J T, Значения возвращаются индексами "Стерео от 0 до 1024","моно от 1024 до 2048" и т.д.Привет. Подскажите кто-нибудь. Как получить на выделенном канале данные отмеченные на картинке?
Есть канал. Нужно получить из Receives номера стерео каналов. Копал в сторону reaper.BR_GetSetTrackSendInfo и I_DSTCHAN, но чето получить внятное не удалось.
Посмотреть вложение 159305
local f = function(Track,idx_receive);
    local S = reaper.GetTrackSendInfo_Value(Track,-1,idx_receive,"I_SRCCHAN");
    if S < 1024 and S >= 0 then;
        return math.ceil(S+1) ..'/'..math.ceil(S+2);
    elseif S >= 1024 and S < 2048 then;
        return math.ceil(S-1023);
    end;
    return -1;
end;
Test =  f(Track,0);
	C:\WINDOWS\system32>gem install reapack-index
Fetching addressable-2.6.0.gem
Fetching colorize-0.8.1.gem
Fetching public_suffix-3.1.1.gem
Fetching gitable-0.4.0.gem
Fetching metaheader-1.3.1.gem
Fetching mini_portile2-2.4.0.gem
Fetching nokogiri-1.10.3-x64-mingw32.gem
Fetching pandoc-ruby-2.0.2.gem
Fetching rugged-0.28.2.gem
Fetching stable_sort-1.1.0.gem
Fetching reapack-index-1.2.2.gem
Successfully installed public_suffix-3.1.1
Successfully installed addressable-2.6.0
Successfully installed colorize-0.8.1
Successfully installed gitable-0.4.0
Successfully installed metaheader-1.3.1
Successfully installed mini_portile2-2.4.0
Nokogiri is built with the packaged libraries: libxml2-2.9.9, libxslt-1.1.33, zlib-1.2.11, libiconv-1.15.
Successfully installed nokogiri-1.10.3-x64-mingw32
Successfully installed pandoc-ruby-2.0.2
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing reapack-index:
        ERROR: Failed to build gem native extension.
    current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rugged-0.28.2/ext/rugged
C:/Ruby26-x64/bin/ruby.exe -I C:/Ruby26-x64/lib/ruby/2.6.0 -r ./siteconf20190729-12992-1cn3h7t.rb extconf.rb
checking for make... yes
checking for cmake... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.
Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby26-x64/bin/$(RUBY_BASE_NAME)
        --with-sha1dc
        --without-sha1dc
        --use-system-libraries
extconf.rb:33:in `spawn': wrong exec option symbol: pgroup (ArgumentError)
        from extconf.rb:33:in `run_cmake'
        from extconf.rb:104:in `block (2 levels) in <main>'
        from extconf.rb:101:in `chdir'
        from extconf.rb:101:in `block in <main>'
        from extconf.rb:98:in `chdir'
        from extconf.rb:98:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
  C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/rugged-0.28.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rugged-0.28.2 for inspection.
Results logged to C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/rugged-0.28.2/gem_make.out
	    -- Author:      Archie
    -- Version:     1.0
    -- Extension:   SWS v.2.10.0  http://www.sws-extension.org/index.php
    --              reaper_js_ReaScriptAPI64 Repository-(ReaTeam Extensions) http://clck.ru/Eo5Nr or http://clck.ru/Eo5Lw
  
  
    -------------------------------------------------
    function no_undo()reaper.defer(function()end)end;
    -------------------------------------------------
  
  
    local countTrack = reaper.CountTracks(0);
    if countTrack == 0 then no_undo()return end;
  
  
    local windowHWND = reaper.JS_Window_Find("Routing for track",false);
    if windowHWND then;
        for i = 1,countTrack do;
            local windowHWND = reaper.JS_Window_Find("Routing for track "..i,false);
            reaper.JS_Window_Destroy(windowHWND);
        end;
    else;
      
        local countSelTrack = reaper.CountSelectedTracks(0);
        if countSelTrack == 0 then;
            reaper.MB("Not Selected Track","Woops!",0);
            no_undo()return;
        end;
      
        local AllowRroutingWinStayOpen = reaper.SNM_GetIntConfigVar("autoclosetrackwnds",0);
        if AllowRroutingWinStayOpen == 1 then;
            reaper.Main_OnCommand(40914,0);--Set first last touched track
            reaper.Main_OnCommand(40293,0);--View routing and I/O
        else;
            reaper.PreventUIRefresh(1);
          
            local sel_tracksST = {};
            for i = 1, countSelTrack do;
                sel_tracksST[i] = reaper.GetSelectedTrack(0,i-1);
            end;
          
            for i = 1, countSelTrack do;
                reaper.SetMediaTrackInfo_Value(sel_tracksST[i],"I_SELECTED",0);
            end;
          
            for i = 1,#sel_tracksST do;
                reaper.SetMediaTrackInfo_Value(sel_tracksST[i],"I_SELECTED",1);
                reaper.Main_OnCommand(40293,0);
            end;
          
            reaper.PreventUIRefresh(-1);
        end;
    end;
    no_undo();
	Взаимно. Благодарю за донат.Работает, благодарю
В верху страницы есть конвертик, нажимаешь на него > начать новую переписку > и в открывшейся странице в графе получатели вводишь мой ник и ниже сообщения.как к Вам в личку постучатся?
Переустановил сегодня винду и столкнулся с такой же проблемой.(Хелп!
После того как заново поставил Виндовс10 не могу установить gem reapack, то же самое у @borisuperful, кто что может подсказать?
До переустановки Виндовс10 устанавливал и все успешно работало больше года
gem install reapack-indexERROR:  Error installing reapack-index: (как у вас выше) ,gem install -v 0.27.9 rugged  gem install reapack-index  if reaper.CountSelectedTracks() > 0 then
  local Count = 0
  for i = 0, reaper.CountSelectedTracks(0)-1 do
     local SelTrack = reaper.GetSelectedTrack(0,i)
     if SelTrack then
       if reaper.GetMediaTrackInfo_Value(SelTrack, 'I_SOLO') == 1 then
         Count = Count + 1     
       end
     end
  end
  reaper.ShowMessageBox(Count, "Information",0)
end
	if reaper.CountSelectedTracks() > 0 then
    local Count = 0
    for i = 0, reaper.CountSelectedTracks(0)-1 do
        local SelTrack = reaper.GetSelectedTrack(0,i)
        if SelTrack then
            if reaper.GetMediaTrackInfo_Value(SelTrack,'I_SOLO') > 0 then
                Count = Count + 1     
            end
        end
    end
    reaper.ShowMessageBox(Count, "Information",0)
end
	Set in selected items CC shape bezier.luaПодскажите, что нужно дальше указывать, не могу понять.
    for it = 1,reaper.CountSelectedMediaItems(0)do;
        local item = reaper.GetSelectedMediaItem(0,it-1);
        local take = reaper.GetActiveTake(item);
        while true do;
            i=(i or 0)+1;
            local retval, shape, beztension = reaper.MIDI_GetCCShape(take,i-1);
            if retval then;
                reaper.MIDI_SetCCShape(take,i-1,5,beztension,true);
            else;
                break;
            end;
        end;
        reaper.MIDI_Sort(take);
    end;
    reaper.UpdateArrange();
	Archie_Item; Set in selected items CC shape to Square.luaArchie_Item;  Set in selected items CC shape to Linear.luaArchie_Item;  Set in selected items CC shape to Slow start-end.luaArchie_Item;  Set in selected items CC shape to Fast start.luaArchie_Item;  Set in selected items CC shape to Fast end.luaArchie_Item;  Set in selected items CC shape to Bezier.lua