stack "answer-file" id=9115 rect="130,221,819,372" sharedvars="true" backgroundcolor="255,255,255"
    card "card-1" id=9116 wtid="card" backgroundcolor="rgb(30, 25, 32)"
        button "answer file" id=9117 fontweight="400" accentcolor="" textfont="~b64:LWFwcGxlLXN5c3RlbSwgQmxpbmtNYWNTeXN0ZW1Gb250LCAiU2Vnb2UgVUkiLCBSb2JvdG8sIEFyaWFsLCBzYW5zLXNlcmlm" radius="6" textcolor="#000" textstyle="normal" clicktext="file" borderwidth="1px" bordercolor="rgb(153, 153, 153)" asbackground="false" wtid="1" wttype="button" icongravity="top" rect="50,50,200,80" disabled="false" icon="" foregroundcolor="rgb(255, 255, 255)" text="" backgroundcolor="rgb(43, 43, 43)" textsize=16 label="" visible="true" textalign="center" layer="2" highlight="false" angle=0
on mousedown
   answer file "Save file as:" with "mydata" extensions "json,wts,wte,txt" buttons "Cancel,Ok"
   if it is "Cancel" then exit mousedown
   if it is "Ok" then
      put the result into myChosenFilename
      clear message box
      put myChosenFilename  -- outputs: mydata.json (example)
      put it -- button choice
      put "This is a sample bit of data" into myData
      write myData to file myChosenFilename
   end if
end mousedown
        end button
    end card
end stack
