Can windows app run in the backGround?

window = {     suspendWhenMinimized = true, },

I did that… For a test I made it so every keystroke it counted +1… And it doesn’t work…

What are you trying to do?

So when you open the exe the counter starts and every time you press a key on the keyboard the counter goes up by one… But when the application is minimized it doesn’t count the keys pressed…

And I wouldn’t expect it to. Like I said in the first post, Corona SDK apps are dependent on an active screen so we can do frame updates. We have never supported Lua code executing while the app is not active on the screen. There has to be some reason why we would not suspend when minimized, but I don’t know the use case for it.

I now Michael peeked in here earlier, but it is the weekend and I wouldn’t expect any attention from them until next week.

You still really didn’t answer my question, what are you trying to do that requires a system tray app?  What are you trying to do in the background?

Rob

You only get “key” events when the application is the main open window. So you should be able to run timers and the like while minimized, but input only matters when you are focused on the game.

oh sorry @Rob … i want a key counter to see how much times i pressed my keyboard ; With a timer to see how many times in a X amount of time … if that makes sense…

So its not possible? (to run an app in the backfround) Maybe you could ask the devs to get my idea working in the future?

This certainly won’t work. You would have to tie into the keyboard system at a low system level, like a keylogger does and there is no way Corona SDK will do that. The app with focus (or the OS if no apps are in focus) gets the key events.

You need to do native work if you want to do that.

Rob

Alright thanks for clarifying that!