How do I create a windows screensaver?

Get help using Construct 2

Post » Sun Jan 10, 2016 1:02 pm

Hi!

I know there are some screensavers able to show webpages. Someone uploaded one to the forums a long time ago. But this time I'm trying to make a standalone windows screensaver. It is simply a nw.js windows app I rename as ".scr" (instead of ".exe").

These are the things I have managed to solve:
1) the app has to be maximized -- I solved it with nwjs maximize action.
2) Keyboard press / mouse move detection has to be built into the program -- I solved it by storing mouse.AbsoluteX and mouse.AbsoluteY and comparing distance() travelled from stored values to current ones, but I had to add a delay between nwjs maximize action and mouse position storing. Keyboard press and touch events are easier to detect.
3) On any event from (2), screensaver window has to close. It took me some time to imagine where to find the window close action. It is on browser object. Nice to know that,... The main reason I never made apps for tizen was I had to include a close action, and I didn't where to find it.

Here are the things I can't manage to solve:
4) Configuration screen. It is called with a special command line argument ("/c" or "/c number"), but nwjs doesn't have a method or value to return command line arguments.
5) Attach to hwindow. When a screen saver preview is requested by user in desktop configuration menu, the program recieves an hwindow as command line argument. In case I solve (4) and want the screensaver be able to show a test version on the desktop configuration menu, I should be able to attach nwjs.window to a given hwindow, or at least detect hwindow position and size to mimickize it.

Is there some plugin to make (4) or (5) possible?


EDIT -- I removed some uppercase.
B
42
S
13
G
5
Posts: 132
Reputation: 8,513

Post » Tue Jan 12, 2016 9:26 pm

You're better off querying Google/asking StackOverflow this question.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,317
Reputation: 4,628

Post » Wed Jan 13, 2016 11:50 pm

Ok. I've read about nvjs argv:
https://github.com/nwjs/nw.js/issues/3838
I expected someone made a plugin so i didn't need to manually alter javascript code sent to nwjs.
B
42
S
13
G
5
Posts: 132
Reputation: 8,513

Post » Thu Jan 14, 2016 7:23 am

People still use screensavers? Invest your time into something more useful imo.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786


Return to How do I....?

Who is online

Users browsing this forum: GoblinPortal, MAVERICK, mchulet, NN81, whitephon and 8 guests