PrintSettings.activePrinter not writeable in JS on Mac and CS4

Somehow I feel this may have come up before, but I can’t find anything, so:
According to »Photoshop CS4 JavaScript Ref.pdf«
app.activeDocument.printSettings.activePrinter
should be read-write, but I fail to be able to change the active printer (Mac OS X 10.5.8 and Photoshop 11.0.1).
Do any of You know if there is a known issue or have an idea what I could be overlooking?

I only got a s far as seeing if this was a possibility and this did work for me here. I set up a bunch of fake IP printers to test (half dozen).
I could then keep changing the index of the printerList array and each time this was the selected printer in the print dialog.
Printing added to the correct spoolers. What I think you may have to do is NOT have last used selected in system prefs.
This requires a little cleaning up as I cheated with the bridgetalk message for now. Don't know why filePath.remove(); is NOT working either will have to look at that too (could use shell rm but don't think I need to). Here is my rough test script…
#target photoshop
// Get current system default printer name
var defaultPrinter = osxGetDefaultPrinter();
// Get list of available system printers
var printerList = osxAvailablePrinters();
// Set system default to choice
osxSetDefaultPrinter(printerList[2]);
function osxGetDefaultPrinter() {
var shellString = "lpstat -d | awk '{print $4}' > ~/Desktop/OSX_Default_Printer.txt";
btMessaging('bridge', shellString);
var filePath = new File('~/Desktop/OSX_Default_Printer.txt');
var defaultPrinter;
filePath.open('r');
while (filePath.tell() < filePath.length) {
var defaultPrinter = filePath.readln();
filePath.close();
filePath.remove();
return defaultPrinter;
function osxAvailablePrinters() {
var shellString = "lpstat -a | awk '{print $1}' > ~/Desktop/OSX_Available_Printers.txt";
btMessaging('bridge', shellString);
var filePath = new File('~/Desktop/OSX_Available_Printers.txt');
var printerList = new Array();
filePath.open('r');
while (filePath.tell() < filePath.length) {
printerList.push(filePath.readln());
filePath.close();
filePath.remove();
return printerList;
function osxSetDefaultPrinter(printerName) {
var shellString = "lpoptions -d " + printerName;
btMessaging('bridge', shellString);
function btMessaging(targetApp, script) {
var bt = new BridgeTalk();
bt.target = targetApp;
bt.body = 'app.system(' + script.toSource() + ');';
//bt.onResult = function(inBT) {}
//bt.onError = function(inBT) {}
bt.send();
Get default printer could be recalled as a test as using bridge system commands don't return anything.

Similar Messages

  • New to Mac and CS4

    I am new to both Macs and CS4. I just got a Mac, and today I was installing CS4Master Suite. There are 4 Application disc, and they loaded ok. There is a 5th disc, which is labeled "CONTENT". When you pop it in, no pop up window tells you where or how to install. This is where I need your help and expertise.
    Thanks

    Content is just files and extra plugins and such. Don't worry about it now. go ahead and familiarize your self with the apps. Once you start using apps you will begin to understand what these extras are for.
    You do not need the contents of the DVD to make the applications work. although you might want to use the images to play with photoshop if you don't have any of your own.

  • Notes not mirroring in Mail on Mac and iPhone

    Hi,
    I've had a problem with accessing/viewing/syncing Notes created on my iPhone, both viewing and syncing on my mac in Mail.
    Every time I click on a note in Mail on my mac, I get a 'loading' graphic and spinning ball, but no note appears. Ever. Not all the notes on my iPhone are in Mail on my mac either, 6 notes on my Phone, 4 show on my Mail. They are now set to sync through MobileMe, having synced manually before (again, unsuccessfully) through iTunes.
    I presently cannot create any new Notes in Mail either. To Do's, yes. Notes, no.
    I don't have my me.com email account set up through my mac Mail - is this contributing to the problem? I've read that true syncing can only be achieved via an IMAP account, but I though MobileMe handled that anyway. I only have my Hotmail POP account coming through Mail on the mac at present. I have today tried to create an account for my me.com account on Mail on my mac, but after 5 minutes of trying to contact the server, it refused to confirm and verify my password for some reason. This is happening every time. I can access my MobileMe account no problem via the internet, so no problem with the account name, password, etc.
    Could anyone please shed some light on where things are going wrong?
    Thanks.

    UPDATE:
    Phoned Apple helpline, went through creating new prefs, etc. Still didn't work.
    Passed onto specialist, by process of elimination, found that certain fonts were needed - Suitcase overwriting FontBook prefs, so MarkerFelt font not being switched on. Notes are now working!!!!

  • Can I install the traditional CS6 product (not creative cloud) on a mac and a windows pc?

    Hey,
    I already know that with creative cloud I can install CS6 on both a mac and a windows pc.
    But what about the traditional CS6 version (without creative cloud membership).
    Is it possible to install on both mac and windows pc, too, or is it restricted to one operating system, like in CS5.5 still?

    Traditional versions (perpetual licenses) are still platform specific: Windows only or Mac only.
    Installation on both Mac and PC is one of the USPs (Unique Selling Propositions) of the Cloud versions.

  • Actions F-buttons for MAC and CS4 - Help

    I just got a new Macbook Pro that I was planning to use for photo editing work with photoshop CS4. I currently use a PC to do all my photo editing and
    have many different actions setup using keys F2-F12.
    For example I have F8 button saved as - auto levels and add sharp
    Well I have installed the actions on my new Macbook pro and when in CS4, and when I press the  F8 button on the keyboard of the Mac, even through I have photoshop open and pictures loaded, F8 instead of running the action it does whatever its task is on the MAC, like volume control or mute or make the screen brighter and darker. I use all the F-buttons from F2 - F12 and need them to do work. How is this done on the MAC ? Ive never had this problem with a PC before. Do I need to disable the F-Keys ? How is that done ? Why wont they run the records action even if photoshop is open and running ?
    Any help would be great.
    Thanks

    You will need to go into system preferences of the Mac and then click the keyboard tab.
    Now you can disable all of the Apple functions set to the F keys. You may not want to do this but instead modify the actions to use modifier keys (command or Option)

  • ITunes Match on my iPhone shows songs that are not in iTunes on my Mac and PC.

    Yes, I know that deleting songs from iTunes does not necessarily mean they are deleted from iTunes Match, too. Not checking the box when deleting songs is definitely not why this is occurring, so hear me out. My Mac hosts my main iTunes library. What I do there, is synched with iTunes Match. In iTunes in Boot Camp, I have no local files, so all that iTunes on Windows shows me, are the songs that are matched with and uploaded to iTunes Match. As far as I can tell, it's exactly the same as my main library on my Mac.
    It's a different story on my iPhone, though. There are songs that show up on my iPhone that I have deleted on my Mac. Some several times, even. A little while ago, I ripped one of my CDs and had it matched with iTunes Match. I made some changes to the metadeta afterwards, though, so I deleted the songs and added and matched them again. And again, that same day. I did the same things with a single song.
    And now I'm stuck with three copies of the album and of the song in iTunes Match. But the weird thing is, that only one of each shows up in iTunes on Windows. That library, again, does not have any local music; it only shows what's in iTunes Match. I have tried disabling iTunes Match on my iPhone, I have deleted all local content on my iPhone, I have deleted the album and the song – the files that are showing up multiple times on my iPhone – from my Mac, updated iTunes Match, re-added the files and updated Match again. Unfortunately, none of this helped.
    After deleting the files and updating Match, I saw only two instances of the album and the song in question, instead of three. After re-adding them and updating Match again, there were three of each again. That means that there are two instances of the album and of the song 'stuck' in iTunes Match. And yet they don't show up in iTunes on either OS X or in Windows.
    Why is this happening? And, more importantly, how can I fix it? In the grand scheme of things, this is obviously a minor problem, but it's annoying me a lot nonetheless.

    Is there really nobody else with this problem? Really?

  • Can connect over wlan, but not using ethernet cable between mac and extreme

    Hi, I have a brand new Airport Extreme base station. Wireless LAN works well and both my wife's and my Mac can connect to the internet. When I connect the ethernet cable to my macbook, it does not connect to Extreme. Is this a feature or a required change in the setups?
    br
    Vesa

    vesaw, Welcome to the discussion area!
    On your MacBook, open System Preferences-> Network preference pane and ensure that Ethernet is enabled.

  • All of the Appoints in my calendar do not sync properly between my MAC and iPad

    it is really frustrating - some (with no rhyme nor reason) of my appts that I book into the calendar function on my iPad do not then sync across to my MAC Air.
    Does anyone know of a solution? Or what might be causing it?

    Welcome to the Apple Community.
    There may be a variety of reasons for this, such as different page set ups or fonts being substituted.

  • Calendars will not sync using current iTunes (Mac) and iPhone software

    Since the newest update to iTunes (Mac) 10.5.3 (3) my iPhone will not sync my calendars from my iPhone (5.0.1).  This is a huge problem considering I am out of my office most of the day, and rely on my calendar to keep me in the right place.  For the last week I have had to manually enter events on both my iPhone and my computer.  My computer is older and does not allow the operating system Lion, so I am running Snow Lepord OS 10.6.8.  Therefor, I can not use iCloud to sync any of my iPhone information.

    I finally found how to reset SyncService history through the Terminal port.  After I did this it all started to work correctly again. 
    http://support.apple.com/kb/TS1627
    Thanks for all of your help.

  • Skype not working at all for Mac and iPhone

    Hi! I'm running Skype ver.7.10 (777) on OSX Yosemite (10.10.3) on my MacBook Pro. I'm also running Skype ver.5.14.72 on my iPhone 5s on iOS 8.4. I've been having problems with Skype for Mac for the past week. It started with lagging messages in Group Chats (We have around 23 people in there, though usually only half would be online at the same time). It would take anywhere from 2 to 15 minutes to send a single word. Later, I would receive messages 30 minutes after it was sent from friends. Now, I can neither send or receive messages on Skype for Mac. Also, I would be able to chat with my contacts in private one on one chats, but when I tried to uninstall and reinstall the application, I could no longer chat with them and they would appear offline to me, even though I can confirm through webversion of Skype that they are indeed online.  As for Skype for iPhone, I noticed I stopped receiving messages late yesterday, but I only got the chance to check it out now. I can no longer send or receive messages from my groups or people I've chatted with on Skype for Mac. In short, my Skype for iPhone now has the same problem for Skype for Mac.  So far, I've only tried uninstalling, restarting my MacBook and reinstalling Skype. Same goes for my iPhone; uninstall, restart, reinstall. Really need help here since I have an important Skype conference call scheduled in a few hours. I'm not sure if webversion of Skype supports conference calls...? I hope this issue will be resolved soon though for now, any help will be appreciated. 

    I've been having a similar issue that began at approximately 7:00 pm EST last night - really hoping there's a solution soon! I've begun to receive messages from a group chat I'm in, but they're still few and far between.

  • My password is not being accepted on my mac and it doesn't recognize any of my devices

    My Mac doesnot accept my password even though I have changed it. It recognizes my devices (iPhone, iPad n iPod) only as a camera. The password prompt window is always on.

    On your iPad...
    Close All Open Apps... Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...

  • My 160MB iPod Classic won't sync from iTunes.  This is a recent problem.  The error message is "The iPod cannot be synched.  An unknown error occurred (-39)." The end result is that music will sync but photos will not.  Current software on Mac and iPod.

    My iPod classic won't synch from iTunes.  This is a recent problem.  The error message reads "The iPod cannot be synched.  An unknown error occurred (-39)." The end result is that the music will sync but photos will not sync.  I am running current versions of software on the iPod and the iMac / iTunes.  HELP! J

    First try to resolve #2 by:
    See
    iOS: Device not recognized in iTunes for Windows
    - I would start with
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or               
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    However, after your remove the Apple software components also remove the iCloud Control Panel via Windows Programs and Featurs appin the Window Control Panel. Then reinstall all the Apple software components
    - New cable and different USB port
    - Run this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    - Try on another computer to help determine if computer or iPod problem
    If you can resolve #1 and still get same message for #1 then you have to restore the iPod like the message says.

  • HT204053 Will the issue of not being able to merge @mac and @me ever get fixed?

    I keep seeing this issue arise over and over and I think this is a serious concern that Apple needs to address. We should have the option of merging our accounts. I have had these two accounts since the services began and I have purchases on both accounts that I want put into one. Maybe if enough people make this issue their priority, we will get noticed.

    This is not an issue, they are the same address, use whichever you prefer because nothing is getting 'fixed'

  • HT204394 Why not support Arabic language in Mac and iwork?!!

    There are some errors and also on the cursor when typing in Arabic language pages.

    To tell Apple you want to see these things fixed you need to use
    http://www.apple.com/feedback

  • Intel hd graphics 3000 not working in after effects cs5 and cs4

    Hi I am running after effects cs5.5 and when importing 3d objects the programs keeps on crashing. in the preferences the graphics is not recognized. I also have Photoshop cs5 and it works fine in that and it recognized, both are 64bit. Does any one have any solutions.
    proccsor Intel i5 2500k
    thanks

    Could this be fixed with updates from adobe as a lot of the newer computers with i3 i5 and i7 processors come with Intel hd graphics 2000/3000

Maybe you are looking for

  • Animated gif looks inverse in Cap 3

    I've done a search already at the forum and apparently if you have more than 100 frames it will mess up. But this animated gif has just 5 frames. I import it as an animation, on the stage it looks perfect, nice white background, all set to go. I then

  • How to Create a Session variable in JSP?

    How to create a session variable and add attributes to it? For example i want to create a session variable called "name" and add value "user" to it? if i try to do it with setAttribute(), it is giving error as both is of type string? how to do it? ki

  • Continuous Scatter Plot Comparison for Satellite Observation

    I am working on writing a java plug-in to analyze a scatter plot generated from satellite data(semi-major axis vs inclination). I have been looking at algorithms to do so and found DFS(Depth First Search) and BFS(Breath First Search). The point behin

  • Why won't Reader X display Welcome page created in AA 9 Pro?

    I created a Portfolio file in Adobe Acrobat 9 Pro that includes a Welcome and want to view it in Adobe Reader X.  Adobe Reader X opens the file but does not launch the Welcome page first- only the file icons page is displayed.  The Welcome page is di

  • Ichat ok in one login but not another

    I have the following problem: when I request vchat with others they do not get the request, when they request vchat with me , I get the request but it hangs on "starting vide chat". I created a new user account on my mac (computer account not ichat a