Flex - 在后台运行 Air 应用程序 [英] Flex - Run Air Application In Background

查看:33
本文介绍了Flex - 在后台运行 Air 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的用户提供让我的应用程序自动启动并在每周特定时间完成任务的选项.

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=true 在登录时启动我的应用程序,但我想检测时间是否是他们选择的时间,如果不是,则在后台运行应用程序直到时间匹配或用户关闭了他们的计算机.

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.

有人知道这样做的方法吗?在 Adob​​e 比较 Flex 网络应用程序和桌面应用程序的网页上,它暗示我应用程序可以在后台运行,但我很难找到任何东西.

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

这篇关于Flex - 在后台运行 Air 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆