Code Monkey home page Code Monkey logo

gotosleep's People

Contributors

johnkary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gotosleep's Issues

Error when executing osascript in 64-bit architecture mode

Message

osascript[3883:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.  Did find:
    /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.

Environment

OSX 10.6.3
Adobe CS4 installed

May be caused by osascript running in 64-bit (x64) architecture, while Adobe Unit Types Scripting Addition (CS4) was not compiled with that architecture.

file /usr/bin/osascript
/usr/bin/osascript: Mach-O universal binary with 3 architectures
/usr/bin/osascript (for architecture x86_64):   Mach-O 64-bit executable x86_64
/usr/bin/osascript (for architecture i386): Mach-O executable i386
/usr/bin/osascript (for architecture ppc7400):  Mach-O executable ppc

/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: Mach-O universal binary with 2 architectures
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types (for architecture ppc):   Mach-O bundle ppc
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types (for architecture i386):  Mach-O bundle i386

Related Links

http://forums.adobe.com/thread/486208 - Thread about executing with explicit architecture
http://kb2.adobe.com/cps/516/cpsid_51615.html - Adobe article on solutions

Computer still sleeps after battery depletion

If you set a sleep timer and the battery depletes before the timer reaches 0, the timer will resume when power is restored, and go to sleep when it reaches 0.

  1. Current time is 8:00am
  2. Invoke sleep in 30 minutes: gotosleep 1800
  3. Battery depletes after 10 minutes (8:10am)
  4. Computer is plugged into wall and restored power (10:00am)
  5. Script continues executing and goes into sleep state (10:20am)

This is in error, as the intended sleep time was 8:30am, but due to power loss, sleep state was at 10:20am.

Could fix by storing current UNIX time at instantiation and comparing for accuracy when time to invoke sleep. If invoke sleep time > actual sleep time, do not execute.

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.