Skip to main content
5 of 5
added 1 character in body
Karsten7
  • 27.6k
  • 5
  • 74
  • 135

Update:

Based on your updated question I guess you want something like

Manipulate[{a, b}, {a, 1, 10}, {b, 1, 10},
 Button["export", Export[SystemDialogInput["FileSave",".txt"], {{"a", a}, {"b", b}}, "Table"], 
  Method -> "Queued"],
 Button["import", {a, b} = Import[SystemDialogInput["FileOpen", ".txt"], "Table"][[All, 2]], 
  Method -> "Queued"]]

Old post:

You could use a Setter instead of a Button to get the intended scoping

Manipulate[Plot[Sin[x (1 + a*x)], {x, 0, 6}], {a, 0, 100}, 
 Dynamic@Setter[Dynamic@a, ToExpression["a=90"], "a=90"]]

One can make the Setter looker like a Button by adding the option Appearance -> "Button".

Karsten7
  • 27.6k
  • 5
  • 74
  • 135