No internet connection
  1. Home
  2. Macro and Script Help

Stopping the script log popup window

By Josh Campbell @Josh_Campbell
    2024-01-03 12:02:04.762Z

    Title

    Stopping the script log popup window

    What do you expect to happen when you run the script/macro?

    It does what I want it to do but a popup always appears saying script log and the naming that the script has created. I would like to get rid of this popup

    Are you seeing an error?

    What happens when you run this script?

    it copies and formates the current date/naming I need

    How were you running this script?

    I used a Stream Deck button

    How important is this issue to you?

    5

    Details

    {
        "inputExpected": "It does what I want it to do but a popup always appears saying script log and the naming that the script has created. I would like to get rid of this popup",
        "inputIsError": false,
        "inputWhatHappens": "it copies and formates the current date/naming I need",
        "inputHowRun": {
            "key": "-MpfwmPg-2Sb-HxHQAff",
            "title": "I used a Stream Deck button"
        },
        "inputImportance": 5,
        "inputTitle": "Stopping the script log popup window"
    }

    Source

    const date = new Date();
    const year = date.getFullYear().toString().slice(-2)
    const month = String(date.getMonth()+1).padStart(2, "0")
    const day = String(date.getDate()).padStart(2, "0")
    const formattedDate = `_${day}.${month}.${year} _Splits_SFX ONLY`
    
    
    
    log(formattedDate)
    
    //Store date string into the clipboard.
    sf.clipboard.setText({
        text: formattedDate,
    });
    
    //Wait for Clipboard to be populated with text.
    sf.clipboard.waitForText();
    
    //Log the Text stored in the clipboard.
    log(sf.clipboard.getText().text);
    
    
    
    
    
    
    
    

    Links

    User UID: 7utvMEXfl5SG0IuxJh9awu7VucJ2

    Feedback Key: sffeedback:7utvMEXfl5SG0IuxJh9awu7VucJ2:-NnEBw1rBXl_Hxak8QMv

    Feedback ZIP: JxKf8ukYrVC3aor5i0SF60QREKkgWBEVKfqU3XTF5AnvquIl9BspTmb0tah4oAFBFV2go+iRlBnXTO0m3NrDydkIMh1/wELaE8I0B8AWK7086JuKt7vqvPEwGVmCPSh6iKxL98HQ1QNWLjI8rgdi/F9sUKu85olY27oaqk4zv7/7m9uMvOhSeBZI/WDsgPKf7vYunm0taXB5izbQngJaAlek8wWN5jDR/qsHzAB9JmDRbKLNw6L9Th8Rd3ASvKNafRyPjUVjrf4kh7rmDGKU+EeCrCi9OjQkJqBDw/T0XverTrpzo0Npp2IDv7Oy3n7gJ6i/6VYn05eRHi+HWzknqA==

    • 1 replies
    1. Chad Wahlbrink @Chad2024-01-03 23:04:34.797Z

      Hey @Josh_Campbell!

      To remove logging, you can remove any of the lines of code that say log() from the script

      So the script would look like this:

      const date = new Date();
      const year = date.getFullYear().toString().slice(-2)
      const month = String(date.getMonth()+1).padStart(2, "0")
      const day = String(date.getDate()).padStart(2, "0")
      const formattedDate = `_${day}.${month}.${year} _Splits_SFX ONLY`
      
      
      
      // **** Line 9 omitted ****
      
      //Store date string into the clipboard.
      sf.clipboard.setText({
          text: formattedDate,
      });
      
      //Wait for Clipboard to be populated with text.
      sf.clipboard.waitForText();
      
      // **** Line 19 omitted ****
      

      OR a bit cleaner like this:

      
      const date = new Date();
      const year = date.getFullYear().toString().slice(-2)
      const month = String(date.getMonth()+1).padStart(2, "0")
      const day = String(date.getDate()).padStart(2, "0")
      const formattedDate = `_${day}.${month}.${year} _Splits_SFX ONLY`
      
      //Store date string into the clipboard.
      sf.clipboard.setText({
          text: formattedDate,
      });
      
      //Wait for Clipboard to be populated with text.
      sf.clipboard.waitForText();