Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

Вопрос Вывод музыки из спотифай

Я вроде понял, но вроде не понял. Нормально сформулируй, куда будет выводиться?
 
Я вроде понял, но вроде не понял. Нормально сформулируй, куда будет выводиться?
Типо сделать так, что музыка которую ты будешь слушать в спотифае выводилась в ватермарку чита
 
Screenshot_2021-06-28-06-35-55-45.jpg
типо так
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Луа на скит сливали, посмотри там
 
the code that the person sent above which is from uc (noad) converted to lw
C++:
Expand Collapse Copy
void spotify() {

    static HWND spotify_hwnd = nullptr;
    static float last_hwnd_time = 0.f, last_title_time = 0.f;

    /* hilariously overengineered solution to get fucking spotify song name */
    if ((!spotify_hwnd || spotify_hwnd == INVALID_HANDLE_VALUE) && last_hwnd_time < m_globals()->m_realtime) {
        /* game freezes if we try to open a handle 300 times per second (understandable) so this workaround will do */
        last_hwnd_time = m_globals()->m_realtime + 10.f;

        for (HWND hwnd = GetTopWindow(0); hwnd; hwnd = GetWindow(hwnd, GW_HWNDNEXT)) {
            if (!IsWindowVisible(hwnd))
                continue;

            int length = GetWindowTextLengthW(hwnd);
            if (length == 0)
                continue;

            WCHAR filename[300];
            DWORD pid;
            GetWindowThreadProcessId(hwnd, &pid);

            const auto spotify_handle = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
            K32GetModuleFileNameExW(spotify_handle, nullptr, filename, 300);

            std::wstring sane_filename{ filename };

            CloseHandle(spotify_handle);

            /* fucking finally found spotify */
            if (sane_filename.find(crypt_str(L"Spotify.exe")) != std::string::npos)
                spotify_hwnd = hwnd;
        }
    }
    else if (spotify_hwnd && spotify_hwnd != INVALID_HANDLE_VALUE && last_title_time < m_globals()->m_realtime) {
        last_title_time = m_globals()->m_realtime + 1.f;
        WCHAR title[300];

        /* returns 0 if something went wrong, so try to get handle again */
        if (!GetWindowTextW(spotify_hwnd, title, 300)) {
            spotify_hwnd = nullptr;
        }
        else {
            const std::wstring sane_title{ title };
            const std::string ascii_title{ sane_title.begin() , sane_title.end() };

            static std::uint32_t hash = 0;

            /* if we find a dash, song is likely playing */
            if (sane_title.find(crypt_str(L"-")) != std::string::npos) {
                if (hash != CONST_HASH(ascii_title.data())) {
                    hash = CONST_HASH(ascii_title.data());

                    eventlogs::get().add(tfm::format(crypt_str("Now playing on Spotify: "), ascii_title));
                }
            }
        }
    }
}
ask here if you have any questions :)
 
Назад
Сверху Снизу