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

Update:

BaseBased 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".

Update:

Base 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".

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".

added 7 characters in body
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135

Update:

Base on your updated question I guess you want something like

Manipulate[{a, b, expFile}, {a, 1, 10}, {b, 1, 10}, {{expFile, ""}, ControlType -> None},
 Button["export", Export[SystemDialogInput["FileSave"]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".

Update:

Base on your updated question I guess you want something like

Manipulate[{a, b, expFile}, {a, 1, 10}, {b, 1, 10}, {{expFile, ""}, ControlType -> None},
 Button["export", Export[SystemDialogInput["FileSave"], {{"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".

Update:

Base 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".

added 457 characters in body
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135

Update:

Base on your updated question I guess you want something like

Manipulate[{a, b, expFile}, {a, 1, 10}, {b, 1, 10}, {{expFile, ""}, ControlType -> None},
 Button["export", Export[SystemDialogInput["FileSave"], {{"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".

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".

Update:

Base on your updated question I guess you want something like

Manipulate[{a, b, expFile}, {a, 1, 10}, {b, 1, 10}, {{expFile, ""}, ControlType -> None},
 Button["export", Export[SystemDialogInput["FileSave"], {{"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".

Post Undeleted by Karsten7
Post Deleted by Karsten7
added 99 characters in body
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135
Loading
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135
Loading