0
$\begingroup$

Note that if I execute

NotebookSave[InputNotebook[], 
 SystemDialogInput["FileSave", "C:\\myfile.nb"]]

will popup Save as.. window whose initial full path is C:\\myfile.nb

If I execute

Button["Click Here", 
 NotebookSave[InputNotebook[], 
  SystemDialogInput["FileSave", "C:\\myfile.nb"]]]

then it generates Click Here button. If I press that button, I get an error message :

SystemDialogInput::nprmtv: SystemDialogInput is not currently supported within preemptive evaluations.

Then how do I create something(?) such that if I activate(?) that something,
it pops up Save as.. window whose initial full path is C:\\myfile.nb.

The solution doesn't have to be a button, but it should be easy to activate.
This question can be understood as a problem of bypassing something.

$\endgroup$
2
  • 1
    $\begingroup$ I don't know the principle, but I found it out through search. Add Method -> "Queued" as Button Option. $\endgroup$
    – imida k
    Commented Feb 5 at 22:44
  • $\begingroup$ Button["Click Here", NotebookSave[InputNotebook[], SystemDialogInput["FileSave", "C:\\myfile.nb"]], Method -> "Queued"] $\endgroup$
    – imida k
    Commented Feb 5 at 22:44

0