Tiled Layer - NullPointerException
Hi, getting a small problem when initialising a tiled layer object. When I initialise the TiledLayer object "backgroundLayer", it throws a NullPointerException, and the Catch "System.out.println("")" is also being displayed, stating it cannot find the image. The image itself is in the "src" folder for the game, it's a 31 by 61 PNG file named "levelOne.png". I can't figure out why the image isn't being displayed, please help lol.
Thanks.
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
import javax.microedition.lcdui.Image.*;
import javax.microedition.media.*;
import javax.microedition.io.*;
import javax.bluetooth.*;
import java.util.*;
import java.io.*;
public class Engine extends GameCanvas implements Runnable {
public Thread thread;
public LayerManager layerManager;
public TiledLayer backgroundLayer;
public Image backgroundImage;
boolean isRunning;
public Engine (AwakeMIDlet m) {
super(true);
try {
backgroundImage = Image.createImage("/levelOne.png");
catch (IOException ioe) {
System.out.println("Image unable to be displayed.");
layerManager = new LayerManager();
backgroundLayer = new TiledLayer(5, 5, backgroundImage, 31, 31);
isRunning = true;
int[] cells = {
1, 2, 2, 2, 1, // Top
1, 0, 0, 0, 1,
1, 0, 0, 0, 1,
1, 0, 0, 0, 1,
2, 1, 1, 1, 2
for (int i = 0; i < cells.length; i++) {
int column = i % 5;
int row = (i - column)/5;
backgroundLayer.setCell(column, row, cells);
backgroundLayer.setPosition(0, 0);
layerManager.append(backgroundLayer);
public void go() {
thread = new Thread(this);
thread.start();
public void run() {
Graphics g = getGraphics();
while(isRunning = true) {
If you're using NetBeans, the path of the image file should be relative to the project root. If as you say the image file is in the "src" folder that should bebackgroundImage = Image.createImage("/src/levelOne.png");Other IDEs may treat the path differently.
db
Similar Messages
-
Tiled layer problem in J2me Game
hi,
i made a complete map (2d matrix) of a 2d game.
Then i made a TileLayer class to add this in game.
then i made another sprite of my game character.
now i want to check the collision of that sprite with the hurdels which i made in the TileLayer. is their any other way.
one way is to make saperate sprites of all those hurdles. i don't want this.
i want my game character to detect all the hurdels in the Tiled layer class.
hope i have cleared my point.
please help me
thanksnow i want to check the collision of that sprite
with the hurdels which i made in the TileLayer.Aaqib
Have you read the javadoc for Sprite?
public final boolean collidesWith(TiledLayer t,
boolean pixelLevel)Checks for a collision between this Sprite and the specified TiledLayer. If pixel-level detection is used, a collision is detected only if opaque pixels collide. That is, an opaque pixel in the Sprite would have to collide with an opaque pixel in TiledLayer for a collision to be detected. Only those pixels within the Sprite's collision rectangle are checked.
If pixel-level detection is not used, this method simply checks if the Sprite's collision rectangle intersects with a non-empty cell in the TiledLayer.
Any transform applied to the Sprite is automatically accounted for.
The Sprite and the TiledLayer must both be visible in order for a collision to be detected.
i don think that this question is soo hard.Neither do I, but you have to learn to read the available documentation :-) The javadoc is your friend.
If you don't have a local copy, it is available on
http://java.sun.com/javame/reference/apis/jsr118/
Regards, Darryl
edit You may need to add one more TiledLayer so that only the hurdles are on the TiledLayer you use for detecting collisions.
Message was edited by:
Darryl.Burke -
Rendering a large (Tiled) layer into the camera roll
Hi,
Wonder if anyone can help? I've got a very large tiled layer that I'm trying to take a screen shot of. Unfortunately it is a little too large for the normal method (renderInContext, UIGraphicsGetImageFromCurrentImageContext, UIImageWriteToSavedPhotosAlbum etc.) and the app runs out of memory.
Does anyone know of a way to achieve this? I was considering breaking the job up into multiple 'captures' - but I can't find a way to render anything but the entire layer - it would have been handy if renderInContext took a rectangle as a parameter!
Thanks for you assistance.
CraigHi,
Try to drag your videos to the iPhone photos folder in iPhoto. Should work.
If it doesn't help, you can always upload your files to dropbox or something similar and later download them on your iPhone.
Hope it helps. -
Tiled Layer grinds everything to a halt
I have a tiled layer which is meant to act as an overlay to a game and represents the screen being filled up with scungy "water"..
I calculate the number of rows and columns I need and create the tiled layer without assigning any tiles (i.e) they are empty.
The tile is a single image 5 x 5 pixels. It is a semitranslucent png-24 file
As the game progresses I gradually fill up a row in the TL with the tile index 1 using a loop and setCell().
Then at the end of a stage, it comes down again, as though draining using a loop and setCell and a tile index of 0 (sfx to be applied later).
The problem is that as the screen progressively fills up, the game gets slower and s l o w e rrrrrrrr, then miraculously speeds up again once the tiles are emptied.
As an experiment I tried it at different levels in the layerManager stack and the same thing happened, even when it was behind the background layer.(and thus presumably not rendered) I also tried it with the exact same code except to change the fill it up code to use a tile index of 0 and the speed was not degraded.
Do you have any solutions as I need to keep the effect as I have lots of scummy things blobbing about in the "water".
Your help would be most appreciated
KathydbHow did you upgrade? Did you clean-install or install on top of your previous system? DId you install anything else with the upgrade?
Do you have any older Aperture plug-ins, that might not be compatible with Mt. Lion and cause problems?
Do you see the slowness with any Aperture library or only with your main library?
Try two basic tests to narrow down the problem:
Launch Aperture while you are holding the shift-key down. This will defer the generation of previews. Is Aperture now more responsive?
Launch Aperture on a new, empty library and import a few image files. Does Aperture work well on a new library?
If the first test will make Aperture responsive again, you may have imported bad media files that need to be removed from your Aperture library, or you have missing or incompatible video codecs installed.
If the second test will make Aperture responsive again, but the first not, your Aperture library may need repairing, see: Repairing and Rebuilding Your Aperture Library: Aperture 3 User Manual
If none of the above will work, lauch the Console app from Applications > Utilities.
Check in the Console window, if there are error messages, when Aperture appears to be hanging.
Post them here.
Regards
Léonie -
Hi guys
i've used the TiledLayer class to create a large background with a number of objects on it, i also have a sprite which can move across the tiledlayer.
What i want to know is how can i work out which tile the sprite is on at any given time.
At the moment i'm trying to get it by dividing the sprite's X position by the tile width to get the cell column and the sprite's Y position by the tile height to get the cell row. The problem is that it's not very accurate so is there a better way of doing it.
thanks for any helpIf you're using NetBeans, the path of the image file should be relative to the project root. If as you say the image file is in the "src" folder that should bebackgroundImage = Image.createImage("/src/levelOne.png");Other IDEs may treat the path differently.
db -
Adding multiple images for tiled background?
Hi,
I'm having some trouble trying to add multiple images to the my tiled layer class. I can't figure out a way how to add these images to my current code. My goal is to add at least 4 images onto the screen.
Here's my code:
private void buildBackground() throws IOException
Graphics g = getGraphics();
Image tileImageOne;
Image tileImageTwo;
Image tileImageThree;
Image tileImageFour;
TiledLayer tiles;
try
tileImageOne = Image.createImage("/tile_1.png"/*, "/tile_2.png",
"/tile_3.png", "/tile_4.png"*/);
tiles = new TiledLayer(11, 14, tileImageOne, 20, 20);
int[] grid={
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1
for(int i=0; i<grid.length; i++)
int column = i%11;
int row = (i-column)/11;
tiles.setCell(column, row, grid);
tiles.setPosition(GAME_ORIGIN_X, GAME_ORIGIN_Y);
tiles.paint(g);
catch(IndexOutOfBoundsException e)
e.printStackTrace();
catch(IOException io)
io.printStackTrace();
Edited by: vopo on Sep 22, 2007 4:35 PMI've read the API.
But the thing that confuses me is the uploading of images. I can't figure out how by uploading different images can the code recognize which one would go into the tile.
-I know in the api it shows different numbers to display each tile used with a specified image. But I can't figure out how to code it.
Here's my attempt
private void buildBackground() throws IOException
Graphics g = getGraphics();
Image tileImageOne;
Image tileImageTwo;
Image tileImageThree;
Image tileImageFour;
TiledLayer tiles;
TiledLayer tiles2;
try
tileImageOne = Image.createImage("/tile_1.png");
tileImageTwo = Image.createImage("/tile_2.png");
tiles2 = new TiledLayer(11, 14, tileImageTwo, 20, 20);
tiles = new TiledLayer(11, 14, tileImageOne, 20, 20);
int[] grid={
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1
for(int i=0; i<grid.length; i++)
int column = i%11;
int row = (i-column)/11;
tiles.setCell(column, row, grid);
tiles2.setCell(column, row, grid[i]);
tiles.setPosition(GAME_ORIGIN_X, GAME_ORIGIN_Y);
tiles.paint(g);
tiles.setPosition(GAME_ORIGIN_X, GAME_ORIGIN_Y);
tiles.paint(g);
catch(IndexOutOfBoundsException e)
e.printStackTrace();
catch(IOException io)
io.printStackTrace(); -
Issues with WebForm performance
Hi,
We had migrated a new application from UAT to PROD and we encounter webform performance issues with the following actions..
After login, the first form you open it is
always slow. After this you can switch from one form to another without a
delay.
Then once you change any data – the next time
you access a form it gets delayed.
The point to be noted is, it doesnt have any performance issues in the UAT environment and the configuration settings,essbase cache settings are all the same. We did try to move the EPM system to a new server to see if this is a hardware issue but no luck, the performance issues still exist. The consumption of the CPU/memory has been checked and it is proved that the form opening delay has nothing to do with lack of memory.
The JVM head settings is set up at 4GB which is infact higher than that of the UAT environment(2GB).
runs on Windows server2008,11.1.2.1.600 EPM serve, has planning,reporting,foundation on one server (32GB ram) and essbase on another server (32GB ram). Any help is appreciated.
Please find attached the planning logs below and there is nothing mentioned in the hyperionplanning error logs.-----------------------------------------------------------------------------------------------------------------------------------------------------------------
<Nov 5, 2013 8:05:43 PM CET> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
<Nov 5, 2013 8:05:43 PM CET> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
<Nov 5, 2013 8:05:44 PM CET> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Oracle JRockit(R) Version R28.0.2-11-135406-1.6.0_20-20100624-2119-windows-x86_64 from Oracle Corporation>
<Nov 5, 2013 8:05:46 PM CET> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.4.0 Fri Dec 17 20:47:33 PST 2010 1384255 >
<Nov 5, 2013 8:05:48 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<Nov 5, 2013 8:05:48 PM CET> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<Nov 5, 2013 8:05:48 PM CET> <Notice> <Log Management> <BEA-170019> <The server log file C:\Oracle\Middleware\user_projects\domains\EPMSystem\servers\Planning0\logs\Planning0.log is opened. All server side log events will be written to this file.>
<Nov 5, 2013 8:06:22 PM CET> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<Nov 5, 2013 8:06:28 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<Nov 5, 2013 8:06:28 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
Calling getConnection()
return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
Calling getDomainConfiguration()
Calling getConnection()
return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
Calling getRuntimeService()
Calling getConnection()
return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
return com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean
return com.bea:Name=EPMSystem,Type=Domain
Calling getConnection()
return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
Domain location is 'C:\Oracle\Middleware\user_projects\domains\EPMSystem'
Calling getRuntimeService()
return com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean
Calling getConnection()
return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
Calling getConnection()
return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
Calling getConnection()
return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
Calling getConnection()
return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
Checking C:\Oracle\Middleware\user_projects\domains\EPMSystem\servers\Planning0\registry_update.xml file
EPM_ORACLE_HOME: C:\Oracle\Middleware\EPMSystem11R1
Template for PLANNING#11.1.2.0: C:\Oracle\Middleware\EPMSystem11R1\common\templates\applications\epm_planning_11.1.2.1.jar
Dependencies for C:\Oracle\Middleware\EPMSystem11R1\common\templates\applications\epm_planning_11.1.2.1.jar: []
BPMUI shared webapp not referenced from PLANNING#11.1.2.0
Application name: PLANNING#11.1.2.0
Application source: HyperionPlanning.ear
Server name: Planning0
Server port: 8300
Server SSL port: 8343
Application context: HyperionPlanning
Registry product type: PLANNING_PRODUCT
Registry physical web application type: PLANNING_WEBAPP
weblogic.Name property is 'Planning0', seems to be WebLogic mode
registry.isRegistryDatabaseCreated()true
Registry was initialized sucessfully
Executing pre custom update for PLANNING#11.1.2.0
EPM_ORACLE_INSTANCE: C:\Oracle\Middleware\user_projects\epmsystem1
Physical Web App found
Web app already linked to some application server: false
The registry was not modifyed because it already containse all sturctures
Web app is already linked to the logical web app
No needs to run custom updater for PLANNING#11.1.2.0
loggingUpdatePLANNING.block file exist or the system is running in the Fusion mode, skipping logging.xml configuration
Planning locale: en_US
<Nov 5, 2013 8:06:39 PM CET> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
<Nov 5, 2013 8:06:39 PM CET> <Notice> <Cluster> <BEA-000197> <Listening for announcements from cluster using unicast cluster messaging>
<Nov 5, 2013 8:06:39 PM CET> <Notice> <Cluster> <BEA-000133> <Waiting to synchronize with other running members of Planning.>
<Nov 5, 2013 8:07:09 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<Nov 5, 2013 8:07:09 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<Nov 5, 2013 8:07:09 PM CET> <Notice> <Cluster> <BEA-000162> <Starting "async" replication service with remote cluster address "null">
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias DemoIdentity from the jks keystore file C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\DemoIdentity.jks.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\DemoTrust.jks.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file C:\Oracle\Middleware\jrockit_160_20\jre\lib\security\cacerts.>
<Nov 5, 2013 8:07:10 PM CET> <Alert> <Security> <BEA-090152> <Demo trusted CA certificate is being used in production mode: [
Version: V3
Subject: CN=CACERT, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
Key: Sun RSA public key, 512 bits
modulus: 9550192877869244258838480703390456015046425375252278279190673063544122510925482179963329236052146047356415957587628011282484772458983977898996276815440753
public exponent: 65537
Validity: [From: Thu Mar 21 21:12:27 CET 2002,
To: Tue Mar 22 21:12:27 CET 2022]
Issuer: CN=CACERT, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
SerialNumber: [ 33f10648 fcde0deb 4199921f d64537f4]
Certificate Extensions: 1
[1]: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
Key_CertSign
Algorithm: [MD5withRSA]
Signature:
0000: 9D 26 4C 29 C8 91 C3 A7 06 C3 24 6F AE B4 F8 82 .&L)......$o....
0010: 80 4D AA CB 7C 79 46 84 81 C4 66 95 F4 1E D8 C4 .M...yF...f.....
0020: E9 B7 D9 7C E2 23 33 A4 B7 21 E0 AA 54 2B 4A FF .....#3..!..T+J.
0030: CB 21 20 88 81 21 DB AC 90 54 D8 7D 79 63 23 3C .! ..!...T..yc#<
] The system is vulnerable to security attacks, since it trusts certificates signed by the demo trusted CA.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=thawte Primary Root CA - G3,OU=(c) 2008 thawte\, Inc. - For authorized use only,OU=Certification Services Division,O=thawte\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 3,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 2,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R3". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "OU=Security Communication RootCA2,O=SECOM Trust Systems CO.\,LTD.,C=JP". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=VeriSign Universal Root Certification Authority,OU=(c) 2008 VeriSign\, Inc. - For authorized use only,OU=VeriSign Trust Network,O=VeriSign\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GeoTrust Primary Certification Authority - G3,OU=(c) 2008 GeoTrust Inc. - For authorized use only,O=GeoTrust Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[3]" is now listening on 127.0.0.1:8343 for protocols iiops, t3s, CLUSTER-BROADCAST-SECURE, ldaps, https.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[1]" is now listening on fe80:0:0:0:0:5efe:a53:4816:8343 for protocols iiops, t3s, CLUSTER-BROADCAST-SECURE, ldaps, https.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[4]" is now listening on 0:0:0:0:0:0:0:1:8343 for protocols iiops, t3s, CLUSTER-BROADCAST-SECURE, ldaps, https.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.83.72.22:8300 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on 127.0.0.1:8300 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "Default[4]" is now listening on 0:0:0:0:0:0:0:1:8300 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on fe80:0:0:0:0:ffff:ffff:fffe:8300 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on fe80:0:0:0:0:5efe:a53:4816:8300 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[2]" is now listening on fe80:0:0:0:0:ffff:ffff:fffe:8343 for protocols iiops, t3s, CLUSTER-BROADCAST-SECURE, ldaps, https.>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 10.83.72.22:8343 for protocols iiops, t3s, CLUSTER-BROADCAST-SECURE, ldaps, https.>
<Nov 5, 2013 8:07:10 PM CET> <Warning> <Server> <BEA-002611> <Hostname "WIPLPRD01.svc.unicc.org", maps to multiple IP addresses: 10.83.72.22, 0:0:0:0:0:0:0:1>
<Nov 5, 2013 8:07:10 PM CET> <Notice> <WebLogicServer> <BEA-000330> <Started WebLogic Managed Server "Planning0" for domain "EPMSystem" running in Production Mode>
<Nov 5, 2013 8:07:12 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<Nov 5, 2013 8:07:12 PM CET> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
using java.library.path: C:\Oracle\Middleware\EPMSystem11R1/products/Planning/lib64;C:\Oracle\Middleware\EPMSystem11R1/bin;C:\Oracle\Middleware\EPMSystem11R1/common/EssbaseRTC-64/11.1.2.0/bin;C:\Oracle\MIDDLE~1\patch_wls1034\profiles\default\native;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\x64;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.1\bin;C:\Oracle\MIDDLE~1\JROCKI~1\jre\bin;C:\Oracle\MIDDLE~1\JROCKI~1\bin;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\x64\oci920_8
EPM_ORACLE_HOME (C:\Oracle\Middleware\EPMSystem11R1) is set from JVM property "EPM_ORACLE_HOME".
using Java property for Hyperion Home C:\Oracle\Middleware\EPMSystem11R1
EPM_ORACLE_INSTANCE (C:\Oracle\Middleware\user_projects\epmsystem1) is set from JVM property[EPM_ORACLE_INSTANCE].
Reaquired task list lease: Tue Nov 05 20:11:49 CET 2013: 1383678709156
Seeking ESAPI.properties
Found in 'org.owasp.esapi.resources' directory: C:\Oracle\Middleware\EPMSystem11R1\products\Planning\config\esapi\ESAPI.properties
Loaded 'ESAPI.properties' properties file
Seeking validation.properties
Found in 'org.owasp.esapi.resources' directory: C:\Oracle\Middleware\EPMSystem11R1\products\Planning\config\esapi\validation.properties
Loaded 'validation.properties' properties file
Seeking antisamy-esapi.xml
Found in 'org.owasp.esapi.resources' directory: C:\Oracle\Middleware\EPMSystem11R1\products\Planning\config\esapi\antisamy-esapi.xml
EnterData_Inner Processing Time:424
2013-11-05 20:14:47,454 INFO Thread-51 calcmgr.launch - Date/Time Started: 2013/11/05:20:14:47.452 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: WPA_Count By Planning user: wipoadmin Values entered for run-time prompts: [Variable] Wrk_Scenario:"Work_Plan_2014"[Variable] Funds:"Regular"[Variable] Units:"0001"
- Date/Time Started: 2013/11/05:20:14:47.452 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: WPA_Count By Planning user: wipoadmin Values entered for run-time prompts: [Variable] Wrk_Scenario:"Work_Plan_2014"[Variable] Funds:"Regular"[Variable] Units:"0001"
2013-11-05 20:14:54,066 INFO Thread-51 calcmgr.launch - Date/Time Ended: 2013/11/05:20:14:54.066 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: WPA_Count By Planning user: wipoadmin.
- Date/Time Ended: 2013/11/05:20:14:54.066 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: WPA_Count By Planning user: wipoadmin.
EnterData_Inner Processing Time:64
EnterData_Inner Processing Time:15
EnterData_Inner Processing Time:359
EnterData_Inner Processing Time:2
EnterData_Inner Processing Time:53
EnterData_Inner Processing Time:4
EnterData_Inner Processing Time:7
EPM_ORACLE_INSTANCE (C:\Oracle\Middleware\user_projects\epmsystem1) is set from JVM property[EPM_ORACLE_INSTANCE].
EPM_ORACLE_INSTANCE (C:\Oracle\Middleware\user_projects\epmsystem1) is set from JVM property[EPM_ORACLE_INSTANCE].
EPM_ORACLE_INSTANCE (C:\Oracle\Middleware\user_projects\epmsystem1) is set from JVM property[EPM_ORACLE_INSTANCE].
Setting HBR Mode to: 2
In lookupBRLWA()
Found HBR product = ESSBASE_PRODUCT
Found HBR product = ESSBASE_PRODUCT
Found HBR product = ESSBASE_PRODUCT
HBR LWA Component = Default
Default HBR = http://WIPLPRD01.svc.unicc.org:19000/eas
In getDBDetails()
Found HBR product = ESSBASE_PRODUCT
In lookupBRLWA()
Found HBR product = ESSBASE_PRODUCT
Found HBR product = ESSBASE_PRODUCT
=2013-11-05 20:35:08,234 WARN [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.security.HbrSecurityAPI - Error retrieving user by identity
- Error retrieving user by identity
Embedded HBR initialized.
EnterData_Inner Processing Time:6
EnterData_Inner Processing Time:867
[Tue Nov 05 20:35:33 CET 2013] Planning successfully notified HBR repository.
EnterData_Inner Processing Time:7
2013-11-05 20:40:38,613 INFO Thread-67 calcmgr.launch - Date/Time Started: 2013/11/05:20:40:38.606 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: NonPersonnel_Calc By Planning user: wipoadmin Values entered for run-time prompts: [Variable] Funds:"Regular"[Variable] Units:"0001"[Variable] Wrk_Scenario:"Work_Plan_2014"
- Date/Time Started: 2013/11/05:20:40:38.606 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: NonPersonnel_Calc By Planning user: wipoadmin Values entered for run-time prompts: [Variable] Funds:"Regular"[Variable] Units:"0001"[Variable] Wrk_Scenario:"Work_Plan_2014"
2013-11-05 20:40:47,241 INFO Thread-67 calcmgr.launch - Date/Time Ended: 2013/11/05:20:40:47.241 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: NonPersonnel_Calc By Planning user: wipoadmin.
- Date/Time Ended: 2013/11/05:20:40:47.241 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: NonPersonnel_Calc By Planning user: wipoadmin.
EnterData_Inner Processing Time:44
EnterData_Inner Processing Time:2
EnterData_Inner Processing Time:525
EnterData_Inner Processing Time:1
Reaquired task list lease: Tue Nov 05 20:41:49 CET 2013: 1383680509246I already replied there but it seems no moderator is willing to approve my reply so it never shows up.
So I'll try replying in here instead:
I never thought it could be an emulator issue, I thought I had done something wrong to begin with. So I take having performance issues with tiled layer is not a common problem I suppose?
I'm using MOTODEV SDK platform, A1200 model (motorola). -
Issues With GameCanvas Performance
Hello, recently I've been toying with java mobile applications, but I've run accross a problem I cannot overcome.
My LayerManager has two objects: the sprite and the tiled layer. Whenever I add the latter to my layer manager, I get 1-2 FPS when rendering the screen, but if I remove it and have only the sprite displayed, I get above 30 FPS.
My layer has the following properties:
TiledLayer mbg = new TiledLayer(15,20,tiles,16,16);
Any help appreciated.
PS: Getting 1-2 FPS on a crappy computer, but the same application running on a fast machine won't get past 11 FPS, although the main game loop is supposed to run at 20 FPS.
Edited by: 860823 on 23/05/2011 12:13I already replied there but it seems no moderator is willing to approve my reply so it never shows up.
So I'll try replying in here instead:
I never thought it could be an emulator issue, I thought I had done something wrong to begin with. So I take having performance issues with tiled layer is not a common problem I suppose?
I'm using MOTODEV SDK platform, A1200 model (motorola). -
[i3] urxvt has black borders...
Hi there
I'm trying out the i3 window manager and it seems to be quite nice except for one little thing that is driving me mad.
urxvt always appears with some black borders around it and I don't know how to remove them.
I really can't understand if the responsible for this behaviour is i3 or urxvt but I noticed that:
- the empty space at the bottom is black too even if I use 'xsetroot -solid "1A1A1A" in my .xinitrc
- the same .Xdefaults in wmii works perfectly without black borders at all.
Is anyone able to help me? Any hint would be much appreciated.
I'm attaching some files that may be important to solve the issue:
~/.xinitrc
#!/bin/sh
# ~/.xinitrc
# Executed by startx (run your window manager from here)
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
# add terminus and dina fonts to xfontsel
xset +fp /usr/share/fonts/local
# set background and wallpaper
xsetroot -solid "#1A1A1A"
feh --bg-scale /home/rent0n/.wallpapers/archlinux-zenburn-wide-grey.jpg
# start window manager
exec i3
# exec wmii
# exec dwm
~/.Xdefaults:
! urxvt
urxvt.title: urxvt
urxvt.background: #1A1A1A
urxvt.foreground: #999999
urxvt.cursorColor: #5E468C
urxvt.borderColor: #1A1A1A
urxvt.borderless: false
urxvt.internalBorder: 3
urxvt.externalBorder: 3
urxvt.scrollBar: false
!urxvt.font: -misc-fixed-medium-r-*--12-*-*-*-*-*-iso10646-1
!urxvt.boldFont: -misc-fixed-medium-r-*--12-*-*-*-*-*-iso10646-1
urxvt.font: xft:terminus:pixelsize=12
urxvt.boldFont: xft:terminus:bold:pixelsize=12
! colors
!black
*color0: #333333
*color8: #3D3D3D
!red
*color1: #8C4665
*color9: #BF4D80
!green
*color2: #287373
*color10: #53A6A6
!yellow
*color3: #7C7C99
*color11: #9E9ECB
!blue
*color4: #395573
*color12: #477AB3
!magenta
*color5: #5E468C
*color13: #7E62B3
!cyan
*color6: #31658C
*color14: #6096BF
!white
*color7: #899CA1
*color15: #C0C0C0
~/.i3/config
# This configuration uses Mod1 and Mod4. Make sure they are mapped properly using xev(1)
# and xmodmap(1). Usually, Mod1 is Alt (Alt_L) and Mod4 is Windows (Super_L)
# ISO 10646 = Unicode
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# font -misc-fixed-medium-r-*--12-*-*-*-*-*-iso10646-1
font -xos4-terminus-bold-r-*--12-*-*-*-*-*-iso10646-1
# Use Mouse+Mod4 to drag floating windows to their wanted position
floating_modifier Mod4
# Fullscreen (Mod4+f)
bind Mod4+41 f
# Stacking (Mod4+r)
bind Mod4+27 s
# Tabbed (Mod4+w)
bind Mod4+25 T
# Default (Mod4+e)
bind Mod4+26 d
# Toggle tiling/floating of the current window (Mod4+Shift+Space)
bind Mod4+Shift+65 t
# Go into the tiling layer / floating layer, depending on whether
# the current window is tiling / floating (Mod4+t)
bind Mod4+28 focus ft
# Focus (Mod4+j/k/l/;)
bind Mod4+43 h
bind Mod4+44 j
bind Mod4+45 k
bind Mod4+46 l
# (alternatively, you can use the cursor keys:)
bindsym Mod4+Left h
bindsym Mod4+Down j
bindsym Mod4+Up k
bindsym Mod4+Right l
# Focus Container (Mod1+Mod4+j/k/l/;)
bind Mod1+Mod4+43 wch
bind Mod1+Mod4+44 wcj
bind Mod1+Mod4+45 wck
bind Mod1+Mod4+46 wcl
# (alternatively, you can use the cursor keys:)
bindsym Mod1+Mod4+Left wch
bindsym Mod1+Mod4+Down wcj
bindsym Mod1+Mod4+Up wck
bindsym Mod1+Mod4+Right wcl
# Snap (Mod4+Control+j/k/l/;)
bind Mod4+Control+43 sh
bind Mod4+Control+44 sj
bind Mod4+Control+45 sk
bind Mod4+Control+46 sl
# (alternatively, you can use the cursor keys:)
bindsym Mod4+Control+Left sh
bindsym Mod4+Control+Down sj
bindsym Mod4+Control+Up sk
bindsym Mod4+Control+Right sl
# Move (Mod4+Shift+j/k/l/;)
bind Mod4+Shift+43 mh
bind Mod4+Shift+44 mj
bind Mod4+Shift+45 mk
bind Mod4+Shift+46 ml
# (alternatively, you can use the cursor keys:)
bindsym Mod4+Shift+Left mh
bindsym Mod4+Shift+Down mj
bindsym Mod4+Shift+Up mk
bindsym Mod4+Shift+Right ml
# Move Container (Mod1+Mod4+Shift+j/k/l/;)
bind Mod1+Mod4+Shift+43 wcmh
bind Mod1+Mod4+Shift+44 wcmj
bind Mod1+Mod4+Shift+45 wcmk
bind Mod1+Mod4+Shift+46 wcml
# Workspaces (Mod4+1/2/…)
bind Mod4+10 1
bind Mod4+11 2
bind Mod4+12 3
bind Mod4+13 4
bind Mod4+14 5
bind Mod4+15 6
bind Mod4+16 7
bind Mod4+17 8
bind Mod4+18 9
bind Mod4+19 10
# Move to Workspaces
bind Mod4+Shift+10 m1
bind Mod4+Shift+11 m2
bind Mod4+Shift+12 m3
bind Mod4+Shift+13 m4
bind Mod4+Shift+14 m5
bind Mod4+Shift+15 m6
bind Mod4+Shift+16 m7
bind Mod4+Shift+17 m8
bind Mod4+Shift+18 m9
bind Mod4+Shift+19 m10
# Mod4+Enter starts a new terminal
bind Mod4+36 exec /usr/bin/urxvt
# Mod4+Shift+q kills the current client
bind Mod4+Shift+24 kill
# Mod4+v starts dmenu and launches the selected application
# for now, we don't have a launcher of our own.
bind Mod4+55 exec /usr/bin/dmenu_run -i -fn -xos4-terminus-bold-r-*--12-*-*-*-*-*-iso10646-1 -nb \#1A1A1A -nf \#999999 -sb \#1A1A1A -sf \#31658C
# Mod4+Shift+e exits i3
bind Mod4+Shift+26 exit
# Mod4+Shift+r restarts i3 inplace
bind Mod4+Shift+27 restart
# The IPC interface allows programs like an external workspace bar
# (i3-wsbar) or i3-msg (can be used to "remote-control" i3) to work.
ipc-socket ~/.i3/ipc.sock
# 1-pixel Border
new_window bp
# Colors
# class border background text
client.focused #999999 #999999 #1A1A1A
client.focused_inactive #1A1A1A #1A1A1A #999999
client.unfocused #1A1A1A #1A1A1A #999999
client.urgent #31658C #31658C #999999
bar.focused #999999 #1A1A1A #999999
bar.unfocused #1A1A1A #1A1A1A #999999
bar.urgent #31658C #1A1A1A #999999
# Workspaces
workspace 1 main
workspace 2 www
workspace 3 mail
workspace 4 misc
Thank you very much.rent0n wrote:I'm forced to move to wmii then, even if it hasn't all the nice features of i3 and configuring it it's quite a mess, at least it seems to manage urxvt perfectly...
You will most probably have those borders in wmii, too. I have them.
It really is an urxvt issue. There is something in the manpages about it, I think (not sure).
I doesn't bother me too much so I just left them there. -
TiledLayers : Slowing Down
I have created a tiled layer (javax.microedition.lcdui.game.TiledLayer) for the purpose of making a World for my sprite to move around in. The game world i want is just a big box with a wall round the outside and grass inside that box. As I increase the size of the tiled layer the application runs slower & slower. Is this because :
(B.T.W -- An instance of LayerManager controls drawing the level)
The application draws the whole tiledlayer (onto the offscreen buffer) but only shows whats appropriate to the view window.
The application calculates which bit of the tiledlayer needs to be drawn to the view window, but as the tiled layer gets larger, the calculations become alot more complex (therefore slowing the app down)
I cant really think of any other way of drawing a large background without slowing down the application. If i use sprites I will end up with 400 of them (One for each tile), and that would slow the application down to miniscule rates( especially when I try to calculate collision detection for about 80 tiles)
This is the code use for constructing a simple level:
*MAIN GAME CLASS
public class Level extends TiledLayer
*Dimension Fields - Constant after intitialisation
/*The width of the square tiles that make up this layer*/
static int TILE_WIDTH = 34;
/*The Height of the square tiles that make up this layer*/
static int TILE_HEIGHT = 34;
/*This gives the number of squares of "texture" to put along
the screen -- Changing this to 10 means a smaller level but faster game*/
static int INITIAL_COLUMNS = 23;
/*This gives the number of squares of "texture" to put along
the screen -- Changing this to 10 means a smaller level but faster game*/
static int INITIAL_HEIGHT = 23;
public Level() throws Exception
super(INITIAL_COLUMNS, INITIAL_HEIGHT, Image.createImage("/icons/Level.png"), TILE_WIDTH, TILE_HEIGHT);
/*Quickly fill some cells*/
fillCells(1, 1, 20, 1, 1);
fillCells(1, 1, 1, 20, 1);
/*sets object position*/
setPosition (0, 0);
void reset()
setPosition (0, 0);
}I didn't see it in your code but I am sure you are using a for(x;x;x) loop to draw the scene.
Yes, your are correct, your slow down is that all of your map is being processed as if it were all going to be drawn to the screen. You have to write the code that avoids this. On your 10x10 you are running the loops 100 times, but when you increase the size to 23 by 23 you are running the loops 529 times every time you have to redraw the scene. The solution is to set up some tracking variables and put them in your loop so we only have to run the loops 81 times, no matter how big the map is.
Something I have been trying lately is drawing all of my layers in one for loop.
map_width = 32; // this is the size of the map
map_height = 32; // not all of the map will fit in the screen
width = 9; // this is the tile size of the screen
height = 9; // 9 tiles wide, 9 tiles high
character_x_possition = (possition x on the map divided by 34 which is your tile width);
character_y_possition = (possition y on the map divided by 34 which is your tile width);
corner_x = character_x_possition - 4; // or 5?, just try it, I can't remember
corner_y = character_y_possition - 4; //or 5 again
for(int x = corner_x; int < corner_x + width; x++)
{ for(int y = corner_y; int < corner_y + height; y++)
Draw layer 1 to backbuffer
if(x == char_possition && y == char_possition)
{ Draw Character to back buffer }
else { Draw layer2 to back buffer}
Draw layer 3 to back buffer
Draw back buffer to screen
//////////// END OF SORT OF CODE :-) /////////////
You can also use something similar to cut out time in colision checking, theres no since in checking the entire scene for colision when there are only 9 possible colisions at a given time, there are also some advanced meathods such as quad trees, but these at the moment are beyond me until I can find the time to sit down and study them. Hopefully some else will post on these, but they be beyond the needs of your game. I breifly read over them and went with the 9 tile checking for my game.
One other note, if this is an rpg, there is rarely benefit for an offscreen NPC to be moving. :-) -
Hi all,
I have a sprite climbing a ladder and it works well enough. However the ladder is part of the background and i have the sprite colliding with the back ground in order to enable the sprite to climb. ( eg :- mDiver.collidesWith(mBackground,true) )
Is it possible to have the sprite colliding with the ladder tile rather than the sprite colliding with the entire background?
Any comments or thoughts would be most welcome.
Thank you
private void createBackground(String backgroundImageName) throws IOException
// Create the tiled layer.
Image backgroundImage = Image.createImage(backgroundImageName);
int[] map = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 9, 9, 9, 9, 9,
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0,
10, 10, 10, 10, 10, 10, 10, 10
mBackground = new TiledLayer(8, 5, backgroundImage, 48, 48);
// no. columns, no. rows, image, tileWidth, tileHeight
mBackground.setPosition(12, 0); // moved in from left
for (int i = 0; i < map.length; i++)
int column = i % 8;
int row = (i - column) / 8;
mBackground.setCell(column, row, map);
mLayerManager.insert(mBackground, 0);
} // end of createBackground()else if ((keyStates & UP_PRESSED) != 0)
if(mDiver.collidesWith(mBackground,true))
setDirection(kRight);
setState(kClimbing);
mBackground.move(0, 3);// move scenery left
mClimbing = true;
mDiver.nextFrame();
else
mClimbing = false;Look in the API under Graphics2D:
hit(Rectangle rect, Shape s, boolean onStroke)
Checks whether or not the specified Shape intersects the specified Rectangle, which is in device space. -
Modding the Export Layers to Files script to preserve .jpg quality
Please forgive me if I am posting this incorrectly, but as the thread I initially replied to is marked as Answered I started to wonder whether my question would be seen or not so I started this new thread. My original question is located in the thread http://forums.adobe.com/message/2795719#2795719 because Kari was having a similar issue to mine, but with a different file format. My original text:
I am having a similar issue, except that I need to save each layer as a .jpg, and the Export Layers to Files script is compressing the images in some fashion so that a previously seamlessly tiling layer now has a border that ruins the tile. If I save each layer individually using either the Save As command or Save for Web and Devices with the proper settings (Maximum Quality, Progressive, and Baseline Standard), the resulting images don't acquire this border, so I feel pretty certain it is something in the script that is messing up (changing the compression of) the layers, but I honestly don't know what. I have tried modifiying the jpeg portion of the script this way, hoping to prevent it from deviating from the usual Save As options:
case jpegIndex:
docRef.bitsPerChannel = BitsPerChannelType.EIGHT;
var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".jpg");
jpgSaveOptions = new JPEGSaveOptions();
jpgSaveOptions.embedColorProfile = true;
jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
jpgSaveOptions.matte = MatteType.NONE;
jpgSaveOptions.quality = jpegQuality; // 12
docRef.saveAs(saveFile, jpgSaveOptions, true, Extension.LOWERCASE);
break;
but this doesn't seem to affect whatever setting is being changed. Layers saved to .jpg this way still acquire the border. I don't see what line might control whether the image is saved as progressive or not, nor anything to affect the text setting "Maximum" that I use when I successfully save each layer individually.
I am a complete novice at scripting, so please excuse/explain the obvious mistakes I may be making here.
I have since installed the script listener plug in and isolated a bit of script for saving the intended way, and hope to insert this snippet into the Export Layers as Files script, but I can tell that some of the lines are extraneous (like where it points to the file path I took), but I don't know what is safe to trim out. I sincerely appreciate any assistance with this!Here is the script that uses scriptlistner to do the jpeg save. Note I changed the name by adding '_mod' to the end to remind you that it has been edited. You can remove the origianl version by moving the file to another folder outside the scripts folder or by adding ~ at the start of the filename.
I recommend saving this as Export Layers to Files_mod.jsx. If this doesn't work for you we can try using the scriptlistener saveForWeb.
// Copyright 2007. Adobe Systems, Incorporated. All rights reserved.
// This script will export each layer in the document to a separate file.
// Written by Naoki Hada
// ZStrings and auto layout by Tom Ruark
@@@BUILDINFO@@@ Export Layers To Files.jsx 1.0.0.16
// BEGIN__HARVEST_EXCEPTION_ZSTRING
<javascriptresource>
<name>Export Layers to Files_mod...</name>
<category>layers</category>
<enableinfo>true</enableinfo>
<eventid>6f1c2cf5-4a97-4e32-8f59-f5d7a087adef</eventid>
<terminology><![CDATA[<< /Version 1
/Events <<
/6f1c2cf5-4a97-4e32-8f59-f5d7a087adef [Export Layers to Files_mod /noDirectParam <<
/message [($$$/Actions/Key/Message=Message) /char]
/destination [($$$/Actions/Key/Destination=Destination) /char]
/fileNamePrefix [($$$/Actions/Key/FileNamePrefix=Prefix) /char]
/visibleOnly [($$$/Actions/Key/CompsObject/UseVisibility=Visibility) /boolean]
/fileType [($$$/Actions/Key/FileType=File Type) /integer]
/icc [($$$/Actions/Key/PDFGenericFormat/KeepProfile=Keep Profile) /boolean]
/jpegQuality [($$$/Actions/Key/JPEGQuality=JPEG Quality) /char]
/psdMaxComp [($$$/Actions/Key/MaximizePSDCompatibility=maximize compatibility for Photoshop files) /boolean]
/tiffCompression [($$$/Actions/Key/TiffCompression=TIFF encoding) /char]
/tiffJpegQuality [($$$/Actions/Key/TIFFJPEGQuality=TIFF JPEG Quality) /char]
/pdfEncoding [($$$/Actions/Key/PDFEncoding=PDF encoding) /char]
/pdfJpegQuality [($$$/Actions/Key/PDFJPEGQuality=PDF JPEG Quality) /char]
/targaDepth [($$$/Actions/Key/Depth/TargaDepth=Targa depth) /char]
/bmpDepth [($$$/Actions/Key/Depth/BMPDepth=BMP depth) /char]
/png24Transparency [($$$/Actions/Key/Layer/PNG24PreserveTransparency=PNG 24 Preserve Transparency) /boolean]
/png24Interlaced [($$$/Actions/Key/Layer/PNG24Interlaced=PNG 24 Interlaced) /boolean]
/png24Trim [($$$/Image/Trim/PNG24=PNG 24 Trim) /boolean]
/png8Transparency [($$$/Actions/Key/Layer/PNG8PreserveTransparency=PNG 8 Preserve Transparency) /boolean]
/png8Interlaced [($$$/Actions/Key/Layer/PNG8Interlaced=PNG 8 Interlaced) /boolean]
/png8Trim [($$$/Image/Trim/PNG8=PNG 8 Trim) /boolean]
>>]
>>
>> ]]></terminology>
</javascriptresource>
// END__HARVEST_EXCEPTION_ZSTRING
// enable double clicking from the Macintosh Finder or the Windows Explorer
#target photoshop
// debug level: 0-2 (0:disable, 1:break on error, 2:break at beginning)
// $.level = 0;
// debugger; // launch debugger on next line
// on localized builds we pull the $$$/Strings from a .dat file, see documentation for more details
$.localize = true;
//=================================================================
// Globals
//=================================================================
// UI strings to be localized
//var strTitle = localize("$$$/JavaScripts/ExportLayersToFiles/Title=Export Layers To Files");
strTitle = "Export Layers To Files"
var strButtonRun = localize("$$$/JavaScripts/ExportLayersToFiles/Run=Run");
var strButtonCancel = localize("$$$/JavaScripts/ExportLayersToFiles/Cancel=Cancel");
var strHelpText = localize("$$$/JavaScripts/ExportLayersToFiles/Help=Please specify the format and location for saving each layer as a file.");
var strLabelDestination = localize("$$$/JavaScripts/ExportLayersToFiles/Destination=Destination:");
var strButtonBrowse = localize("$$$/JavaScripts/ExportLayersToFiles/Browse=&Browse...");
var strLabelFileNamePrefix = localize("$$$/JavaScripts/ExportLayersToFiles/FileNamePrefix=File Name Prefix:");
var strCheckboxVisibleOnly = localize("$$$/JavaScripts/ExportLayersToFiles/VisibleOnly=&Visible Layers Only");
var strLabelFileType = localize("$$$/JavaScripts/ExportLayersToFiles/FileType=File Type:");
var strCheckboxIncludeICCProfile = localize("$$$/JavaScripts/ExportLayersToFiles/IncludeICC=&Include ICC Profile");
var strJPEGOptions = localize("$$$/JavaScripts/ExportLayersToFiles/JPEGOptions=JPEG Options:");
var strLabelQuality = localize("$$$/JavaScripts/ExportLayersToFiles/Quality=Quality:");
var strPSDOptions = localize("$$$/JavaScripts/ExportLayersToFiles/PSDOptions=PSD Options:");
var strCheckboxMaximizeCompatibility = localize("$$$/JavaScripts/ExportLayersToFiles/Maximize=&Maximize Compatibility");
var strTIFFOptions = localize("$$$/JavaScripts/ExportLayersToFiles/TIFFOptions=TIFF Options:");
var strLabelImageCompression = localize("$$$/JavaScripts/ExportLayersToFiles/ImageCompression=Image Compression:");
var strNone = localize("$$$/JavaScripts/ExportLayersToFiles/None=None");
var strPDFOptions = localize("$$$/JavaScripts/ExportLayersToFiles/PDFOptions=PDF Options:");
var strLabelEncoding = localize("$$$/JavaScripts/ExportLayersToFiles/Encoding=Encoding:");
var strTargaOptions = localize("$$$/JavaScripts/ExportLayersToFiles/TargaOptions=Targa Options:");
var strLabelDepth = localize("$$$/JavaScripts/ExportLayersToFiles/Depth=Depth:");
var strRadiobutton16bit = localize("$$$/JavaScripts/ExportLayersToFiles/Bit16=16bit");
var strRadiobutton24bit = localize("$$$/JavaScripts/ExportLayersToFiles/Bit24=24bit");
var strRadiobutton32bit = localize("$$$/JavaScripts/ExportLayersToFiles/Bit32=32bit");
var strBMPOptions = localize("$$$/JavaScripts/ExportLayersToFiles/BMPOptions=BMP Options:");
var strAlertSpecifyDestination = localize("$$$/JavaScripts/ExportLayersToFiles/SpecifyDestination=Please specify destination.");
var strAlertDestinationNotExist = localize("$$$/JavaScripts/ExportLayersToFiles/DestionationDoesNotExist=Destination does not exist.");
var strTitleSelectDestination = localize("$$$/JavaScripts/ExportLayersToFiles/SelectDestination=Select Destination");
var strAlertDocumentMustBeOpened = localize("$$$/JavaScripts/ExportLayersToFiles/OneDocument=You must have a document open to export!");
var strAlertNeedMultipleLayers = localize("$$$/JavaScripts/ExportLayersToFiles/NoLayers=You need a document with multiple layers to export!");
var strAlertWasSuccessful = localize("$$$/JavaScripts/ExportLayersToFiles/Success= was successful.");
var strUnexpectedError = localize("$$$/JavaScripts/ExportLayersToFiles/Unexpected=Unexpected error");
var strMessage = localize("$$$/JavaScripts/ExportLayersToFiles/Message=Export Layers To Files action settings");
var stretQuality = localize( "$$$/locale_specific/JavaScripts/ExportLayersToFiles/ETQualityLength=30" );
var stretDestination = localize( "$$$/locale_specific/JavaScripts/ExportLayersToFiles/ETDestinationLength=160" );
var strddFileType = localize( "$$$/locale_specific/JavaScripts/ExportLayersToFiles/DDFileType=100" );
var strpnlOptions = localize( "$$$/locale_specific/JavaScripts/ExportLayersToFiles/PNLOptions=100" );
var strPNG8Options = localize("$$$/JavaScripts/ExportLayersToFiles/PNG8Options=PNG-8 Options:");
var strCheckboxPNGTransparency = localize("$$$/JavaScripts/ExportLayersToFiles/Transparency=Transparency");
var strCheckboxPNGInterlaced = localize("$$$/JavaScripts/ExportLayersToFiles/Interlaced=Interlaced");
var strCheckboxPNGTrm = localize("$$$/JavaScripts/ExportLayersToFiles/Trim=Trim Layers");
var strPNG24Options = localize("$$$/JavaScripts/ExportLayersToFiles/PNG24Options=PNG-24 Options:");
// the drop down list indexes for file type
var bmpIndex = 0;
var jpegIndex = 1;
var pdfIndex = 2;
var psdIndex = 3;
var targaIndex = 4;
var tiffIndex = 5;
var png8Index = 6;
var png24Index = 7;
// the drop down list indexes for tiff compression
var compNoneIndex = 0;
var compLZWIndex = 1;
var compZIPIndex = 2;
var compJPEGIndex = 3;
// ok and cancel button
var runButtonID = 1;
var cancelButtonID = 2;
// Dispatch
main();
// Functions
// Function: main
// Usage: the core routine for this script
// Input: <none>
// Return: <none>
function main() {
if ( app.documents.length <= 0 ) {
if ( DialogModes.NO != app.playbackDisplayDialogs ) {
alert( strAlertDocumentMustBeOpened );
return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
var exportInfo = new Object();
initExportInfo(exportInfo);
// look for last used params via Photoshop registry, getCustomOptions will throw if none exist
try {
var d = app.getCustomOptions("4d633fbb-ed90-480d-8e03-cccb16131a34");
descriptorToObject(exportInfo, d, strMessage, postProcessExportInfo);
catch(e) {
// it's ok if we don't have any options, continue with defaults
// see if I am getting descriptor parameters
descriptorToObject(exportInfo, app.playbackParameters, strMessage, postProcessExportInfo);
if ( DialogModes.ALL == app.playbackDisplayDialogs ) {
if (cancelButtonID == settingDialog(exportInfo)) {
return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
try {
var docName = app.activeDocument.name; // save the app.activeDocument name before duplicate.
var layerCount = app.documents[docName].layers.length;
var layerSetsCount = app.documents[docName].layerSets.length;
if ((layerCount <= 1)&&(layerSetsCount <= 0)) {
if ( DialogModes.NO != app.playbackDisplayDialogs ) {
alert( strAlertNeedMultipleLayers );
return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
} else {
var rememberMaximize;
var needMaximize = exportInfo.psdMaxComp ? QueryStateType.ALWAYS : QueryStateType.NEVER;
if ( exportInfo.fileType == psdIndex && app.preferences.maximizeCompatibility != needMaximize ) {
rememberMaximize = app.preferences.maximizeCompatibility;
app.preferences.maximizeCompatibility = needMaximize;
app.activeDocument = app.documents[docName];
var duppedDocument = app.activeDocument.duplicate();
duppedDocument.activeLayer = duppedDocument.layers[duppedDocument.layers.length-1]; // for removing
setInvisibleAllArtLayers(duppedDocument);
exportChildren(duppedDocument, app.documents[docName], exportInfo, duppedDocument, exportInfo.fileNamePrefix);
duppedDocument.close( SaveOptions.DONOTSAVECHANGES );
var d = objectToDescriptor(exportInfo, strMessage, preProcessExportInfo);
app.putCustomOptions("4d633fbb-ed90-480d-8e03-cccb16131a34", d);
var dd = objectToDescriptor(exportInfo, strMessage, preProcessExportInfo);
app.playbackParameters = dd;
if ( rememberMaximize != undefined ) {
app.preferences.maximizeCompatibility = rememberMaximize;
if ( DialogModes.ALL == app.playbackDisplayDialogs ) {
alert(strTitle + strAlertWasSuccessful);
app.playbackDisplayDialogs = DialogModes.ALL;
} catch (e) {
if ( DialogModes.NO != app.playbackDisplayDialogs ) {
alert(e);
return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
// Function: settingDialog
// Usage: pop the ui and get user settings
// Input: exportInfo object containing our parameters
// Return: on ok, the dialog info is set to the exportInfo object
function settingDialog(exportInfo) {
dlgMain = new Window("dialog", strTitle);
// match our dialog background color to the host application
var brush = dlgMain.graphics.newBrush (dlgMain.graphics.BrushType.THEME_COLOR, "appDialogBackground");
dlgMain.graphics.backgroundColor = brush;
dlgMain.graphics.disabledBackgroundColor = dlgMain.graphics.backgroundColor;
dlgMain.orientation = 'column';
dlgMain.alignChildren = 'left';
// -- top of the dialog, first line
dlgMain.add("statictext", undefined, strLabelDestination);
// -- two groups, one for left and one for right ok, cancel
dlgMain.grpTop = dlgMain.add("group");
dlgMain.grpTop.orientation = 'row';
dlgMain.grpTop.alignChildren = 'top';
dlgMain.grpTop.alignment = 'fill';
// -- group top left
dlgMain.grpTopLeft = dlgMain.grpTop.add("group");
dlgMain.grpTopLeft.orientation = 'column';
dlgMain.grpTopLeft.alignChildren = 'left';
dlgMain.grpTopLeft.alignment = 'fill';
// -- the second line in the dialog
dlgMain.grpSecondLine = dlgMain.grpTopLeft.add("group");
dlgMain.grpSecondLine.orientation = 'row';
dlgMain.grpSecondLine.alignChildren = 'center';
dlgMain.etDestination = dlgMain.grpSecondLine.add("edittext", undefined, exportInfo.destination.toString());
dlgMain.etDestination.preferredSize.width = StrToIntWithDefault( stretDestination, 160 );
dlgMain.btnBrowse = dlgMain.grpSecondLine.add("button", undefined, strButtonBrowse);
dlgMain.btnBrowse.onClick = function() {
var defaultFolder = dlgMain.etDestination.text;
var testFolder = new Folder(dlgMain.etDestination.text);
if (!testFolder.exists) {
defaultFolder = "~";
var selFolder = Folder.selectDialog(strTitleSelectDestination, defaultFolder);
if ( selFolder != null ) {
dlgMain.etDestination.text = selFolder.fsName;
dlgMain.defaultElement.active = true;
// -- the third line in the dialog
dlgMain.grpTopLeft.add("statictext", undefined, strLabelFileNamePrefix);
// -- the fourth line in the dialog
dlgMain.etFileNamePrefix = dlgMain.grpTopLeft.add("edittext", undefined, exportInfo.fileNamePrefix.toString());
dlgMain.etFileNamePrefix.alignment = 'fill';
dlgMain.etFileNamePrefix.preferredSize.width = StrToIntWithDefault( stretDestination, 160 );
// -- the fifth line in the dialog
dlgMain.cbVisible = dlgMain.grpTopLeft.add("checkbox", undefined, strCheckboxVisibleOnly);
dlgMain.cbVisible.value = exportInfo.visibleOnly;
// -- the sixth line is the panel
dlgMain.pnlFileType = dlgMain.grpTopLeft.add("panel", undefined, strLabelFileType);
dlgMain.pnlFileType.alignment = 'fill';
// -- now a dropdown list
dlgMain.ddFileType = dlgMain.pnlFileType.add("dropdownlist");
dlgMain.ddFileType.preferredSize.width = StrToIntWithDefault( strddFileType, 100 );
dlgMain.ddFileType.alignment = 'left';
dlgMain.ddFileType.add("item", "BMP");
dlgMain.ddFileType.add("item", "JPEG");
dlgMain.ddFileType.add("item", "PDF");
dlgMain.ddFileType.add("item", "PSD");
dlgMain.ddFileType.add("item", "Targa");
dlgMain.ddFileType.add("item", "TIFF");
dlgMain.ddFileType.add("item", "PNG-8");
dlgMain.ddFileType.add("item", "PNG-24");
dlgMain.ddFileType.onChange = function() {
hideAllFileTypePanel();
dlgMain.cbIcc.show();
switch(this.selection.index) {
case bmpIndex:
dlgMain.pnlFileType.pnlOptions.text = strBMPOptions;
dlgMain.pnlFileType.pnlOptions.grpBMPOptions.show();
break;
case jpegIndex:
dlgMain.pnlFileType.pnlOptions.text = strJPEGOptions;
dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.show();
dlgMain.cbIcc.hide();
break;
case tiffIndex:
dlgMain.pnlFileType.pnlOptions.text = strTIFFOptions;
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.show();
break;
case pdfIndex:
dlgMain.pnlFileType.pnlOptions.text = strPDFOptions;
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.show();
break;
case targaIndex:
dlgMain.pnlFileType.pnlOptions.text = strTargaOptions;
dlgMain.pnlFileType.pnlOptions.grpTargaOptions.show();
break;
case png8Index:
dlgMain.pnlFileType.pnlOptions.text = strPNG8Options;
dlgMain.pnlFileType.pnlOptions.grpPNG8Options.show();
break;
case png24Index:
dlgMain.pnlFileType.pnlOptions.text = strPNG24Options;
dlgMain.pnlFileType.pnlOptions.grpPNG24Options.show();
break;
case psdIndex:
default:
dlgMain.pnlFileType.pnlOptions.text = strPSDOptions;
dlgMain.pnlFileType.pnlOptions.grpPSDOptions.show();
break;
dlgMain.ddFileType.items[exportInfo.fileType].selected = true;
// -- now after all the radio buttons
dlgMain.cbIcc = dlgMain.pnlFileType.add("checkbox", undefined, strCheckboxIncludeICCProfile);
dlgMain.cbIcc.value = exportInfo.icc;
dlgMain.cbIcc.alignment = 'left';
// -- now the options panel that changes
dlgMain.pnlFileType.pnlOptions = dlgMain.pnlFileType.add("panel", undefined, "Options");
dlgMain.pnlFileType.pnlOptions.alignment = 'fill';
dlgMain.pnlFileType.pnlOptions.orientation = 'stack';
dlgMain.pnlFileType.pnlOptions.preferredSize.height = StrToIntWithDefault( strpnlOptions, 100 );
// PSD options
dlgMain.pnlFileType.pnlOptions.grpPSDOptions = dlgMain.pnlFileType.pnlOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpPSDOptions.cbMax = dlgMain.pnlFileType.pnlOptions.grpPSDOptions.add("checkbox", undefined, strCheckboxMaximizeCompatibility);
dlgMain.pnlFileType.pnlOptions.grpPSDOptions.cbMax.value = exportInfo.psdMaxComp;
dlgMain.pnlFileType.pnlOptions.grpPSDOptions.visible = (exportInfo.fileType == psdIndex);
// PNG8 options
dlgMain.pnlFileType.pnlOptions.grpPNG8Options = dlgMain.pnlFileType.pnlOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Trans = dlgMain.pnlFileType.pnlOptions.grpPNG8Options.add("checkbox", undefined, strCheckboxPNGTransparency.toString());
dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Inter = dlgMain.pnlFileType.pnlOptions.grpPNG8Options.add("checkbox", undefined, strCheckboxPNGInterlaced.toString());
dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Trm = dlgMain.pnlFileType.pnlOptions.grpPNG8Options.add("checkbox", undefined, strCheckboxPNGTrm.toString());
dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Trans.value = exportInfo.png8Transparency;
dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Inter.value = exportInfo.png8Interlaced;
dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Trm.value = exportInfo.png8Trim;
dlgMain.pnlFileType.pnlOptions.grpPNG8Options.visible = (exportInfo.fileType == png8Index);
// PNG24 options
dlgMain.pnlFileType.pnlOptions.grpPNG24Options = dlgMain.pnlFileType.pnlOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans = dlgMain.pnlFileType.pnlOptions.grpPNG24Options.add("checkbox", undefined, strCheckboxPNGTransparency.toString());
dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter = dlgMain.pnlFileType.pnlOptions.grpPNG24Options.add("checkbox", undefined, strCheckboxPNGInterlaced.toString());
dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trm = dlgMain.pnlFileType.pnlOptions.grpPNG24Options.add("checkbox", undefined, strCheckboxPNGTrm.toString());
dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans.value = exportInfo.png24Transparency;
dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter.value = exportInfo.png24Interlaced;
dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trm.value = exportInfo.png24Trim;
dlgMain.pnlFileType.pnlOptions.grpPNG24Options.visible = (exportInfo.fileType == png24Index);
// JPEG options
dlgMain.pnlFileType.pnlOptions.grpJPEGOptions = dlgMain.pnlFileType.pnlOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.add("statictext", undefined, strLabelQuality);
dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.etQuality = dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.add("edittext", undefined, exportInfo.jpegQuality.toString());
dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.etQuality.preferredSize.width = StrToIntWithDefault( stretQuality, 30 );
dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.visible = (exportInfo.fileType == jpegIndex);
// TIFF options
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions = dlgMain.pnlFileType.pnlOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.orientation = 'column';
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.visible = (exportInfo.fileType == tiffIndex);
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.alignment = 'left';
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.add("statictext", undefined, strLabelImageCompression);
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.add("dropdownlist");
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add("item", strNone);
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add("item", "LZW");
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add("item", "ZIP");
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.add("item", "JPEG");
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.onChange = function() {
if (this.selection.index == compJPEGIndex) {
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality.enabled = true;
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.enabled = true;
} else {
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality.enabled = false;
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.enabled = false;
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.alignment = 'left';
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.add("statictext", undefined, strLabelQuality);
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.add("edittext", undefined, exportInfo.tiffJpegQuality.toString());
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.preferredSize.width = StrToIntWithDefault( stretQuality, 30 );
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.graphics.disabledBackgroundColor = brush;
var index;
switch (exportInfo.tiffCompression) {
case TIFFEncoding.NONE: index = compNoneIndex; break;
case TIFFEncoding.TIFFLZW: index = compLZWIndex; break;
case TIFFEncoding.TIFFZIP: index = compZIPIndex; break;
case TIFFEncoding.JPEG: index = compJPEGIndex; break;
default: index = compNoneIndex; break;
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.items[index].selected = true;
if (TIFFEncoding.JPEG != exportInfo.tiffCompression) { // if not JPEG
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.stQuality.enabled = false;
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.enabled = false;
// PDF options
dlgMain.pnlFileType.pnlOptions.grpPDFOptions = dlgMain.pnlFileType.pnlOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.orientation = 'column';
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.visible = (exportInfo.fileType == pdfIndex);
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.alignment = 'left';
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.add("statictext", undefined, strLabelEncoding);
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.add("radiobutton", undefined, "ZIP");
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip.onClick = function() {
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality.enabled = false;
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.enabled = false;
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.add("radiobutton", undefined, "JPEG");
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg.onClick = function() {
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality.enabled = true;
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.enabled = true;
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.alignment = 'left';
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.add("statictext", undefined, strLabelQuality);
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.add("edittext", undefined, exportInfo.pdfJpegQuality.toString());
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.preferredSize.width = StrToIntWithDefault( stretQuality, 30 );
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.graphics.disabledBackgroundColor = brush;
switch (exportInfo.pdfEncoding) {
case PDFEncoding.PDFZIP:
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip.value = true; break;
case PDFEncoding.JPEG:
default:
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg.value = true; break;
if (PDFEncoding.JPEG != exportInfo.pdfEncoding) {
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.stQuality.enabled = false;
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.enabled = false;
// Targa options
dlgMain.pnlFileType.pnlOptions.grpTargaOptions = dlgMain.pnlFileType.pnlOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add("statictext", undefined, strLabelDepth);
dlgMain.pnlFileType.pnlOptions.grpTargaOptions.visible = (exportInfo.fileType == targaIndex);
dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb16bit = dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add( "radiobutton", undefined, strRadiobutton16bit);
dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit = dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add( "radiobutton", undefined, strRadiobutton24bit);
dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb32bit = dlgMain.pnlFileType.pnlOptions.grpTargaOptions.add( "radiobutton", undefined, strRadiobutton32bit);
switch (exportInfo.targaDepth) {
case TargaBitsPerPixels.SIXTEEN: dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb16bit.value = true; break;
case TargaBitsPerPixels.TWENTYFOUR: dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit.value = true; break;
case TargaBitsPerPixels.THIRTYTWO: dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb32bit.value = true; break;
default: dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit.value = true; break;
// BMP options
dlgMain.pnlFileType.pnlOptions.grpBMPOptions = dlgMain.pnlFileType.pnlOptions.add("group");
dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add("statictext", undefined, strLabelDepth);
dlgMain.pnlFileType.pnlOptions.grpBMPOptions.visible = (exportInfo.fileType == bmpIndex);
dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb16bit = dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add( "radiobutton", undefined, strRadiobutton16bit);
dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit = dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add( "radiobutton", undefined, strRadiobutton24bit);
dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb32bit = dlgMain.pnlFileType.pnlOptions.grpBMPOptions.add( "radiobutton", undefined, strRadiobutton32bit);
switch (exportInfo.bmpDepth) {
case BMPDepthType.SIXTEEN: dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb16bit.value = true; break;
case BMPDepthType.TWENTYFOUR:dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit.value = true; break;
case BMPDepthType.THIRTYTWO: dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb32bit.value = true; break;
default: dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit.value = true; break;
// the right side of the dialog, the ok and cancel buttons
dlgMain.grpTopRight = dlgMain.grpTop.add("group");
dlgMain.grpTopRight.orientation = 'column';
dlgMain.grpTopRight.alignChildren = 'fill';
dlgMain.btnRun = dlgMain.grpTopRight.add("button", undefined, strButtonRun );
dlgMain.btnRun.onClick = function() {
// check if the setting is properly
var destination = dlgMain.etDestination.text;
if (destination.length == 0) {
alert(strAlertSpecifyDestination);
return;
var testFolder = new Folder(destination);
if (!testFolder.exists) {
alert(strAlertDestinationNotExist);
return;
dlgMain.close(runButtonID);
dlgMain.btnCancel = dlgMain.grpTopRight.add("button", undefined, strButtonCancel );
dlgMain.btnCancel.onClick = function() {
dlgMain.close(cancelButtonID);
dlgMain.defaultElement = dlgMain.btnRun;
dlgMain.cancelElement = dlgMain.btnCancel;
// the bottom of the dialog
dlgMain.grpBottom = dlgMain.add("group");
dlgMain.grpBottom.orientation = 'column';
dlgMain.grpBottom.alignChildren = 'left';
dlgMain.grpBottom.alignment = 'fill';
dlgMain.pnlHelp = dlgMain.grpBottom.add("panel");
dlgMain.pnlHelp.alignment = 'fill';
dlgMain.etHelp = dlgMain.pnlHelp.add("statictext", undefined, strHelpText, {multiline:true});
dlgMain.etHelp.alignment = 'fill';
dlgMain.onShow = function() {
dlgMain.ddFileType.onChange();
// give the hosting app the focus before showing the dialog
app.bringToFront();
dlgMain.center();
var result = dlgMain.show();
if (cancelButtonID == result) {
return result; // close to quit
// get setting from dialog
exportInfo.destination = dlgMain.etDestination.text;
exportInfo.fileNamePrefix = dlgMain.etFileNamePrefix.text;
exportInfo.visibleOnly = dlgMain.cbVisible.value;
exportInfo.fileType = dlgMain.ddFileType.selection.index;
exportInfo.icc = dlgMain.cbIcc.value;
exportInfo.jpegQuality = dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.etQuality.text;
exportInfo.psdMaxComp = dlgMain.pnlFileType.pnlOptions.grpPSDOptions.cbMax.value;
index = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpCompression.ddCompression.selection.index;
if (index == compNoneIndex) {
exportInfo.tiffCompression = TIFFEncoding.NONE;
if (index == compLZWIndex) {
exportInfo.tiffCompression = TIFFEncoding.TIFFLZW;
if (index == compZIPIndex) {
exportInfo.tiffCompression = TIFFEncoding.TIFFZIP;
if (index == compJPEGIndex) {
exportInfo.tiffCompression = TIFFEncoding.JPEG;
exportInfo.tiffJpegQuality = dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.grpQuality.etQuality.text;
if (dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbZip.value) {
exportInfo.pdfEncoding = PDFEncoding.PDFZIP;
if (dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpCompression.rbJpeg.value) {
exportInfo.pdfEncoding = PDFEncoding.JPEG;
exportInfo.pdfJpegQuality = dlgMain.pnlFileType.pnlOptions.grpPDFOptions.grpQuality.etQuality.text;
if (dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb16bit.value) {
exportInfo.targaDepth = TargaBitsPerPixels.SIXTEEN;
if (dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb24bit.value) {
exportInfo.targaDepth = TargaBitsPerPixels.TWENTYFOUR;
if (dlgMain.pnlFileType.pnlOptions.grpTargaOptions.rb32bit.value) {
exportInfo.targaDepth = TargaBitsPerPixels.THIRTYTWO;
if (dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb16bit.value) {
exportInfo.bmpDepth = BMPDepthType.SIXTEEN;
if (dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb24bit.value) {
exportInfo.bmpDepth = BMPDepthType.TWENTYFOUR;
if (dlgMain.pnlFileType.pnlOptions.grpBMPOptions.rb32bit.value) {
exportInfo.bmpDepth = BMPDepthType.THIRTYTWO;
return result;
// Function: hideAllFileTypePanel
// Usage: hide all the panels in the common actions
// Input: <none>, dlgMain is a global for this script
// Return: <none>, all panels are now hidden
function hideAllFileTypePanel() {
dlgMain.pnlFileType.pnlOptions.grpPSDOptions.hide();
dlgMain.pnlFileType.pnlOptions.grpJPEGOptions.hide();
dlgMain.pnlFileType.pnlOptions.grpTIFFOptions.hide();
dlgMain.pnlFileType.pnlOptions.grpPDFOptions.hide();
dlgMain.pnlFileType.pnlOptions.grpTargaOptions.hide();
dlgMain.pnlFileType.pnlOptions.grpBMPOptions.hide();
dlgMain.pnlFileType.pnlOptions.grpPNG8Options.hide();
dlgMain.pnlFileType.pnlOptions.grpPNG24Options.hide();
// Function: initExportInfo
// Usage: create our default parameters
// Input: a new Object
// Return: a new object with params set to default
function initExportInfo(exportInfo) {
exportInfo.destination = new String("");
exportInfo.fileNamePrefix = new String("untitled_");
exportInfo.visibleOnly = false;
exportInfo.fileType = psdIndex;
exportInfo.icc = true;
exportInfo.jpegQuality = 8;
exportInfo.psdMaxComp = true;
exportInfo.tiffCompression = TIFFEncoding.NONE;
exportInfo.tiffJpegQuality = 8;
exportInfo.pdfEncoding = PDFEncoding.JPEG;
exportInfo.pdfJpegQuality = 8;
exportInfo.targaDepth = TargaBitsPerPixels.TWENTYFOUR;
exportInfo.bmpDepth = BMPDepthType.TWENTYFOUR;
exportInfo.png24Transparency = true;
exportInfo.png24Interlaced = false;
exportInfo.png24Trim = true;
exportInfo.png8Transparency = true;
exportInfo.png8Interlaced = false;
exportInfo.png8Trim = true;
try {
exportInfo.destination = Folder(app.activeDocument.fullName.parent).fsName; // destination folder
var tmp = app.activeDocument.fullName.name;
exportInfo.fileNamePrefix = decodeURI(tmp.substring(0, tmp.indexOf("."))); // filename body part
} catch(someError) {
exportInfo.destination = new String("");
exportInfo.fileNamePrefix = app.activeDocument.name; // filename body part
// Function: saveFile
// Usage: the worker routine, take our params and save the file accordingly
// Input: reference to the document, the name of the output file,
// export info object containing more information
// Return: <none>, a file on disk
function saveFile( docRef, fileNameBody, exportInfo) {
switch (exportInfo.fileType) {
case jpegIndex:
docRef.bitsPerChannel = BitsPerChannelType.EIGHT;
/*var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".jpg");
jpgSaveOptions = new JPEGSaveOptions();
jpgSaveOptions.embedColorProfile = exportInfo.icc;
jpgSaveOptions.quality = exportInfo.jpegQuality;
docRef.saveAs(saveFile, jpgSaveOptions, true, Extension.LOWERCASE);*/
var desc= new ActionDescriptor();
var formatDesc = new ActionDescriptor();
formatDesc.putInteger( charIDToTypeID( "EQlt" ), exportInfo.jpegQuality );
formatDesc.putEnumerated( charIDToTypeID( "MttC" ), charIDToTypeID( "MttC" ), charIDToTypeID( "None" ) );
desc.putObject( charIDToTypeID( "As " ), charIDToTypeID( "JPEG" ), formatDesc );
desc.putPath( charIDToTypeID( "In " ), saveFile );
desc.putBoolean( charIDToTypeID( "Cpy " ), true );
executeAction( charIDToTypeID( "save" ), desc4, DialogModes.NO );
break;
case psdIndex:
var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".psd");
psdSaveOptions = new PhotoshopSaveOptions();
psdSaveOptions.embedColorProfile = exportInfo.icc;
psdSaveOptions.maximizeCompatibility = exportInfo.psdMaxComp;
docRef.saveAs(saveFile, psdSaveOptions, true, Extension.LOWERCASE);
break;
case tiffIndex:
var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".tif");
tiffSaveOptions = new TiffSaveOptions();
tiffSaveOptions.embedColorProfile = exportInfo.icc;
tiffSaveOptions.imageCompression = exportInfo.tiffCompression;
if (TIFFEncoding.JPEG == exportInfo.tiffCompression) {
tiffSaveOptions.jpegQuality = exportInfo.tiffJpegQuality;
docRef.saveAs(saveFile, tiffSaveOptions, true, Extension.LOWERCASE);
break;
case pdfIndex:
if (docRef.bitsPerChannel == BitsPerChannelType.THIRTYTWO)
docRef.bitsPerChannel = BitsPerChannelType.SIXTEEN;
var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".pdf");
pdfSaveOptions = new PDFSaveOptions();
pdfSaveOptions.embedColorProfile = exportInfo.icc;
pdfSaveOptions.encoding = exportInfo.pdfEncoding;
if (PDFEncoding.JPEG == exportInfo.pdfEncoding) {
pdfSaveOptions.jpegQuality = exportInfo.pdfJpegQuality;
docRef.saveAs(saveFile, pdfSaveOptions, true, Extension.LOWERCASE);
break;
case targaIndex:
docRef.bitsPerChannel = BitsPerChannelType.EIGHT;
var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".tga");
targaSaveOptions = new TargaSaveOptions();
targaSaveOptions.resolution = exportInfo.targaDepth;
docRef.saveAs(saveFile, targaSaveOptions, true, Extension.LOWERCASE);
break;
case bmpIndex:
docRef.bitsPerChannel = BitsPerChannelType.EIGHT;
var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".bmp");
bmpSaveOptions = new BMPSaveOptions();
bmpSaveOptions.depth = exportInfo.bmpDepth;
docRef.saveAs(saveFile, bmpSaveOptions, true, Extension.LOWERCASE);
break;
case png8Index:
saveFile(docRef, fileNameBody, exportInfo, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter.value, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans.value);
function saveFile( docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {
var id5 = charIDToTypeID( "Expr" );
var desc3 = new ActionDescriptor();
var id6 = charIDToTypeID( "Usng" );
var desc4 = new ActionDescriptor();
var id7 = charIDToTypeID( "Op " );
var id8 = charIDToTypeID( "SWOp" );
var id9 = charIDToTypeID( "OpSa" );
desc4.putEnumerated( id7, id8, id9 );
var id10 = charIDToTypeID( "Fmt " );
var id11 = charIDToTypeID( "IRFm" );
var id12 = charIDToTypeID( "PNG8" );
desc4.putEnumerated( id10, id11, id12 );
var id13 = charIDToTypeID( "Intr" ); //Interlaced
desc4.putBoolean( id13, interlacedValue );
var id14 = charIDToTypeID( "RedA" );
var id15 = charIDToTypeID( "IRRd" );
var id16 = charIDToTypeID( "Prcp" ); //Algorithm
desc4.putEnumerated( id14, id15, id16 );
var id17 = charIDToTypeID( "RChT" );
desc4.putBoolean( id17, false );
var id18 = charIDToTypeID( "RChV" );
desc4.putBoolean( id18, false );
var id19 = charIDToTypeID( "AuRd" );
desc4.putBoolean( id19, false );
var id20 = charIDToTypeID( "NCol" ); //NO. Of Colors
desc4.putInteger( id20, 256 );
var id21 = charIDToTypeID( "Dthr" ); //Dither
var id22 = charIDToTypeID( "IRDt" );
var id23 = charIDToTypeID( "Dfsn" ); //Dither type
desc4.putEnumerated( id21, id22, id23 );
var id24 = charIDToTypeID( "DthA" );
desc4.putInteger( id24, 100 );
var id25 = charIDToTypeID( "DChS" );
desc4.putInteger( id25, 0 );
var id26 = charIDToTypeID( "DCUI" );
desc4.putInteger( id26, 0 );
var id27 = charIDToTypeID( "DChT" );
desc4.putBoolean( id27, false );
var id28 = charIDToTypeID( "DChV" );
desc4.putBoolean( id28, false );
var id29 = charIDToTypeID( "WebS" );
desc4.putInteger( id29, 0 );
var id30 = charIDToTypeID( "TDth" ); //transparency dither
var id31 = charIDToTypeID( "IRDt" );
var id32 = charIDToTypeID( "None" );
desc4.putEnumerated( id30, id31, id32 );
var id33 = charIDToTypeID( "TDtA" );
desc4.putInteger( id33, 100 );
var id34 = charIDToTypeID( "Trns" ); //Transparency
desc4.putBoolean( id34, transparencyValue );
var id35 = charIDToTypeID( "Mtt " );
desc4.putBoolean( id35, true ); //matte
var id36 = charIDToTypeID( "MttR" ); //matte color
desc4.putInteger( id36, 255 );
var id37 = charIDToTypeID( "MttG" );
desc4.putInteger( id37, 255 );
var id38 = charIDToTypeID( "MttB" );
desc4.putInteger( id38, 255 );
var id39 = charIDToTypeID( "SHTM" );
desc4.putBoolean( id39, false );
var id40 = charIDToTypeID( "SImg" );
desc4.putBoolean( id40, true );
var id41 = charIDToTypeID( "SSSO" );
desc4.putBoolean( id41, false );
var id42 = charIDToTypeID( "SSLt" );
var list1 = new ActionList();
desc4.putList( id42, list1 );
var id43 = charIDToTypeID( "DIDr" );
desc4.putBoolean( id43, false );
var id44 = charIDToTypeID( "In " );
desc4.putPath( id44, new File( exportInfo.destination + "/" + fileNameBody + ".png") );
var id45 = stringIDToTypeID( "SaveForWeb" );
desc3.putObject( id6, id45, desc4 );
executeAction( id5, desc3, DialogModes.NO );
//var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".png");
//bmpSaveOptions = new BMPSaveOptions();
//bmpSaveOptions.depth = exportInfo.bmpDepth;
//docRef.saveAs(saveFile, bmpSaveOptions, true, Extension.LOWERCASE);
break;
case png24Index:
saveFile(docRef, fileNameBody, exportInfo, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Inter.value, dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trans.value);
function saveFile( docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {
var id6 = charIDToTypeID( "Expr" );
var desc3 = new ActionDescriptor();
var id7 = charIDToTypeID( "Usng" );
var desc4 = new ActionDescriptor();
var id8 = charIDToTypeID( "Op " );
var id9 = charIDToTypeID( "SWOp" );
var id10 = charIDToTypeID( "OpSa" );
desc4.putEnumerated( id8, id9, id10 );
var id11 = charIDToTypeID( "Fmt " );
var id12 = charIDToTypeID( "IRFm" );
var id13 = charIDToTypeID( "PN24" );
desc4.putEnumerated( id11, id12, id13 );
var id14 = charIDToTypeID( "Intr" );
desc4.putBoolean( id14, interlacedValue );
var id15 = charIDToTypeID( "Trns" );
desc4.putBoolean( id15, transparencyValue );
var id16 = charIDToTypeID( "Mtt " );
desc4.putBoolean( id16, true );
var id17 = charIDToTypeID( "MttR" );
desc4.putInteger( id17, 255 );
var id18 = charIDToTypeID( "MttG" );
desc4.putInteger( id18, 255 );
var id19 = charIDToTypeID( "MttB" );
desc4.putInteger( id19, 255 );
var id20 = charIDToTypeID( "SHTM" );
desc4.putBoolean( id20, false );
var id21 = charIDToTypeID( "SImg" );
desc4.putBoolean( id21, true );
var id22 = charIDToTypeID( "SSSO" );
desc4.putBoolean( id22, false );
var id23 = charIDToTypeID( "SSLt" );
var list1 = new ActionList();
desc4.putList( id23, list1 );
var id24 = charIDToTypeID( "DIDr" );
desc4.putBoolean( id24, false );
var id25 = charIDToTypeID( "In " );
desc4.putPath( id25, new File( exportInfo.destination + "/" + fileNameBody + ".png") );
var id26 = stringIDToTypeID( "SaveForWeb" );
desc3.putObject( id7, id26, desc4 );
executeAction( id6, desc3, DialogModes.NO );
//var saveFile = new File(exportInfo.destination + "/" + fileNameBody + ".png");
//bmpSaveOptions = new BMPSaveOptions();
//bmpSaveOptions.depth = exportInfo.bmpDepth;
//docRef.saveAs(saveFile, bmpSaveOptions, true, Extension.LOWERCASE);
break;
default:
if ( DialogModes.NO != app.playbackDisplayDialogs ) {
alert(strUnexpectedError);
break;
// Function: zeroSuppress
// Usage: return a string padded to digit(s)
// Input: num to convert, digit count needed
// Return: string padded to digit length
function zeroSuppress (num, digit) {
var tmp = num.toString();
while (tmp.length < digit) {
tmp = "0" + tmp;
return tmp;
// Function: setInvisibleAllArtLayers
// Usage: unlock and make invisible all art layers, recursively
// Input: document or layerset
// Return: all art layers are unlocked and invisible
function setInvisibleAllArtLayers(obj) {
for( var i = 0; i < obj.artLayers.length; i++) {
obj.artLayers[i].allLocked = false;
obj.artLayers[i].visible = false;
for( var i = 0; i < obj.layerSets.length; i++) {
setInvisibleAllArtLayers(obj.layerSets[i]);
// Function: removeAllInvisibleArtLayers
// Usage: remove all the invisible art layers, recursively
// Input: document or layer set
// Return: <none>, all layers that were invisible are now gone
function removeAllInvisibleArtLayers(obj) {
for( var i = obj.artLayers.length-1; 0 <= i; i--) {
try {
if(!obj.artLayers[i].visible) {
obj.artLayers[i].remove();
catch (e) {
for( var i = obj.layerSets.length-1; 0 <= i; i--) {
removeAllInvisibleArtLayers(obj.layerSets[i]);
// Function: removeAllEmptyLayerSets
// Usage: find all empty layer sets and remove them, recursively
// Input: document or layer set
// Return: empty layer sets are now gone
function removeAllEmptyLayerSets(obj) {
var foundEmpty = true;
for( var i = obj.layerSets.length-1; 0 <= i; i--) {
if( removeAllEmptyLayerSets(obj.layerSets[i])) {
obj.layerSets[i].remove();
} else {
foundEmpty = false;
if (obj.artLayers.length > 0) {
foundEmpty = false;
return foundEmpty;
// Function: zeroSuppress
// Usage: return a string padded to digit(s)
// Input: num to convert, digit count needed
// Return: string padded to digit length
function removeAllInvisible(docRef) {
removeAllInvisibleArtLayers(docRef);
removeAllEmptyLayerSets(docRef);
// Function: exportChildren
// Usage: find all the children in this document to save
// Input: duplicate document, original document, export info,
// reference to document, starting file name
// Return: <none>, documents are saved accordingly
function exportChildren(dupObj, orgObj, exportInfo, dupDocRef, fileNamePrefix) {
for( var i = 0; i < dupObj.artLayers.length; i++) {
if (exportInfo.visibleOnly) { // visible layer only
if (!orgObj.artLayers[i].visible) {
continue;
dupObj.artLayers[i].visible = true;
var layerName = dupObj.artLayers[i].name; // store layer name before change doc
var duppedDocumentTmp = dupDocRef.duplicate();
if ((psdIndex == exportInfo.fileType)||(png24Index == exportInfo.fileType)||(png8Index == exportInfo.fileType)) { // PSD: Keep transparency
removeAllInvisible(duppedDocumentTmp);
//PNGFileOptions
if ((png24Index == exportInfo.fileType)||(png8Index == exportInfo.fileType)) { // PNGFileOptions
if ((dlgMain.pnlFileType.pnlOptions.grpPNG8Options.png8Trm.value == true)&&(png8Index == exportInfo.fileType)) { //transparancy checked?
if (activeDocument.activeLayer.isBackgroundLayer == false) { //is it anything but a background layer?
app.activeDocument.trim(TrimType.TRANSPARENT);
if ((dlgMain.pnlFileType.pnlOptions.grpPNG24Options.png24Trm.value == true)&&(png24Index == exportInfo.fileType)) { //transparancy checked?
if (activeDocument.activeLayer.isBackgroundLayer == false) { //is it anything but a background layer?
app.activeDocument.trim(TrimType.TRANSPARENT);
} else { // just flatten
duppedDocumentTmp.flatten();
var fileNameBody = fileNamePrefix;
fileNameBody += "_" + zeroSuppress(i, 4);
fileNameBody += "_" + la -
I3 desktop screenshots and config sharing
i3 seems to be the new tiling WM on the block, and quite a solid one at that.
While I've just begun tinkering with it, I figured it might be good to have a thread i3 users can share their screenshots and possibly also configuration details, so that newer users can benefit from it.
After all, it's pretty damn hard to search the forum for 'i3'! Not so much a general discussion thread, there's one already around for that.
I've got nothing myself (yet), but if you have an i3 at least slightly different than out-of-the-box, please share
The below is shamelessly ripped from the daily screenshot thread.
* DO NOT post full resolution screenshots! You can use the "mogrify" command (pacman -S imagemagick) to make a thumbnail of your screenshot:
$ cp screenie.png thumb-screenie.png
$ mogrify -resize 20% thumb-screenie.png
Twenty percent of the original size is great for 1024x768 screenies. For bigger sizes (and especially for multi-monitor setups), we ask you to keep in mind not everyone uses broadband, and use an even smaller size (10% of a Full HD setup will still be 192x180, for example). You can then upload these images to your server and use the following code to show them on the forum:
[url=http://my.site.com/screenie.png][img]http://my.site.com/thumb-screenie.png[/img][/url]
* Several websites also offer free image hosting. Here are some that supports thumbnails:
Omploader | ImageShack | xs.to | iPICTURE | ImageHosting | Imagebam
Use the "Thumbnail for forums" link code that is supplied by the image hosting sites to post your thumbnail link.
Although, try to avoid imageshack. Its a pain in the you know where.
NOTE: full-size screenshots and resized images will be deleted by the moderators.
* If the screenshot has questionable material that might not be safe to view while at work or in a school setting, please post only a link and not a thumbnail, along with a mention of "Not Safe for Work". Posts that do not adhere to this are subject to deletion without notice at any time.
* Please try to include any links to your wallpaper or configs that you may have and/or the names of your icon theme, running apps, DE, etc. in the same post to reduce unnecessary clutter later.
Last edited by Ranguvar (2010-08-23 04:04:52)The below is the config code. I've been meaning to put it on my git-hub, but never got around to it... I will eventually. The rxvt window is nothing special.. Just have it floating and then resized it to my liking... Or are you asking for my PS1 prompt?
## Font
# ISO 10646 = Unicode
font -misc-fixed-medium-*-*--12-*-*-*-*-*-*-*
## Window border style
# bn: border normal, with window title bar
# bp: border only, no window title bar
# bb: no border or window title bar
new_window bp
## Colours
#colourclass border bckgrnd text
client.focused #1793D0 #1793D0 #FFFFFF
client.focused_inactive #333333 #333333 #999999
client.unfocused #333333 #333333 #999999
client.urgent #FF0000 #8C5665 #FF0000
bar.focused #1793D0 #1793D0 #FFFFFF
bar.unfocused #333333 #333333 #999999
bar.urgent #FF0000 #000000 #FF0000
## Startup Programs
exec conky | dzen2 -bg black -fg white -fn -misc-fixed-medium-*-*--12-*-*-*-*-*-*-* -p -w 550 -h 16 -x 7
30 -y 784 -ta r &
## Program Shortcuts
# Mod1+Shift+Enter starts a new terminal
bind Mod1+Shift+36 exec urxvt
# Mod1+Shift+w starts a web browser (chromium)
bind Mod1+Shift+25 exec chromium
# Mod1+Shift+q kills the current client
bind Mod1+Shift+24 kill
## Tiling Layouts
# Toggle tiling/floating of the current window (Mod1+Shift+Space)
bind Mod1+Shift+65 t
# Use Mouse+Mod1 to drag floating windows
floating_modifier Mod1
# Fullscreen (Mod1+f)
bind Mod1+41 f
# Stacking (Mod1+h)
bind Mod1+43 s
# Tabbed (Mod1+w)
bind Mod1+25 T
# Default (Mod1+e)
bind Mod1+26 d
# Go into the tiling layer / floating layer, depending on whether
# the current window is tiling / floating (Mod1+t)
bind Mod1+28 focus ft
# Focus (Mod1+j/k/l/;)
bind Mod1+44 h
bind Mod1+45 j
bind Mod1+46 k
bind Mod1+47 l
# (alternatively, you can use the cursor keys:)
bindsym Mod1+Left h
bindsym Mod1+Down j
bindsym Mod1+Up k
bindsym Mod1+Right l
# Focus Container (Mod3+j/k/l/;)
bind Mod3+44 wch
bind Mod3+45 wcj
bind Mod3+46 wck
bind Mod3+47 wcl
# (alternatively, you can use the cursor keys:)
bindsym Mod3+Left wch
bindsym Mod3+Down wcj
bindsym Mod3+Up wck
bindsym Mod3+Right wcl
# Snap (Mod1+Control+j/k/l/;)
bind Mod1+Control+44 sh
bind Mod1+Control+45 sj
bind Mod1+Control+46 sk
bind Mod1+Control+47 sl
# (alternatively, you can use the cursor keys:)
bindsym Mod1+Control+Left sh
bindsym Mod1+Control+Down sj
bindsym Mod1+Control+Up sk
bindsym Mod1+Control+Right sl
# Move (Mod1+Shift+j/k/l/;)
bind Mod1+Shift+44 mh
bind Mod1+Shift+45 mj
bind Mod1+Shift+46 mk
bind Mod1+Shift+47 ml
# (alternatively, you can use the cursor keys:)
bindsym Mod1+Shift+Left mh
bindsym Mod1+Shift+Down mj
bindsym Mod1+Shift+Up mk
bindsym Mod1+Shift+Right ml
# Move Container (Mod3+Shift+j/k/l/;)
bind Mod3+Shift+44 wcmh
bind Mod3+Shift+45 wcmj
bind Mod3+Shift+46 wcmk
bind Mod3+Shift+47 wcml
# Workspaces (Mod1+1/2/…)
bind Mod1+10 1
bind Mod1+11 2
bind Mod1+12 3
bind Mod1+13 4
bind Mod1+14 5
bind Mod1+15 6
bind Mod1+16 7
bind Mod1+17 8
bind Mod1+18 9
bind Mod1+19 10
# Workspace Names
workspace 1 Main
workspace 2 Web
workspace 3 Grid
workspace 4 Root
workspace 5 Misc
# Move to Workspaces
bind Mod1+Shift+10 m1
bind Mod1+Shift+11 m2
bind Mod1+Shift+12 m3
bind Mod1+Shift+13 m4
bind Mod1+Shift+14 m5
bind Mod1+Shift+15 m6
bind Mod1+Shift+16 m7
bind Mod1+Shift+17 m8
bind Mod1+Shift+18 m9
bind Mod1+Shift+19 m10
# Assign workspaces
assign "chromium" 2
# Mod1+v starts dmenu and launches the selected application
# for now, we don't have a launcher of our own.
bind Mod1+55 exec /usr/bin/dmenu_run
# Mod1+Shift+e exits i3, Mod1+Shift+r restarts i3
bind Mod1+Shift+26 exit
bind Mod1+Shift+27 restart
# The IPC interface allows programs like an external workspace bar
# (i3-wsbar) or i3-msg (can be used to "remote-control" i3) to work.
ipc-socket ~/.i3/ipc.sock -
Problm with tiledlayer object not showing on screen!! plz help
im making a small chess game my chess board is made of Tiledlayer and my chess elements are also Tiledlayer wheneever a move is made i have to make changes to my chess elements cells. but i make changes and they appear on my tiledlayer object but dont show on screen...
when during game when i press FIRE_KEY first time my code goes to a thread and starts a rectangle which blinks and when i press fire again the tiled_layer is updated such that my chess element is moved from selected position to desired position.... but i dont c the change on screen....
here is the complete code of chess board class...
* @(#)ChessCanvas.java
* @author Aaqib
* @version 1.00 1007/9/19
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
public class ChessCanvas extends GameCanvas implements Runnable{
private final int SCREEN_X = getWidth();
private final int SCREEN_Y = getHeight();
private int boardSize = 128;
// starting point of our chess game
private int startX = (SCREEN_X - boardSize)/2;
private int startY = (SCREEN_Y - boardSize)/2;
// create bounding rectangle to know the end of chess board;
private int endX = startX + boardSize;
private int endY = startY + boardSize;
private static final byte BOARD_COLUMN = 8;
private static final byte BOARD_ROWS = 8;
private static final byte TILE_DIMENSION = 16;
// current X, Y position of cursor
private byte currentCursorRow;
private byte currentCursorColumn;
// the row column which r selected
private byte selectedRow;
private byte selectedColumn;
// the current pixel lcoations
private int currentPixelX;
private int currentPixelY;
// check if selected. convert curser to red
private boolean selected = false;
// background color
private int white = 0xFCFCFC;
// the chess board tiled Layer
private TiledLayer tiledLayer;
// the chess elements
private TiledLayer chessElements;
// layer Manager to add tiles and sprites;
private LayerManager layerManager;
// the cursor which selects and moves the objects
private Sprite cursor;
// matrix representing the chess board;
private final byte chkBoard[][] ={
{2,1,2,1,2,1,2,1},
{1,2,1,2,1,2,1,2},
{2,1,2,1,2,1,2,1},
{1,2,1,2,1,2,1,2},
{2,1,2,1,2,1,2,1},
{1,2,1,2,1,2,1,2},
{2,1,2,1,2,1,2,1},
{1,2,1,2,1,2,1,2},
private final byte elements[][] = {
{6,2,5,4,3,5,2,6},
{1,1,1,1,1,1,1,1},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{7,7,7,7,7,7,7,7},
{12,8,11,10,9,11,8,12}
private Graphics g;
// main constructor
public ChessCanvas() {
super(true);
setFullScreenMode(true);
init();
* Initialize all GUI components
public void init(){
try{
Image spriteImg = Image.createImage("/cursor.png");
cursor = new Sprite(spriteImg,15,15);
cursor.setRefPixelPosition(startX - TILE_DIMENSION, startY - TILE_DIMENSION);
Image img = Image.createImage("/board.png");
Image elmt = Image.createImage("/chess.png");
tiledLayer = new TiledLayer(BOARD_COLUMN, BOARD_ROWS, img, TILE_DIMENSION, TILE_DIMENSION);
chessElements = new TiledLayer(BOARD_COLUMN, BOARD_ROWS, elmt,16,16);
layerManager = new LayerManager();
currentCursorRow = 5;
currentCursorColumn = 6;
for (int y = 0; y < BOARD_COLUMN; y++){
for (int x = 0; x < BOARD_ROWS; x++){
int grid = chkBoard[y][x];
int data = elements[y][x];
tiledLayer.setCell(x,y, grid);
chessElements.setCell(x,y,data);
g = getGraphics();
// sets the position of chess board in center
tiledLayer.move(startX, startY);
chessElements.move(startX,startY);
layerManager.append(cursor);
layerManager.append(chessElements);
layerManager.append(tiledLayer);
moveCursor(currentCursorColumn * TILE_DIMENSION, currentCursorRow * TILE_DIMENSION );
catch(Exception exception ){
System.out.println("exception in init method -- "+exception.toString() );
public void start(){
Thread thread = new Thread(this);
thread.start();
public void run(){
while (true){
// check game state;
//checkState();
// check the userinput
checkUserInput();
updateScreen(g);
flushGraphics();
try{
Thread.currentThread().sleep(300);
}catch(Exception exception){}
private void checkUserInput(){
int keyState = getKeyStates();
switch(keyState){
case FIRE_PRESSED:
if (selected){
selected = false;
// make the move
logging ("selected >> row "+selectedRow+" column >> "+selectedColumn +"\n");
logging ("current >> row "+currentCursorRow+" column >> "+currentCursorColumn +"\n");
int selectedItem = chessElements.getCell(selectedRow,selectedColumn);
logging("selected item >> "+selectedItem+"\n");
chessElements.setCell(currentCursorRow,currentCursorColumn,selectedItem);
chessElements.setCell(selectedRow,selectedColumn,0);
chessElements.setCell(6,6,7);
logging ("selected >> row "+selectedRow+" column >> "+selectedColumn +"\n");
moveCursor(0,0);
}else{
selected = true;
selectedRow = currentCursorRow;
selectedColumn = currentCursorColumn;
chessElements.setCell(6,6,7);
animateSelectedItem();
break;
case UP_PRESSED:
if (!cursor.isVisible())
cursor.setVisible(true);
if (currentCursorRow == 1){
if (currentCursorColumn == 8){
currentCursorColumn =1;
currentCursorRow = 8;
currentPixelX = -112;
currentPixelY = 112;
//moveCursor(-112,112);
}else{
currentCursorColumn++;
currentCursorRow = 8;
currentPixelX = TILE_DIMENSION;
currentPixelY = 112;
//moveCursor(TILE_DIMENSION,112);
else{
currentCursorRow--;
currentPixelX = 0;
currentPixelY = -TILE_DIMENSION;
//moveCursor(0,-TILE_DIMENSION);
moveCursor(currentPixelX,currentPixelY);
break;
case DOWN_PRESSED:
if (!cursor.isVisible())
cursor.setVisible(true);
if (currentCursorRow == 8){
if (currentCursorColumn == 8){
currentCursorColumn =1;
currentCursorRow = 1;
currentPixelX = -112;
currentPixelY = -112;
//moveCursor(-112,-112);
}else{
currentCursorColumn++;
currentCursorRow = 1;
currentPixelX = TILE_DIMENSION;
currentPixelY = -112;
//moveCursor(TILE_DIMENSION,-112);
else{
currentCursorRow++;
currentPixelX = 0;
currentPixelY = TILE_DIMENSION;
//moveCursor(0,TILE_DIMENSION);
moveCursor(currentPixelX, currentPixelY);
break;
case LEFT_PRESSED:
if (!cursor.isVisible())
cursor.setVisible(true);
if (currentCursorColumn == 1){
if (currentCursorRow == 1){
currentCursorColumn =8;
currentCursorRow = 8;
currentPixelX = 112;
currentPixelY = 112;
//moveCursor(112,112);
}else{
currentCursorColumn = 8;
currentCursorRow--;
currentPixelX = 112;
currentPixelY = -TILE_DIMENSION;
//moveCursor(112,-TILE_DIMENSION);
else{
currentCursorColumn--;
currentPixelX = -TILE_DIMENSION;
currentPixelY = 0;
//moveCursor(-TILE_DIMENSION,0);
moveCursor(currentPixelX, currentPixelY);
break;
case RIGHT_PRESSED:
if (!cursor.isVisible())
cursor.setVisible(true);
if (currentCursorColumn == 8){
if (currentCursorRow == 8){
currentCursorColumn =1;
currentCursorRow = 1;
currentPixelX = -112;
currentPixelY = -112;
//moveCursor(-112,-112);
}else{
currentCursorColumn = 1;
currentCursorRow++;
currentPixelX = -112;
currentPixelY = TILE_DIMENSION;
//moveCursor(-112,TILE_DIMENSION);
else{
currentCursorColumn++;
currentPixelX = TILE_DIMENSION;
currentPixelY = 0;
//moveCursor(TILE_DIMENSION,0);
moveCursor(currentPixelX,currentPixelY);
break;
public void updateScreen(Graphics g){
g = getGraphics();
// set the background color
g.setColor(white);
g.fillRect(0, 0, getWidth(), getHeight());
// draw the board
tiledLayer.paint(g);
// paint the cursor
cursor.paint(g);
// chess elements
chessElements.paint(g);
private void moveCursor(int x , int y){
//logging(" cursor >> "+cursor.getFrame());
// red cursor selected
if (selected){
//logging("red");
cursor.setFrame(1);
}else{
// normal green cursor moving
//logging("green");
cursor.setFrame(0);
cursor.move(x,y);
* Animate the selected Item. runs a saperate thread;
private void animateSelectedItem(){
cursor.setVisible(false);
new Thread(new Runnable() {
Graphics g = getGraphics();
public void run(){
while(selected){
try{
Thread.currentThread().sleep(600);
}catch(Exception exception){
System.out.println("exception in animating sprite");
g.setColor(0xF71302);
g.drawRect((startX+ (selectedColumn * TILE_DIMENSION))-16,
(startY+ (selectedRow * TILE_DIMENSION))-16, 14, 14 );
flushGraphics();
}).start();
private void logging (String str){
System.out.print(str);
}plz help me....
thanks :({color:#000080}I don't know whether that's the only thing wrong here, but I see 3 calls to getGraphics(). The documentation for javax.microedition.lcdui.game.GameCanvas.getGraphics() says:{color}
A new Graphics object is created and returned each time this method is called; therefore, the needed Graphics object(s) should be obtained before the game starts then re-used while the game is running.
{color:#000080}-- Your call to getGraphics() in updateScreen(Graphics g) will return the reference to the local variable represented by the parameter g, which will be out of scope as soon as the method returns.
-- Your call to getGraphics() in animateSelectedItem() assigns the reference to a newly declared local variable, which too will be out of scope when the method returns. (But this method includes flushGraphics() so just possibly this g is flushed to the display.)
db{color} -
I'm trying to start with J2ME, and am completely puzzled by the whole thing. And Sun doesn't help much either. I'm trying to make a game, where lines fly by in the screen. The user must avoid these lines, by moving the ship around with the stylus. Is there enough in J2ME to accomplish this?
Another worry: Is J2ME obsolete? It appears to me that it hasn't been updated for a long time.Hello,
Is there enough in J2ME to accomplish this?Yes.
Is J2ME obsolete?No. Sometimes new technologies are not much visible to newbies. J2ME may be one of them. If you continue having difficulties, i reccomend you to buy a book to start quickly to J2ME.
Here are some tips for your J2ME game:
Getting Started with Java ME
http://www.java-tips.org/content/view/95/73/
How to write your First MIDP game
http://www.java-tips.org/content/view/833/73/
How to use a tiled layer in J2ME
http://www.java-tips.org/content/view/423/73/
How to implement a sprite class in J2ME
http://www.java-tips.org/content/view/424/73/
Detecting collision with sprites in J2ME
http://www.java-tips.org/content/view/425/73/
Good luck.
Maybe you are looking for
-
Transfer of edits from Lightroom to Bridge
I've edited lots of photos in raw in Lightroom (Rated / cropped / adjustments etc.) When viewed in Bridge, the editing does not appear in some cases. The metadata is held in xml files, I can see them. I have even ticked the 'Save metadata to file
-
Hi Any latest advice on spinning beach ball nightmare since Lion install. Happens when surfing with Safari, and i've tried Onyx etc Regards
-
I have a Music Tech Mac Lab with an AppleTV connected to a laser projector. I don't want Airplay to switch my audio to the AppleTV & projector. I have better audio hooked to my computer. Can I stop Airplay from switching to the lower quality laser pr
-
How to maintain a role who can check all SC belong one company.
hi experts we use SRM7.0 standalone scenario. there are many plant and each plant has supervisors who need to check all SC belong to themselves plant. my solution is assign authoriztion that can use 'SC monitor' in PFCG Role ,and restrict '
-
I have to reenter my Wifi password every time I restart my Ipod touch. It used to retain the password but now it drops out when I turn the Ipod off. Any suggestions?