Damon D Bell
Engaged
Damon D Bell
Engaged
Activity
‎Jan 15, 2016
07:39 AM
Is there a way to open the tool options panel in a script (the one from the menu under Window > Options). I figure this would probably need done using app.runMenuItem (stringIDToTypeID ("AddStringHere"));. I've been looking throught the string terminologies in the SDK files. However, I can't seem to figure out if there is a string to command opening the options panel.
... View more
‎Dec 15, 2015
08:20 AM
OK, I now understand what you are referring to. I was just thinking generic spreadsheet type data importing. You are referring to the Photoshop image data sets and variables. I have never scripted those but it's probably pretty simple to do. I just did a quick test and exported a data set. This was recorded by the Script Listener plugin. Therefore, it should be possible to at least do it that way. It may be possible through the DOM as well, not sure. However, the script listener combined with some other coding to select the right data set names would be a quick and dirty method to accomplish it. You may be able to do the batch processing with Image Processor and using an action. The action could be recorded to run any needed scripts. I do a lot of processing with action and run small scripts in an action set when it needs to use some logic. Anyway, I'm not in the UK. Hopefully you can find someone in the UK to work with. If not, I may be able to help you from across the Atlantic. However, I am booked for at least the next week or so. I'm still working to get all of my programs aligned to the new CC 2015.1 changes.
... View more
‎Dec 14, 2015
05:54 PM
This script will open a file dialog to import a csv. It will then put it into a 2 dimensional array. var csvFile = File.openDialog("Open CSV File","comma-delimited(*.csv):*.csv;"); textArray=[]; csvToArray(csvFile,textArray); function csvToArray(file,array){ var i=0; file.open('r') ; while (!file.eof){ array=file.readln().split(','); i++; } file.close(); }
... View more
‎Dec 14, 2015
05:33 PM
Specifically, what do you want the Photoshop script to do with the data after it's been imported? I have created many scripts that import csv file data and that is easy to do. I'm sure other file types would be easy to import as well but I've just always used plain old csv files.
... View more
‎Dec 14, 2015
03:41 PM
I'm referring to a dropdown list for a jsx script.
This is the same menu item type that is used in the Image Processor script for the action sets and actions dropdown lists. To see if the problem was only my scripts or I tested the Image processor script. I created actions and sets with really long names and opened Image Processor. Image processor did the same thing. The action Sets dropdown expands and pushes the UI width out. However, after selecting an action set, the actions dropdown does not expand when it populates with the long action names.
Based on my testing, I figured out it was not my scripts causing the issue.
... View more
‎Dec 14, 2015
03:30 PM
1 Upvote
I already reported this to Adobe. I'm just adding reference to this forum because this will probably help others. With the release of CC 2015.1, in Mac only, the dropdown menu width will auto expand past the set width to the width of largest menu item. Prior to CC 2015.1, the dropdown menu would stay at the defined width. The dropdown items would expand when clicking the dropdown menu. However, the dropdown menu itself would not expand. To test whether it was my scripts only, I added action sets and actions with long names and then opened Image Processor. This issue can be seen on the Image Processor Script too. The action sets with a long name will expand the action set dropdown menu width. However, after selecting an action set, when the action dropdown menu populates, it will not expand the width of the dropdown menu. Therefore, it appears that the menu items will not affect the width of the dropdown after the UI window is created. As a work around, I put the menu items I needed for my scripts into an array. Then, I looped through the array during the window.onShow function. This fixes the issue for my scripts. I also tried putting the code to populate the dropdown menu right before window.show(). However, that did not work. The only way to make it work was inside of the onShow function. Windows does not seem to have this issue. Also, I only have Mac Yosemite OS to test and it has not been tested on El Capitan OS.
... View more
‎Dec 14, 2015
03:28 PM
1 Upvote
With the release of CC 2015.1, in Mac only, the dropdown menu width will auto expand past the set width to the width of largest menu item. Prior to CC 2015.1, the dropdown menu would stay at the defined width. The dropdown items would expand when clicking the dropdown menu. However, the dropdown menu itself would not expand. To test whether it was my scripts only, I added action sets and actions with long names and then opened Image Processor. This issue can be seen on the Image Processor Script too. The action sets with a long name will expand the action set dropdown menu width. However, after selecting an action set, when the action dropdown menu populates, it will not expand the width of the dropdown menu. Therefore, it appears that the menu items will not affect the width of the dropdown after the UI window is created. As a work around, I put the menu items I needed for my scripts into an array. Then, I looped through the array during the window.onShow function. This fixes the issue for my scripts. I also tried putting the code to populate the dropdown menu right before window.show(). However, that did not work. The only way to make it work was inside of the onShow function. Windows does not seem to have this issue. Also, I only have Mac Yosemite OS to test and it has not been tested on El Capitan OS.
... View more
‎Dec 11, 2015
11:33 AM
In CC 2015.1, the square style script UI buttons have 27 pixels of spacing between the edge of the text and the edge of the button (left and right sides). In CS6, there is only have 4 only pixels of space on each side. This is adding and 46 pixels of extra horizontal space for each button. Is there a way to reduce this spacing? I tried settings margins and spacing for the button text but it has no effect. I then tried setting the button width. This can reduce it down to 14 pixels of space but the buttons won't shrink anymore than that. My scripts UIs have limited space to work with. I'm trying to keep the UIs only 300 pixels wide so they are out of way for image viewing. With the extra button spacing in CC2015.1, it pushes the UI width well past 400 pixels wide.
... View more
‎Dec 10, 2015
10:20 AM
Thanks so much. This makes my life way easier now.
... View more
‎Dec 10, 2015
09:38 AM
Is there a way to manually set the BG colors for the buttons, dropdown menus, etc? The code below is what I have been using for window background color. I tried this method for buttons and dropdown menus but it doesn't work. Is there a way to set custom colors on those items? For the window BG color I've been this method myWindow.graphics.backgroundColor=myWindow.graphics.newBrush(myWindow.graphics.BrushType.SOLID_COLOR, [0.93, 0.93, 0.93, 1]);
... View more
‎Dec 10, 2015
09:24 AM
I need my script to know if the version is CC 2015.1 or a prior CC 2015 version. I've been using parseInt(app.version) to determine the version number. This reports 16 for CC 2015.1 and also prior versions of CC 2015 as well. Is there a way to determine what the actual release revision is?
... View more
‎Dec 09, 2015
03:36 PM
Thanks for the update Jeff! I just got a chance to update to 2015.1. The .location works perfectly 🙂 Also, I love the new CC2015.1 scripting window design. It looks really sharp.
Just FYI for anyone needing to do this, if you are using .frameLocation then you'll need to change it to .location. I just realized that one of my windows was using .frameLocation instead of .location. That window was still centering. I switched that one to .location which fixed it. Maybe the difference between the 2 values is the window border width or something, not sure????? In any case, .location works perfectly so all is good.
... View more
‎Nov 03, 2015
02:09 PM
Thanks! I'll look into that. I've just been looking at the scripting guides and I think they are missing a lot of information.
... View more
‎Nov 03, 2015
01:25 PM
Thanks Mikaeru, That worked to close the Info tab but the popout window stayed open with the Properties tab. I seems like the popout window typically has both the Info and Properties tabs together. Following the same logic, I told it to close both and then the popout window closed as well which is what I want. Just curious, is this documented anywhere in Adobe's documentation? I search but could not find this. Is there some additional documention that I don't know about? If so, I'd really like to get a copy. app.runMenuItem (stringIDToTypeID ("closeInfoPanel")); app.runMenuItem (stringIDToTypeID ("closePropertiesPanel"));
... View more
‎Nov 03, 2015
12:12 PM
I have a script the takes a color sample when the script runs. When that happens, it opens the Photoshop color Info panel. Is there a way to close this with the script? Closing it does not create a script listener event. I checked the Adobe Javascript Reference guide as well but I don't see any reference to that either, although I may have overlooked something.
... View more
‎Sep 16, 2015
04:59 PM
I don't like working with points.............it's not intuitive. I guess it has a purpose in printing but for everyday editing as well as scripting it's just a nuisance.
... View more
‎Sep 16, 2015
03:53 PM
Thanks for the clarification about having to use points from 2014 on. That is good to know. I always use the character panel myself for sizing text, changing the aspect ratio, etc. However, the script has quite a few users. Some of those users are buying PSD templates and they want to use the script to replace text in the templates. I have no control of what people are feeding into the script and how the text was sized or transformed before the script sees it. I was hoping to make something that worked regardless of how the text was already sized. However, it's to complex for me to deal with all of the possible situations and how different PS versions and OS version handle it. I'll just need to train people to modify their templates by recreating the text layers and not transforming or re-sizing the image. What I may look into doing is having the script determine if the text has been transformed prior. If so, it could just alert them with a warning message. I think that may be possible?????? I'll need to look into it some more.
... View more
‎Sep 15, 2015
01:15 PM
Thanks for the code. Honestly, this is getting too complicated for me for the auto text resizing. I decided that all I want to do is have the script replace the text content (replace characters only). Is there a simple way to ensure that the text does not get resized and just have the script replace the text characters only? I thought the modified script listener code that i have did that but it still has issues resizing for certain layers. I find it difficult to believe that Adobe has left a bug like this in place that has spanned so many versions of Photoshop. Surely they must know about this issue by now???????
... View more
‎Sep 14, 2015
06:35 PM
Thanks for the response. I'm thinking that the issues that you were having are possibly from the same root issue/bug. For my script, there is know way of knowing what the font size needs to be. The script is a text content replacement script that reads a csv file, matches the image file name, and replaces the text contents based on the csv fields. The users will have text that varies in size. The script does not change the font or any text parameters. It just replaces the text contents. I was finally able to use the script listener and modify it so it doesn't resize the text. The script listener outputs 445 code lines when just replacing the text characters. I chopped off all of the unneeded stuff and got it to 16 lines so it only replaces the text contents. This seems to work without resizing the text. The second option I want the script to have is an auto text resizing. Basically, the script would be used to auto size the text based on the character length. Since the text size is unknown, the resizing would need to do some math and resize based on a percentage of the current text size. However, the issue is that when an image was resized after the text layer was created the DOM returns back the original text size prior to the the image resizing instead of the new text size after the image resizing. I can't find any way to return the actual current text size. Without that information there is no way to resize the text appropriately. Here is the modified script listener code that seems to replace text without resizing it. This seems to work even when the text size is returning incorrectly in the DOM. This would at lest accomplish the first goal of just replacing the text contents without the danger of it resizing. function replaceText(newText){ var idsetd = charIDToTypeID( "setd" ); var desc96 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref26 = new ActionReference(); var idTxLr = charIDToTypeID( "TxLr" ); var idOrdn = charIDToTypeID( "Ordn" ); var idTrgt = charIDToTypeID( "Trgt" ); ref26.putEnumerated( idTxLr, idOrdn, idTrgt ); desc96.putReference( idnull, ref26 ); var idT = charIDToTypeID( "T " ); var desc97 = new ActionDescriptor(); var idTxt = charIDToTypeID( "Txt " ); desc97.putString( idTxt, newText ); var idTxLr = charIDToTypeID( "TxLr" ); desc96.putObject( idT, idTxLr, desc97 ); executeAction( idsetd, desc96, DialogModes.NO ); }
... View more
‎Sep 14, 2015
11:57 AM
I think there is a bug in the Photoshop scripting DOM with the text size. The wrong text size is being reported if an image is resized after the text layers were already created. It reports the original text size instead of the new text size. app.activeDocument.activeLayer.textItem.size will always report the text size as the original text size after the image has been resized (and text is auto resized with the image resizing). Say for instance, you create a text layer at 20 points and then resize the image to 50%. In this case the text auto sizes down to 10 points. In the Photoshop user interface it shows the text correctly at 10 points. However, app.activeDocument.activeLayer.textItem.size still has the font size stored as 20 points instead of 10 points. Taking it step further, when replacing the text using app.activeDocument.activeLayer.textItem.contents="New Text".......... For CS6 it will resize the text back to the original point value (text size before the image was resized). For CC, the text replacement does not resize the text. It will stay at the current size. However, CC will still report the old text size and not the current text size Has anyone encountered this? If so, would you know of a work around?
... View more
‎Jul 14, 2015
02:29 PM
Just curious, has anyone heard anything from Adobe on if/when there may be a new release with bug fixes for the strange dialog issues that everyone is experiencing? My Photoshop version shows as 2015.0.0 20150529.r.88 2015/05/29. The Creative Cloud update shows nothing available. Is 5/29 really the last updated version or is my Creative Cloud updater not working properly? This seems like a long time between updates for a new release so I thought I'd check to make sure that r.88 is really the last release.
... View more
‎Jun 27, 2015
12:58 PM
Thanks for the info. That is where I went. As you mentioned there is no bug form when Photoshop is selected from the dropdown. There is just a link to feedback.photoshop.com so I went there and added the info feedback. I'm not sure if anyone from Adobe will actually look at it or if it's just a black hole.
... View more
‎Jun 27, 2015
12:39 PM
I already added it to the main forum posting for CC2015 bugs. I also submitted a bug ticket at photoshop.com. Is that the correct place to notify Adobe or is there somewhere else that I am suppose to report it to them?
... View more
‎Jun 27, 2015
09:31 AM
Prior to CC2015, my scripts would place the window off center so that it isn't right over top of the image. The scripts do this using window.frameLocation[x,y]. This command is done right before window.show(). With the CC2015 release, window.show() centers the window and disregards the given frame location. I tested in CC2015 and found that window.frameLocation[x,y] works to move the window after it has been drawn. I just want to automate it to do that. I reported this as a bug. However, I'm thinking that it may an intended change to CC2015 and not a bug, in which case I was hoping for a work around.
... View more
‎Jun 26, 2015
04:13 PM
My apologies, I should have just asked the specific question that I was looking for an answer. Yes, I posted this bug within the pile of other stuff that isn't working and I also submitted a bug report. However, I had a different specific question that was buried in this posting. I basically want to know if there is a way to automatically run some code after a window is drawn. I should have just submitted that specific question instead of giving the reason that I am wanting to do this. Therefore, I resubmitted that exact question to the forum is not buried inside this posting.
... View more
‎Jun 26, 2015
04:06 PM
Is there is a way to automatically run a piece of code after the window is drawn. Using window.onShow=function(){do stuff} event runs code before the window is drawn. Is there a similar way to automatically run some code AFTER a dialog window is drawn?
... View more
‎Jun 26, 2015
12:08 PM
In Photoshop CC2015, the dialog windows always center themselves regardless of the coordinates given to the window. I've tried both window.frameLocation and window.location. This works fine prior to CC2015. I have this command right before window.show(). I also tried adding window.frameLocation to onShow but it still puts it in the center. I then tried adding a button to the UI with the window.framelocation and it will move the window to where it is suppose to be. Is there any way to automate a piece of code to run right after the window is drawn? If so, the window could be moved to the proper location after it is drawn. I think that window.show() is calculating the center and overwriting the location. I tested by alerting the location just before it is drawn and then adding a button to alert after the window pops up. The location just before .show() is the correct location that I give it. After the window appears, the window.frameLocation values that I get from the test button change to the center. The only code ran between the 2 alerts is window.show() so it must be recalculating the window coordinates. This works prior to CC2015........ winX=100; winY=100; window.frameLocation=[winX,winY]; window.show(); I also tried this variation but the onShow code runs just before the window is drawn. winX=100; winY=100; window.onShow=function{window.frameLocation=[winX,winY];} window.show();
... View more
‎Jun 25, 2015
05:01 PM
For sure, this issue is not fixed. I have a script that was doing the exact same thing. However, in my case it would always end with a delayed PS crash as well. I had windows 1/2/3. Window 1 is the main dialog. Window 2 was another dialog that opens from window 1. Window 3 was a dialog launched from window 2. Window 2 should close when window 3 is launched from window 2 (works with CS3-CC2014 just fine). For CC2015, windows 2 and 3 will stay open until window 3 is closed. All would seem fine after windows 2 and 3 are closed until window 1 is eventually closed. When window 1 is eventually closed, PS then crashes. The work around that I came up with was both windows 2 and 3 now launch directly from a different button on window 1. The user needs to close window 2 or 3 before they can access the other. Now everything works fine, although it is not the layout that I want. I didn't submit the bug reports because I saw it was already submitted. If it doesn't get resolved then I'll submit a redundant ticket.
... View more
‎Jun 21, 2015
08:25 AM
Chuck, do you know what happens to the perpetual license in this case when it gets converted to a CC activation? I had one computer that I cancelled CC on and it would not allow my CS6 perpetual license to run at all, even after re-installing using the original DVD. I had to work with Adobe support for a week to fix it. I have another computer that had a CS6 perpetual license but it got swallowed up by the CC license as well. It does this automatically when CC is installed. It just converts the installed CS6 perpetual license to a subscription without telling you or asking you. I can't deactivate the original CS6 perpetual license. It allows me to sign out from CS6 which also signs out from CC. This is an old computer and I want to both sign out of CC AND deactivate CS6 license. I don't want the CS6 license to be using one of it's 2 activations on a computer that isn't being used. Basically, will the CS6 license still have 1 activation being used up because it doesn't allow me to deactivate this? Last time around, I could not get a very clear answer to this when I talked to support. They only have online chat support for perpetual licenses now. There is no phone support for perpetual licenses anymore which is a bit frustrating.
... View more
‎Jun 19, 2015
08:26 PM
I'm pretty sure that you will need to contact Adobe support. I had a similar issue when I discontinued my CC license a while back. My CS6 stopped working because the CC had converted my activated perpetual CS6 license to a subscription without asking me to. It took several re-installations and hours of oversees tech support to get it working. It was a major pain. If I remember correctly, the tech support person had to login and run a special program to release the "subscription" from CS6.
... View more
- « Previous
- Next »