How to run ps cs4 js script from applescript
Hi, I need to call photoshop js from applescript. Here what I have so far:
tell application "Adobe Photoshop CS4"
activate
set myScript to "Applications:Adobe Photoshop CS4:Presets:Scripts:_NDF_Ph_saveAsTif.jsx"
do javascript (myScript)
end tell
and it's compiles, but when runs, gives me "Error 25: Expected: ;." message.
How can I call ps script from as.
Thank you very much for your help.
Yulia
You have 2 ways either JavaScript supplied as string or as file. If you are going the route of file then you need to coerce your path string to 'alias' this will fail if it does NOT exist. Here are 2 examples. You also have option to pass arguments as list.
-- As String
set JavaScript to "myTest();
function myTest() {
var docRef = app.activeDocument;
var docWidth = docRef.width;
var docHeight = docRef.height;
var docSize = docWidth + ' x ' + docHeight
return docSize
tell application "Adobe Photoshop CS2"
activate
set Doc_Ref to the current document
tell Doc_Ref
do javascript JavaScript ¬
show debugger on runtime error
display dialog the result
end tell
end tell
-- As File
set ScriptPath to (path to applications folder as text) & "Adobe Photoshop CS2:Presets:Scripts:Hello.jsx" as alias
tell application "Adobe Photoshop CS2"
activate
set Doc_Ref to the current document
tell Doc_Ref
do javascript ScriptPath ¬
show debugger on runtime error
end tell
end tell
Similar Messages
-
How to prevent a text in script from displaying if its value is zero
Dear all,
How to prevent a text in script from displaying if its value is zero
for eg Price = 0.00
if price is 0 it should'nt appear in output.
I tried with if price ne 0.
price = &price&
endif.
but it's not working.
Regards
Raj
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jan 20, 2009 8:59 AMHello Nagaraju,
What you were doing is partially right.
The correct format to write in the script is as follows :
/: if &PRICE& ne 0.
&PRICE&
/: endif.
This should work. Let me know how it goes.
Nayan -
Can any one tell me how can i call a shell script from pl/sql
i like to call shell script from pl/sql procedure.
can any one suggest how can i do thisHave you not mastered in asking the same kind of question ?
First do write a script...
no one will spoon feed you.
How can i call a shell script from procedure
How to call Shell Script from pl/sql block
-Sk -
How can i call a shell script from procedure
I have a shell script.now i am i a situation to call that shell script from one of my procedures and need to get a value from that script.
can u suggest me that how can a call the shell script from pl/sql?Is the same question you asked here
How to call Shell Script from pl/sql block
-SK -
How to run form in the background from command line
please can anybody tell me to
how to run form in the background from command line
vishalUmmm....Oracle Forms is a foreground runtime kind of thing. What you want is a database procedure (or an OS utility - it depends on what sort of processing you want to do in the background).
Cheers, APC -
How to run an external .exe file from an indesign pluging
Hi,
Suppose if I have written an separate application in C++ (.exe file) & need to run it from an indesign pluging(as if a service in windows). have you provided that facilities in your SDK? if it's please let me know how to run an external .exe file from a indesign pluging.
Thanks,I'm actully writing data in PMString to a external txt file.
another question..
if i want to execute an action when the ok button is cliked how can i do it?
whe i add a button(widget) i know how to handle it. please see my code.
// Call the base class Update function so that default behavior will still occur (OK and Cancel buttons, etc.).
CDialogObserver::Update(theChange, theSubject, protocol, changedBy);
do
InterfacePtr<IControlView> controlView(theSubject, UseDefaultIID());
ASSERT(controlView);
if(!controlView) {
break;
// Get the button ID from the view.
WidgetID theSelectedWidget = controlView->GetWidgetID();
if (theChange == kTrueStateMessage)
//if (theSelectedWidget == kEXTCODGoButtonWidgetID
switch(theSelectedWidget.Get())
case kEXTCODGoButtonWidgetID:
this->ViewOutput();
break;
case kEXTCODFindButtonWidgetID:
this->SaveLog();
break;
// TODO: process this
} while (kFalse);
I do two actions "SaveLog" & "ViewOutput()" using two buttons. But i dont know how to execute an action when the ok button is clicked... -
How to create ArrayColletion in mx:Script from <mx:Model
id="results" source="/data/data.xml" />
Please see my code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Model id="results" source="/data/data.xml" />
<mx:Script>
import mx.collections.ArrayCollection;
import mx.utils.ArrayUtil;
import mx.controls.Alert;
</mx:Script>
<mx:ArrayCollection id ="dt1"
source="{ArrayUtil.toArray(results.result)}"/>
<mx:Script><![CDATA[
[Bindable]
public var expenses:ArrayCollection = dt1;
[Bindable]
public var expenses2:ArrayCollection = dt1;
[Bindable]
public var dp:ArrayCollection=expenses;
public function changeDataProvider():void{
Alert.show(expenses.toString());
if (dp==expenses){
dp=expenses2;
}else{
dp=expenses;
]]></mx:Script>
<mx:Panel x="10" y="10" width="100%" height="378"
layout="absolute">
<mx:ColumnChart dataProvider="{dt1}" x="10" y="10"
id="myChart" height="318" width="100%">
<mx:horizontalAxis>
<mx:CategoryAxis categoryField="month"/>
</mx:horizontalAxis>
<mx:series>
<mx:ColumnSeries displayName="apple" yField="apple"/>
<mx:ColumnSeries displayName="orange"
yField="orange"/>
<mx:ColumnSeries displayName="banana"
yField="banana"/>
</mx:series>
</mx:ColumnChart>
<mx:Legend dataProvider="{myChart}" x="481" y="10"/>
</mx:Panel>
<mx:Button x="284" y="416" label="Change Data" id="bt"
click="changeDataProvider()" />
</mx:Application>Tracy,
Thanks. That worked. However I have another related question:
I convert the xml feed to a XMLListCollection by doing:
<mx:XMLListCollection id="mission"
source="{xmlFeed.lastResult.day}"/>
and
<mx:XMLListCollection id="mission1"
source="{xmlFeed.lastResult.day.tBlock}"/>
On the chart I have
<mx:ColumnChart id="missionReadiness" height="150%"
width="100%"
paddingLeft="2" paddingRight="2"
showDataTips="true" dataProvider="{mission1}">
<mx:series>
<mx:ColumnSeries xField="" yField="@today"
displayName="Today"/>
<mx:ColumnSeries xField="" yField="@tomorrow"
displayName="Tomorrow"/>
<mx:ColumnSeries xField="" yField="@afterT"
displayName="After Tomorrow"/>
</mx:series>
</mx:ColumnChart>
the yField works, but for the xField I want to have the @date
but refers to the parent node, so I am clueless on how to refer to
it.
Also, I would like to display on the chart only the values to
a specific date (like @date="05/17/2007").
Any suggestions on how to do that?
Gilbert -
How to run OPatch against Node Manager from the admin server
How to run OPatch against Node Manager from the admin server
Hello,
I'm not sure what you meant by Opatch against nodemanager.You can check the below document about how to apply patches using Opatch
Oracle Fusion Middleware Patching with OPatch - 12c (12.1.2)
Refer the section " Common OPatch Commands When Patching an Oracle Fusion Middleware Oracle home"
/MR -
How to run a CMD command directly from run ?
How to run a CMD command directly from run ?
Like "cmd md D:\abcd". I did this before. But now I totally forgot how to do that ?
Please help..........Hi,
To add, here is the command CMD reference:
Cmd
Best regards
Michael Shao
TechNet Community Support -
Running a Excel VBA Addin from Applescript
Hi,
I have created a VBA script in Excel 2011. I want this scripot to be availbale to any workbook I open up in Excel so I have set the script as an Add-in. Then I want to be abke to run this script from Applescript. The final plan is to have an automater workflow which allows me to drag and drop an excel file onto it which will open the file, run the script I have told it to run and save the file again.
I think it is a referencing issue I have, I'm using the "run VB macro" command but I am getting the referencing wrong somewhere along the line. If anyone can help or point me in the direction of some good documentation it would be really helpful.
Thanksthe problem is that you keep trying to open the workbook when it is already open. in the attached code you will that I search to see if the workbook is open. If it is then I set it to be the active workbook and run the macro. If not then i open it and then run the macro.
try the attached code and see if it works for you. You will hace to make sure that all the references are closed and that the comparison functionality works for you. I just kinda hacked this together as a proof of concept for you.
Message Edited by Joe_H on 11-17-2009 12:04 PM
Joe.
"NOTHING IS EVER EASY"
Attachments:
excel_run_macro without open.vi 20 KB -
How to run a dialog's method from a button's event handler?
I've created my first dialog from the samples, but I am having trouble figuring out how to run a method in my dialog from an button's event handler. Can anyone please point me in the right direction?
function CreateDialog()
this.windowRef = null;
CreateDialog.prototype.run = function()
//...declare a bunch of vars
// Create a window of type palette.
var win = new Window("dialog", "Element Spray Generator",[iTop,iLeft,iTop + iWidth,iLeft + iHeight] ); // bounds = [left, top, right, bottom]
this.windowRef = win;
// Add a frame for the contents.
win.btnPanel = win.add("panel", [iPadding,iPadding,iWidth-iPadding,iHeight-iPadding], "");
.... add a bunch of other stuff ...
win.btnAdd = win.btnPanel.add("button", [win.btnRemove.bounds.left - iPadding - iButtonWidth,win.lstImages.bounds.bottom + iSmPadding,win.btnRemove.bounds.left - iPadding,win.lstImages.bounds.bottom + iSmPadding +iTextHeight], "Add");
win.btnAdd.onClick = function() {
//todo implement this
var f = File.openDialog("Open File") ;
win.lstImages.add("item", f.displayName );
this.EnableControls(); //<--- problem is on this line here!!
this.EnableControls(); //<--- this works
// Display the window
win.show();
return true;
CreateDialog.prototype.EnableControls = function (){
var result = true;
result = result && (this.windowRef.ddlPaths.selection != "");
result = result && (this.windowRef.lstImages.items.length > 0);
this.windowRef.btnOK.enabled = result;This may not be the reason, but when using the way I create dialogs 'this' inside of an onClick points to the control.
win.btnAdd.onClick = function() {
//todo implement this
var f = File.openDialog("Open File") ;
win.lstImages.add("item", f.displayName );
this.EnableControls(); //<--- I would expect it to call another function of btnAdd
// this.parent.EnableControls() might be what you want if the control is not in some other container -
"Import Failed" when trying to run a import (Integration) script from FDM
Backgroud about the Issue : My source system for data is Oracle Orion and the Destination is HFM.Trying to import data fom orion to HFM through FDM via ODBC connectivity.
Modified the "Integration Script Example" in fdm_admin guide and with this i am able to import data from the Orion to the FDM staging table "tDataSegX" however i am not abel to see any data in the FDM (Import Module) and thats when i get this error "Import Failed".
Posisble casue according to my knowledge : My Import script only includes code to 1.Connect to ODBC data source 2. copies all the values from the Source table to the staging table.
I am not sure if i am missing some attributes in the script ??!!
can some one help me in checking if my imoport scritp is correct ??!!!
Here is my script
Function Import_int(strLoc, lngCatKey, dblPerKey, strWorkTableName)
Dim objSS 'ADODB.Connection
Dim strOra 'Ora string
Dim rs ' As New ADODB.Recordset
Dim rsAppend 'tTB table append rs object
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set rsAppend = DW.DataAccess.farsTableAppend("TDATASEG7")
Dim strconn
strconn="Provider=msdaora;Data Source=<<Data Source Name>>;User Id=<<Username>>;Password=<<Password>>;"
cnSS.open strConn
strOra = "Select * "
strOra = strOra & "FROM <<Oracle View>>"
'Get data
rs.Open strOra, cnSS
If rs.bof And rs.eof Then
RES.PlngActionType = 2
RES.PstrActionValue = "No Records to load!"
Exit Function
End If
'Loop through records and append to tTB table in location's DB
If Not rs.bof And Not rs.eof Then
Do While Not rs.eof
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = RES.PlngCatKey
rsAppend.Fields("PeriodKey") = RES.PdtePerKey
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("CalcAcctType") = 9
'write conditions to eliminate null
rsAppend.Fields("Amount") = rs.fields("YTD").Value
rsAppend.Fields("Desc1") = test 'rs.fields("txtAcctDes").Value
rsAppend.Fields("Account") = rs.fields("MAIN_AC_CODE").Value
rsAppend.Fields("Entity") = rs.fields("COMPANY_CODE").Value
rs.movenext
Loop
End If
'Records loaded
RES.PlngActionType = 6
RES.PstrActionValue = "ODBC Import successful!"
'Assign Return value
SQLIntegration = True
rs.close
End FunctionHI,
I first changed the table name to "strWorkTableName" and tried executing only the script from the Workbench client and got error as bellow
Financial Data Management Workbench
-2147467259 - Data access error.
At Line: 20
OK
For some reason i am not ok with running the code in the workbench client (even for checking the syntax) because for the reason that i am not sure if all the parameter required by the funciton will be passed by donig just "Run script."So even with this error in the Work bench client i proceded to the Workflow module in the web interface and run the import and here is what i have now.
Error: An error occurred importing the file.
Detail: Invalid procedure call or argument
here is the error message from the "View Erro Log"
ERROR:
Code............................................. 5
Description...................................... Invalid procedure call or argument
Procedure........................................ clsImpProcessMgr.fExecuteImpScript
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 15676
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... ORION
Location ID...................................... 750
Location Seg..................................... 4
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
** Begin FDM Runtime Error Log Entry [2011-03-21 14:43:42] **
ERROR:
Code............................................. 5
Description...................................... Invalid procedure call or argument
Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 15676
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... ORION
Location ID...................................... 750
Location Seg..................................... 4
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
** Begin FDM Runtime Error Log Entry [2011-03-21 14:44:05] **
ERROR:
Code............................................. 70
Description...................................... Permission denied
Procedure........................................ clsArchiveMgr.fArchiveSupercededDelete
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 7180
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SAMPLE
Location ID...................................... 748
Location Seg..................................... 2
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
** Begin FDM Runtime Error Log Entry [2011-03-21 14:44:05] **
ERROR:
Code............................................. 70
Description...................................... Permission denied
Procedure........................................ clsArchiveMgr.fArchiveSupercededFlag
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 7180
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SAMPLE
Location ID...................................... 748
Location Seg..................................... 2
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
** Begin FDM Runtime Error Log Entry [2011-03-21 14:44:05] **
ERROR:
Code............................................. 70
Description...................................... Permission denied
Procedure........................................ clsImpProcessMgr.fClearData
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 7180
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SAMPLE
Location ID...................................... 748
Location Seg..................................... 2
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
** Begin FDM Runtime Error Log Entry [2011-03-21 14:44:05] **
ERROR:
Code............................................. 70
Description...................................... Permission denied
Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 7180
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SAMPLE
Location ID...................................... 748
Location Seg..................................... 2
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False -
How to run Content DB Client console from JDevloper
Hi
I have downloaded all the content db client console pages from server. Please let me know how to run the console from my local machine thru jdeveloper. When i tried to run it is giving some runtime exceptions.
Sep 10, 2007 10:46:07 AM oracle.ifs.fdk.http.HttpNodeManager
INFO: Creating HTTP Node ...
07/09/10 10:46:07 Cannot create HTTP Node:
oracle.ifs.common.IfsException: IFS-45061: Unable to create node
oracle.ifs.common.IfsException: IFS-20016: Required parameters are null (either "Schema Name" or "Domain Name" should be non-null)
at oracle.ifs.management.domain.HttpServletNodeUtilities.createNode(HttpServletNodeUtilities.java:243)
at oracle.ifs.management.domain.HttpServletNodeUtilities.createNode(HttpServletNodeUtilities.java:156)
at oracle.ifs.fdk.http.HttpServer.createNode(HttpServer.java:162)
at oracle.ifs.fdk.http.HttpNodeManager.contextInitialized(HttpNodeManager.java:37)
Please let me know if there is any documentation for this.
Thanks
RaviHi,
I built berkeley DB 4.4.20 and use it from Jbuilder2005, I noticed that tha size of Jbuilderw.exe consumes about 96MB of memory and the size of javaw.exe consumes (in my application) about 63MB. so I thought that if I load the jdk1.4 only ( by running my code from the command line) this will save memory because not all compenents of Jbuilder will be loaded into memory. to do so, I copied the directory jdk1.4 from inside jbuilder2005 and put it on c:\, then I build berkeley DB using visaul c++ 6.0 and filled the following pathes in the include directory(tools-->options->directories)
c:\jdk1.4\include
c:\jdk1.4\include\win32
and in the executable files directories I added the following path:
c:\jdk1.4\bin
then I set the classpath from inside windows (server2003), and I set the path as well but when I run the java class from the command line, I recieved message like "the packege com.sleepycat.db " not exist
thanks -
How to run a command line window from code?
In an application I need to run a dll file with a few arguements. These arguements can be given in the command line window. The execution of the dll file will return a string that i need to get (for the parsing etc).
1. How can I open a command line window from the Java code?
2. How to run commands on it?
3. How to get the results of the commands from the command line into my program?In an application I need to run a dll file with a few
arguements. These arguements can be given in the
command line window. The execution of the dll file
will return a string that i need to get (for the
parsing etc).
A dll is used by other programs. It is not possible to run it from the command line. -
How to execucte/calll a shell script from oracle
hi all
i want to execute a shell script from oracle...... how do i do that can any one send me a good link which i can refer and learn
or if any one has already implemented anything like this plz let me know the code
RegardsHere u goooooo
http://www.experts-exchange.com/Database/Oracle/Q_21908413.html
Regards,
http://www.oracleracexpert.com
Send email using UTL_MAIL in oracle.
http://www.oracleracexpert.com/2009/11/send-email-using-utlmail-in-oracle-10g.html
Migrate Non-ASM Database to ASM using RMAN
http://www.oracleracexpert.com/2009/10/migrate-database-to-asm-using-rman.html]
Maybe you are looking for
-
How to restore old prefs, etc after clean reinstall of 10.3.9?
Due to a fiasco with Drive Genius I was forced to reformat and reinstall 10.3.9. Luckly, I was bright enough to manually copy over the entire contents of the drive to a firewire drive before I started the drive genius project. I was able to find dire
-
Create .txt empty file After Message Processing Command Line Linux command
Hi All, An empty .txt file has to be created in FTP location(FTP loc c:\xyz\Customer20082910.txt) only after the .dat file has been created(FTP loc c:\xyz\Customer20082910.dat) Note:.dat has the actual data and .txt is an empty file and is created on
-
Yet again YouTube videos blacked out in Safari but not in Firefox
Hello, Is anyone else suddenly experiencing the same problem, which is that videos suddenly won't run in YouTube on Safari. The video frame is just blacked out. Copy and past the URL into Firefox and it runs without any problems. I understand this
-
I have 1000 records in a table based upon a search condition i am fetching 100 records. I have to display record one by one with previous and next button. I dont want to go back to my database to fetch the records one by one among the 100 records. I
-
As soon as I open a photo with Preview part of the photo turns black
As soon as I open a photo with Preview, part of the photo turns black. Just started doing this.