Jump to content

no sound after wake-up from sleep


  • Please log in to reply
21 replies to this topic

#21
cobra76

cobra76

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
  • Gender:Male
  • Location:hungary
Here is my method. It automatically run an applescript in backround from terminal (using osascript command) automatically at wakeup.

I'm use the an applescript found in this site (not the german), and the Sleepwatcher app.

If your sound not work after wakeup, but mute on, then off fix this, this method will automate this for you.

1. Install sleepwatcher both packages.
2. It's need to be enabled the Enable access for assistive devices in the Universal access part of the System preferencies.
3. Download and unpack my attached files.
Attached File  sound.zip   1.59KB   118 downloads
This files are invisible, so you will need an app to copy them to the root of your home folder. Pathfinder or Midnight commander do the job. Or you can use terminal to copy with the cp command. Unfortunately the os always made a folder to the unpacked files, this because need them copy. Maybe somebody can a simplest solution (installer package?).

Details:
Maybe you can use this metod, for other problems. The sleepwatcher can run boot or sleep scripts too, so there are many possibilites.
The applescript:
tell application "System Preferences"
	 set current pane to pane "com.apple.preference.sound"
 end tell
 tell application "System Events"
	 tell process "System Preferences"
		 click checkbox "Mute" of first group of window "Sound"
	 end tell
 end tell
 tell application "System Events"
	 tell process "System Preferences"
		 click checkbox "Mute" of first group of window "Sound"
	 end tell
 end tell
 tell application "System Preferences" to quit
It's quit after mute on and off.
Test with the script editor, if work. I'm save mine to my home folder and name it .soundscript.scpt .

Then install sleepwatcher both packages. This app use a file called .wakeup. This file is'nt exist after install sleepwatcher, its need to be created, and set its chmod to executable. This is in the root of your home folder.
The readme of sleepwatcher describe how, but i'm attach mine. The . (dot) in the front of the files name means it'll be invisible.
The .wakeup:
osascript .soundscript.scpt
If you use script that not in the root of the home folder it need to be write in its path.

The osascript command can run a script file from terminal.

Don't forget to be enabled the Enable access for assistive devices.

#22
maczx

maczx

    InsanelyMac Protégé

  • Members
  • Pip
  • 19 posts

Here is my method. It automatically run an applescript in backround from terminal (using osascript command) automatically at wakeup.

I'm use the an applescript found in this site (not the german), and the Sleepwatcher app.

If your sound not work after wakeup, but mute on, then off fix this, this method will automate this for you.

1. Install sleepwatcher both packages.
2. It's need to be enabled the Enable access for assistive devices in the Universal access part of the System preferencies.
3. Download and unpack my attached files.
Attached File  sound.zip   1.59KB   118 downloads
This files are invisible, so you will need an app to copy them to the root of your home folder. Pathfinder or Midnight commander do the job. Or you can use terminal to copy with the cp command. Unfortunately the os always made a folder to the unpacked files, this because need them copy. Maybe somebody can a simplest solution (installer package?).

Details:
Maybe you can use this metod, for other problems. The sleepwatcher can run boot or sleep scripts too, so there are many possibilites.
The applescript:

tell application "System Preferences"
	 set current pane to pane "com.apple.preference.sound"
end tell
tell application "System Events"
	 tell process "System Preferences"
		 click checkbox "Mute" of first group of window "Sound"
	 end tell
end tell
tell application "System Events"
	 tell process "System Preferences"
		 click checkbox "Mute" of first group of window "Sound"
	 end tell
end tell
tell application "System Preferences" to quit
It's quit after mute on and off.
Test with the script editor, if work. I'm save mine to my home folder and name it .soundscript.scpt .

Then install sleepwatcher both packages. This app use a file called .wakeup. This file is'nt exist after install sleepwatcher, its need to be created, and set its chmod to executable. This is in the root of your home folder.
The readme of sleepwatcher describe how, but i'm attach mine. The . (dot) in the front of the files name means it'll be invisible.
The .wakeup:
osascript .soundscript.scpt
If you use script that not in the root of the home folder it need to be write in its path.

The osascript command can run a script file from terminal.

Don't forget to be enabled the Enable access for assistive devices.


so i just have this issus on my alc269 codec .i just do not follow what u do .would u post this method one by one step,so i could do as your pracitce!



thx a lot!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2015 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy