Giter Club home page Giter Club logo

Comments (7)

natewalck avatar natewalck commented on July 22, 2024

From [email protected] on July 21, 2010 13:39:27

I'll look and see if there is a Cocoa framework that does this. Do you have an example of another app that does this sort of thing?

Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low

from munki.

natewalck avatar natewalck commented on July 22, 2024

From [email protected] on July 21, 2010 13:49:39

Umm, you mean by using Cocoa or some other methods?

Not that I know at this moment, that applescript-hackish-thingy has worked for me.

I am not sure what that old iHook could do, it probably does not hurt to look at it's source: http://ihook.cvs.sourceforge.net/viewvc/ihook/ihook/

from munki.

natewalck avatar natewalck commented on July 22, 2024

From [email protected] on July 21, 2010 13:58:44

No, any commerical or Apple-supplied app that does this. I'm wondering if this is Apple-sanctioned behavior... If not, there's not likely to be a "native" way to do it.

Again this could be handled in a preflight script...

-Greg

from munki.

natewalck avatar natewalck commented on July 22, 2024

From [email protected] on August 22, 2010 03:08:20

This can be achieved by inserting plain-old-applescript in /usr/local/munki/updatecheckhelper between sleep and managedsoftwareupdate --auto -commands:

sleep $seconds

send empty keystroke which wakes up the screen and disables screensaver running over loginwindow

/usr/bin/osascript -e 'tell application "System Events"' -e 'key code "" using control down' -e 'end tell'

/usr/local/munki/managedsoftwareupdate --auto

(This could also be inserted in managedsoftwareupdate to be run on every check and install cycle but that is another story...and it could be managed by a separate key in ManagedInstalls.plist...yet another to-do-later...)

from munki.

natewalck avatar natewalck commented on July 22, 2024

From [email protected] on February 02, 2011 01:25:36

To do this in Carbon, code:

#include <Carbon/Carbon.h>
main() {
while (1==1) {
UpdateSystemActivity(OverallAct);
sleep(30);
}
}

I think the code speaks for itself, so unless the machine goes to deep sleep before 30 seconds has passed this will do the trick I think.

Compile as UB:
cc -arch ppc -o keypressppc keypress.c -framework Carbon
cc -arch i386 -o keypressi386 keypress.c -framework Carbon
lipo keypresspcc keypressi386 -create -o keypress

from munki.

natewalck avatar natewalck commented on July 22, 2024

From [email protected] on February 03, 2011 04:46:07

Thank you very much [email protected].

This works, it keeps sends screen lit when it is running.

As this "application" keeps running until it is terminated (while loop is true forever) it needs to be killed after munki has run.

Otherwise it will keep system awake as it sends activity message to system every 30 seconds.

-MiqViq

from munki.

natewalck avatar natewalck commented on July 22, 2024

From [email protected] on February 09, 2011 01:46:52

Yes, I needs to be killed... You could remove the loop and loop it from the munki script too.

from munki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.