Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Fix HP Communications and Fast User Switching' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fix HP Communications and Fast User Switching
Authored by: reynolds5520 on Feb 06, '05 03:50:06PM
After testing various scripts for killing/starting the HPCommunications.APP, I finally found a solution that gets this job done without leaving shell windows open (or hanging for long timeout periods). The trick is to make it an applescript application that performs a shell script within the applescript. To be certain that the script killed HP when I wanted it killed and started it when I wanted it to start I made a script for each. I used ideas from the hint above and other sources. I hope I haven`t failed to credit anyone... Paste each of the texts below into a new applescript script editor window and save as an application. Place the applications in the switch-in and switch-out folders as appropriate.

*********first script starts here**********************


-- Start_HP_Communications by Kevin Reynolds   (c) 2005




do shell script "#!/bin/sh
		#ac
		# wakeup: start HP Commmunications process
		#
		open '/Library/Printers/hp/HP Communications.app'"






-- From DealWithHP by Adam Christianson  (see end for credits)

-- This script is for use with HP All-In-One (AIO) Printer/Fax/Scanner
-- with OS X Fast User Switching

-- Under fast user switching each user runs a new copy of the
-- printer USB driver called "HP Communications.app"

-- Only one copy can run at a time or printer communications will fail

-- Use this script with WinSwitch to restart HP Communications when
-- switching into one user and out from another.

--Place this script in: ~/Library/Application Support/WinSwitch/Switch-In Items
--for each user.



-- DealWithHP.applescript
-- DealWithHP

--  Created by Adam Christianson on Tue Dec 03 2002.
--  Copyright (c) 2002 Terraform Creative. All rights reserved.




********************ends here*********************




********************second script starts here*****************


-- Kill_HP_Communications by Kevin Reynolds   (c) 2005


-- From DealWithHP by Adam Christianson  (see end for credits)

-- This script is for use with HP All-In-One (AIO) Printer/Fax/Scanner
-- with OS X Fast User Switching

-- Under fast user switching each user runs a new copy of the
-- printer USB driver called "HP Communications.app"

-- Only one copy can run at a time or printer communications will fail

-- Use this script with WinSwitch to kill HP Communications when
-- switching out of one user and into another.

--Place this script in: ~/Library/Application Support/WinSwitch/Switch-Out Items
-- for each user.


tell application "Finder"
	if (get name of every process) contains "HP Communications" then

		tell application "HP Communications" to quit

	end if
end tell



-- DealWithHP.applescript
-- DealWithHP

--  Created by Adam Christianson on Tue Dec 03 2002.
--  Copyright (c) 2002 Terraform Creative. All rights reserved.


*********ends here**************************


[ Reply to This | # ]
Fix HP Communications and Fast User Switching
Authored by: sig eigei on May 31, '05 07:12:41PM

Is there a way to make one script that checks to see if HP Communications is active or not and then executes the proper command? I treid to fashion something together from
http://www.macosxhints.com/comment.php?mode=display&sid=20041104142244497&title=Simpler+Script&pid=48455
but the script got stuck whenever it found it needed to activate HP Communications. Any ideas? I will try to the two scripts with Winswitch and see if I can get them going.



[ Reply to This | # ]