Mac and OSX – Peter Bending https://peterbending.com PWJB Fri, 18 Mar 2016 13:40:20 +0000 en-US hourly 1 https://wordpress.org/?v=5.3.12 https://peterbending.com/wp-content/uploads/2019/03/cropped-pwjb-logo-1-32x32.png Mac and OSX – Peter Bending https://peterbending.com 32 32 El Capitan open and quit an app every 6 hours https://peterbending.com/latest/el-capitan-open-and-quit-an-app-every-6-hours/ https://peterbending.com/latest/el-capitan-open-and-quit-an-app-every-6-hours/#respond Fri, 18 Mar 2016 13:37:19 +0000 http://peterbending.com/?p=216 Continue reading "El Capitan open and quit an app every 6 hours"

]]>
after opening “Automator” and spending 2 minutes dragging and dropping actions I though no this need to be done with AppleScript !

Then looking at the fact the AppleScript would need to run constantly I thought this is best for a Cron job!

Looking at apples tech docs Cron is being depricated!

Right so the replacement is to use Launch Daemons and Agents !

See:
https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html

 

So I want to exit and re launch an app called EvoCam every 6 hours, my solution is to create 8 plist files the logic is:

24 / 6 = 4

and I want it to Exit EvoCam on the hour and re open it every 1 minute passed the hour.

so 2 * 4 = 8

To exit EvoCam:

I saved this file to (where ~ is your user directory):

~/Library/LaunchAgents/com.exit.evocam.1.plist
[cc lang=”xml” tab_size=”2″ lines=”40″]


Label
com.exit.evocam.1
Program
/usr/bin/osascript
ProgramArguments

osascript
-e
tell application “Evocam” to quit

StartCalendarInterval

Hour
12
Minute
00

[/cc]

To Launch EvoCam:

Saved this to :
~/Library/LaunchAgents/com.launch.evocam.1.plist
[cc lang=”xml” tab_size=”2″ lines=”40″]


Label
com.launch.evocam.1
Program
/usr/bin/osascript
ProgramArguments

osascript
-e
tell application “Evocam” to open

StartCalendarInterval

Hour
12
Minute
01

[/cc]

Then duplicate each file 4 times advancing the Hour by 6 , so it quits the app every 6 hours and opens it at every one minute past.

Maybe someone can explain hot to get the .plist file to Loop every 6 hours?
For now this will do!

Obviously you change “EvoCam to the name of the app or program you want to launch.

]]>
https://peterbending.com/latest/el-capitan-open-and-quit-an-app-every-6-hours/feed/ 0
Show hidden files on Mavericks (10.9) https://peterbending.com/latest/show-hidden-files-on-mavericks-10-9/ https://peterbending.com/latest/show-hidden-files-on-mavericks-10-9/#respond Thu, 30 Jan 2014 13:35:40 +0000 http://peterbending.com/?p=211 Continue reading "Show hidden files on Mavericks (10.9)"

]]>
Open the terminal app from “Applcations > Utilities”.

To show all files enter:

defaults write com.apple.finder AppleShowAllFiles 1 && killall Finder

To hide hidden files again

defaults write com.apple.finder AppleShowAllFiles 0 && killall Finder

1 = show all files

0 = do not show all files

In OS X Mountain Lion / Mavericks, you can no longer open hidden folders normally (by double-clicking).

You can however, open hidden folders by right-clicking on them, and clicking “Open”.

On previous versions of mac os:

To show all files enter:

defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder
To hide hidden files again
defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder
]]>
https://peterbending.com/latest/show-hidden-files-on-mavericks-10-9/feed/ 0
Bootcamp missing from Startup Disk control panel https://peterbending.com/latest/bootcamp-missing-from-startup-disk-control-panel/ https://peterbending.com/latest/bootcamp-missing-from-startup-disk-control-panel/#respond Thu, 30 Jan 2014 13:23:27 +0000 http://peterbending.com/?p=207 Continue reading "Bootcamp missing from Startup Disk control panel"

]]>
Today when i checked my Startup Disk control panel my Bootcamp partition had disappeared!

Of course you can choose the disk or partition to boot from start up by holding down the option key unless like me you are using a wireless keyboard!

Which leaves the option to change start up form “System preferences > Startup Disk ” as a very useful panel.

So why you ask did my Bootcamp disk not show up in “System preferences > Startup Disk “?

For me it was as simple as my Tuxera NTFS driver had mounted my Bootcamp volume as it had recognised the bootcamp volume (on a mac a disk or partition is refereed to as a volume in case you are wondering why I suddenly changed my wording).

So the fix if running Tuxera NTFS:

  1. Open “System preferences > Tuxera NTFS”
  2. Click on Volumes under the Tuxera NTFS panel.
  3. Choose your BootCamp volume.
  4. Check the box for “Disable Tuxera NTFS”
  5. Then either reboot your system or open Disk utility which you can find in the utilities folder in Applications and unmount your bootcamp volume and then mount it again.

Now when you check under “System preferences > Startup Disk ” you will see the BootCamp partition again.

You will also lose the ability to write to the bootcamp partition as you have told Tuxera NTFS not to mount the bootcamp volume.

So to reverse this you need to delete the file “/Volumes/BOOTCAMP/.Tuxera-NTFS/disable-driver” that is assuming you have called your bootcamp volume “BOOTCAMP”.

]]>
https://peterbending.com/latest/bootcamp-missing-from-startup-disk-control-panel/feed/ 0