title: comment a line of code if checkbox checked Pysimplegui
body: <p>how can i comment/uncomment a line of code by checking and unchecking a checkbox in python with PySimpleGUI?</p>
  <p>also i don't know if i wrote the code in correct way but i'm just trying to comment a line of code by checking the checkbox</p>
  <p>any other way to do it is also fix my problem</p>
  <p>This is my code</p>
  <pre><code>layout = [[sg.Text('Choose Options'))],
              [sg.Checkbox('Save Posts',key=&quot;save-ed&quot;)],
                   [sg.Submit('Next')) ,sg.Cancel(&quot;Cancel&quot;))] ]
  
  window = sg.Window('my bot', layout, icon=&quot;logo.ico&quot;)
  event, values = window.read()
  window.close()
  while True:
      event, values = window.read()
      if event == sg.WIN_CLOSED or event == &quot;Cancel&quot;:
          break
      elif values['save-ed'] == True:
          save_input = ['usersave']
      elif values['save-ed'] == False:
          save_input = ['#usersave']
  </code></pre>
  <p>and this is the code which i want to comment or uncomment with checkbox</p>
  <pre><code> try:
              save_input = webdriver.find_element_by_xpath('/html/body/div[4]/div[2]/div/article/div[3]/section[1]/span[4]/div/div/button/div')
              save_input.click()
              sleep(randint(4,5))
    except NoSuchElementException:
         pass
  </code></pre>