Flex的 - 运行AIR应用程序在后台应用程序、后台、Flex、AIR

2023-09-09 21:45:32 作者:森浓不绿

我想为我的用户可以选择自动有我的应用程序的启动,每周完成一个任务,在一定的时间。

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.

我可以使用NativeApplication.nativeApplication.startAtLogin =真我的应用程序启动的日志,但后来我想,如果检测的时间是他们所选择的时间,如果没有的话在后台运行的应用程序,直到时间不匹配或者用户关闭其计算机。

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.

有谁知道的一种方式做到这一点?在Adobe的网页上比较灵活网络应用和桌面应用它意味着,我认为应用程序可以在后台运行,但我在努力寻找什么。

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.

推荐答案

您可以关闭的初始本机窗口,而不杀死进程

You can close the initial native window without killing the process

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

您可以关闭初始本机窗口,创建一个新的窗口,作为一个桌面小部件没有出现在任务栏与无论是实用程序或轻量级的窗口类型。

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