DeviceExecuteAsynchronous

DeviceExecuteAsynchronous[device,"command",fun]

在设备上启动指定命令的异步执行,当事件发生时调用处理函数 fun.

DeviceExecuteAsynchronous[device,"command",params,fun]

执行参数为 params 的命令.

更多信息

  • 设备可以由 DeviceObject 指定,或者由表示设备类别的字符串指定.
  • DeviceExecuteAsynchronous 是一个非阻断函数,返回 AsynchronousTaskObject.
  • 参数 params 可以作为原始参数列表给出,或者作为给出参数名称和值的关联或规则列表给出.
  • 被馈送到处理函数的事件指定形式随设备不同而变化.

范例

基本范例  (1)

异步读取从指定 URL 获取 Cookie 的演示设备,同时在后台调用 URLFetchAsynchronous

所获取的 Cookie:

Wolfram Research (2014),DeviceExecuteAsynchronous,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html.

文本

Wolfram Research (2014),DeviceExecuteAsynchronous,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html.

CMS

Wolfram 语言. 2014. "DeviceExecuteAsynchronous." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html.

APA

Wolfram 语言. (2014). DeviceExecuteAsynchronous. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html 年

BibTeX

@misc{reference.wolfram_2024_deviceexecuteasynchronous, author="Wolfram Research", title="{DeviceExecuteAsynchronous}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html}", note=[Accessed: 18-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_deviceexecuteasynchronous, organization={Wolfram Research}, title={DeviceExecuteAsynchronous}, year={2014}, url={https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html}, note=[Accessed: 18-November-2024 ]}