Flex - 在后台运行空气应用程序

发布于 2024-10-31 18:04:32 字数 273 浏览 1 评论 0原文

我试图为我的用户提供一个选项,让我的应用程序自动启动并在每周的特定时间完成任务。

我可以使用 NativeApplication.nativeApplication.startAtLogin=true 让我的应用程序在登录时启动,但然后我想检测时间是否是他们选择的时间,如果不是,则在后台运行应用程序,直到时间匹配或用户关闭计算机。

有谁知道有什么方法可以做到这一点?在 Adob​​e 比较 Flex Web 应用程序和桌面应用程序的网页上,它向我暗示应用程序可以在后台运行,但我很难找到任何东西。

I am trying to provide my users with the option to have my application launch automatically and complete a task at a certain time every week.

I can make my application launch at log in using NativeApplication.nativeApplication.startAtLogin=true but I then want to detect if the time is the time they selected and if it isn't then run the application in the background until the time does match or the user shuts down their computer.

Does anyone know of a way to do this? On Adobe's webpage comparing Flex web apps and desktop apps it implied to me that applications could be run in the background but I'm struggling to find anything.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

永不分离 2024-11-07 18:04:32

您可以关闭初始本机窗口而不终止进程

NativeApplication.nativeApplication.autoExit = false;
NativeWindow(this.stage.nativeWindow).close();

,或者

您可以关闭初始本机窗口并创建一个充当桌面小部件的新窗口,而不会以 UTILITY 或 LIGHTWEIGHT 窗口类型出现在任务栏中。

http://help.adobe.com/en_US /air/reference/html/flash/display/NativeWindowInitOptions.html#type

You can close the initial native window without killing the process

NativeApplication.nativeApplication.autoExit = false;
NativeWindow(this.stage.nativeWindow).close();

OR

You can close the initial native window and create a new window that acts as a desktop widget without appearing in the taskbar with either the UTILITY or LIGHTWEIGHT window type.

http://help.adobe.com/en_US/air/reference/html/flash/display/NativeWindowInitOptions.html#type

铜锣湾横着走 2024-11-07 18:04:32

您可以在下一个“作业”应该运行的时间保持进程运行,或者您可以设置特定于操作系统的系统 cron 作业(或类似的东西)。您需要使用 NativeWindow 选项 ' LIGHTWEIGHT' 以便您的应用程序不会向用户显示。

就我个人而言,对于这些类型的过程,我什至不尝试使用 Air,因为它并不是真正为这类东西而设计的。它旨在用于基于 UI 的应用程序,而不是基于流程的应用程序。请改用 Java 或 C#。

Either you keep the process running which times when the next 'job' should be ran, or you can set a system cron job (or something similar) which is specific to the OS. You'll want to use the NativeWindow option of 'LIGHTWEIGHT' so that your application doesn't show up to the user.

Personally, for these kinds of processes, I don't even try to use Air since it isn't really made for this kind of stuff. It's meant to be used for UI based apps and not process based. Use Java or C# instead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文