स्क्विसो एक निःशुल्क, शक्तिशाली स्वचालन उपकरण है जो आपको सरल स्क्रिप्ट का उपयोग करके अपनी ट्विच स्ट्रीम को अनुकूलित करने की सुविधा देता है।
जब ट्विच विज्ञापन शुरू हो तो ओबीएस स्टूडियो में जेफ बेजोस की तस्वीर कैसे दिखाएं
यह स्क्रिप्ट उदाहरण ओबीएस स्टूडियो में जेफ बेजोस की तस्वीर को टॉगल करता है जब एक ट्विच विज्ञापन शुरू और समाप्त होता है।
स्क्रिप्ट उदाहरण
import com.squiso.*;
import com.squiso.exception.*;
import com.squiso.scripting.*;
import com.squiso.scripting.data.*;
import com.squiso.keyboard.*;
import com.squiso.twitch.*;
import com.squiso.datatypes.*;
import com.squiso.utils.*;
import com.squiso.sysinfo.*;
// Important - Please do not change the row below - otherwise you will get a compilation error!
public class Script_Example extends SquisoScript {
    
    @Override
    public void onTwitchAd(OnTwitchAdData data, API api) throws SquisoException {
        // Get the ad duration in seconds
        SquisoInteger durationSeconds = data.getDuration();
        // Specify the OBS scene
        SquisoString sceneName = new SquisoString("gaming");
        // Specify the OBS scene item
        SquisoString itemName = new SquisoString("jeff_bezos");
        // Show the scene item
        api.setOBSSceneItemVisibility(sceneName, itemName, true);
        // Send a chat announcement
        SquisoString announcementMessageStarted = new SquisoString("Ads started!");
        api.sendTwitchChatAnnouncement(announcementMessageStarted);
        // Specify the total time the item should be visible
        SquisoInteger waitDuration = new SquisoInteger(durationSeconds.get() * 1000);
        api.doLater(waitDuration, () -> {
            // Hide the scene item
            api.setOBSSceneItemVisibility(sceneName, itemName, false);
            // Send a chat announcement
            SquisoString announcementMessageEnded = new SquisoString("Ads ended!");
            api.sendTwitchChatAnnouncement(announcementMessageEnded);
        });
    }
}