How to run a script A from a button "Button 1" ?
Hi all, I've got this problem for having a window with several buttons named "Button 1" "Button 2"... and run the script "Script A" if we click on the button 1, the script "Script B" if we click on the button 2 etc...
Here is my short script :
#target indesign
//make a table of contents which send directly to the right script
var w=new Window("dialog");
var buttongroup=w.add("group");
var panel=buttongroup.add("panel");
var button1=panel.add("button",undefined,"Script A");
var button2=panel.add("button",undefined,"Script B");
var button3=panel.add("button",undefined,"Script C");
var cancel=buttongroup.add("button",undefined,"Cancel",{name:'cancel'});
buttongroup.addEventListener('click',press)
w.show();
function press(e){
if(e.target.type=="button"){
if(e.target.text=="Script A"){
//w.close();
app.doScript(new File("c/scriptA.jsx"),ScriptLanguage.javascript);
else if(e.target.text=="Script B"){
app.doScript(new File("c/scriptB.jsx"),ScriptLanguage.javascript);
else if(e.target.text=="Script C"){
app.doScript(new File("c/scriptC.jsx"),ScriptLanguage.javascript);
Each script A, B and C begins with an app.dialogs.add()
And here is the problem, it tells me that an alert or a modal dialog is already active
I tried the w.close() but it doesn't work...
I don't think addEventListener is what I need, maybe I'm wrong for using a window but it's the only way to give names to the buttons, isn't it ?
Now I get it... I work both on Mac and Windows but when I tried the 'palette' I forgot that I had only the version CS4 on Windows
(and I launched the script from the ESTK instead of the script panel..mistake !!)
Now it works great on the Mac, thank you Peter for the help and for the pdf scriptui
Similar Messages
-
How to run a script on Oracle server from isqlplus
Hi I am trying to run a script on my workstation from Oracle server through isqlplus workarea. I entered following command and get the following error. i have enabled isqlplus URL by editing web.xml file already. Can please someone help how to run the script?
@http://myaixserver.com:5560/scripts/Databasestartupstages.sql;
SP2-0920: HTTP error 'page not found (505)' on attempt to open URLSo far, you haven't specified your rdbms version and isqlplus behaved differently on a 9iR1, 9iR2 from the one release on 10gR1/R2. on 9i it was a servlet based on a JServ servlet executor machine, meanwhile on 10g it is a J2EE compliant application deployed on an OC4J container, so configuration is different.
You may want to take a look at these references -->
* Starting iSQL*Plus from a URL
* Creating Reports using iSQL*Plus
~ Madrid -
How to run a script from Calculation Manager
Hi All,
I would like to know how to run a script made by using Calculation Manager. I have converted a simple rule script which has just one statement(HS.EXP "A#Sales = 100") in "Sub Calculate()" by using FMRulesMigrator.exe and then imported, deployed to an application. when I execute "Calculate" from a Data Grid, the rule didn't take effect to application data. If I load the script by using classic rule editor, it works fine.
Is there anything I have to know to run a rule script which is made by using Calculation Manager?
Thanks in advance.
CY.Hi,
Refer the following the link for calling logic from new custom buttons using VBA.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f085dd92-a40c-2c10-dcb1-a7c24476b23a
hpe this ll help.
thnks. -
How do i move scripting listener from my mac 10/10 desktop
How do i move scripting listener from my Mac yosemite desk top
What do you by move?
Which version of photoshop are you using?
Are you getting the ScriptingListenerJS.log put on your desktop after you run or Quit photoshop?
If so, that means you have the ScriptingListen.plugin enabled in your photoshop plugins folder. -
How to run a Concurrent Program from the back end?
Hi,
How to run a Concurrent Program from the back end?
Is it Possible to see that Concuurent Request id which we run from the back end, in the front end?
If yes, then Please Give reply how to write the code
Thanks in Advance,
Bharathi.SThis is documented in Chapter 20 of the Application Developers Guide http://download.oracle.com/docs/cd/B53825_03/current/acrobat/121devg.pdf. These MOS Docs also have some information available
221542.1 - Sample Code for FND_SUBMIT and FND_REQUEST API's
235359.1 - How to Launch Planning Data Pull MSCPDP using FND_REQUEST.SUBMIT_REQUEST
HTH
Srini -
How to call java script function from JSP ?
how to call java script function from JSP ?
i have function created by java script lets say x and i want to call this function from jsp scriplet tag which is at the same page ..thanks
-
How to run a openssl command from a java program
Hi All
Please suggest on how to run a openssl command from a java program.
I am using this
Runtime runtime = Runtime.getRuntime();
runtime.exec("openssl pkcs8 -inform der -nocrypt test.der result.pem");
This is suppose to take test.der as input and create result.pem.
There are no errors but the file result.pem isnt created.
Thanks in AdvanceFirst off is that openssl command correct? Should it be this instead:
openssl pkcs8 -inform der -nocrypt -in test.der -out result.pem
Try out your openssl command within a command prompt so that you know that it works ok. I think the command line you specified waits on stdin (well it does for me).
After that.....
runtime.exec creates a Process object. If you do this:
Process openssl = runtime.exec("....")
then you can examine the return code from openssl to see the exit code - for instance if the input file does not exist then exit = 1. You can test for this with Java
Alternatively you could get the stderr from the process and look inside it - if it is 0 length then all is good, if it has some text in there then it has likely failed. You could then throw an exception and include the stderr output in the exception messgae. You may need to experiment with this, runnig it first when openssl is happy then running it again when openssl is upset.
M -
How to run non-customised report from command prompt to gen trace file?
Hi
how to run non-customised report from command prompt to gen trace file?
EBS R12 RUP6.
RHEL5
rgrdsHi,
See (Note: 285497.1 - Rwrun.sh Does Not Generate Trace Output Using TRACEOPTS in Command Line) and/or (Note: 737445.1 - R12 Concurrent Requests Run Forever; rwrun Errors REP-50125) for the command you need to use.
Thanks,
Hussein -
How to run the 9I report from the forms menue 9i
how to run the 9I report from the forms menue 9i.
Shehzad LatifHi,
1. create a Reports Object node in Forms. If you use teh same object node name then you can write generic code that works in all Forms
2. Get the whitepaper about Forms/reports integrtion
http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
Frank -
How do I move scripting listener from my mac 0sx 10/10 desktop
how do i move scripting listener from my mac OS X yosemite Version 10/10 desktop
Open itunues, connect iphone, go to photo tab, select what you want, sync.
Click Support at the top of this page, then click manuals. You can read the manual from there. -
How to run a script from Oracle Form (Beside using HOST command)
I would like to run a script from Forms 6.0. I know that we can actually issue this command :
host('plus80.exe' username/password@connect_string @c:\scriptname);
BUT, is there any other alternative ?Sqlplus is a different program, so one way or the other you have to leave Forms to run sqlplus. What is you objection against HOST?
You can also run sqlplus from the database, but again you need a stored java procedure to call sqlplus (sort of HOST command that runs in the database).
Francois' solution works if your script just has a query to run, but if you have specific sqlplus commands (spool etc.) forms_ddl is probably not a solution. -
How to Run Indesign Script in a file from plugin code in CS4?
Hi,<br />I have the code to execute the InDesign script stored in external file for InDesign CS3.<br /><br />InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss)); <br />InterfacePtr<IScriptRunner> scriptRunner(scriptManager, UseDefaultIID()); <br /> IDFile scriptFile(scriptFilePath); <br /> if (scriptRunner->CanHandleFile(scriptFile)) <br /> { <br /> ScriptData returnValue; <br /> PMString errorString; <br /> ErrorCode error = scriptRunner->RunFile(scriptFile); <br /> ASSERT(error == kSuccess); <br /> } <br /><br />But the RunFile() method is cs4 expects an additional argument of the type RunScriptParams. <br />Someone please show me with a code snippet on how to excute a script file in CS4??
Dear Ian
Here I'm used the below coding in CS3, Its working fine....
//In CS3 Coding
PMString jsFullPath("c:\\windows\\sample.jsx"); // a path to my java script file
do
const
IDFile outFile(jsFullPath);InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));
ASSERT( scriptManager ) ;
InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID());
ASSERT( scriptRunner ) ;
if(scriptManager){
InterfacePtr<IScriptRunner>scriptRunner(scriptManager,UseDefaultIID());
RunScriptParams params(scriptRunner);
ErrorCode err = scriptRunner->RunFile(outFile, kTrue, kFalse);
while(kFalse);
But the same time I used this coding in CS4, Its not woking
//In CS4 Coding
PMString jsFullPath("c:\\windows\\MacID\\BIN\\sample.jsx"); // a path to my java script file
do
const
IDFile outFile(jsFullPath);InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));
ASSERT( scriptManager ) ;
InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID());
ASSERT( scriptRunner ) ;
if
(scriptManager){
InterfacePtr<IScriptRunner>scriptRunner(scriptManager,UseDefaultIID());
RunScriptParams params(scriptRunner);
ErrorCode err = scriptRunner->RunFile(outFile, params);
while(kFalse);
I changed the "RunFile" arguments also
RunScriptParams params(scriptRunner);
ErrorCode err = scriptRunner->RunFile(outFile, params);
But Still I'm facing the problem in InDesign CS4. That's mean "Adobe InDesign CS4" shout down for serious error happend.
Please kindly help me, for solving this problem.
Thanks & Regards
T.R.Harihara Sudhan
Message was edited by: Adobe-InDesign CS4 -
Applescript: How to run a script once upon logon for multiple users
I'm deploying a NetRestore image to about 150 Macs which will be using Active Directory and I've designed a custom default user for each new user. However, our system requires a specialized certificate that has to be installed on the local login.keychain for each user otherwise network connectivity is impacted.
I've tried to use the security command through Terminal to install the certificate, but no matter what combination of commands, I cannot seem to get that to work properly even with an already-created user. While it will often say it's installed, the cert will not actually show up in the login keychain in Keychain Access. And the network connectivity is still impacted.
So instead, I created a brief AppleScript that just gives the user brief instructions to click "Add" on the prompt for which Keychain to add the cert and then "Always Trust" for the "This cert is not verified" prompt. Then it launches Keychain Access. Originally, I was going to have it actually click the buttons for the user, but I realized trying to get the whole Accessibility apps and assitive devices to work on every new user would be a nightmare.
I created the script on another 10.9 Mac using Automator to make it an actual application. I've used the instructions in OS X: Using AppleScript with Accessibility and Security features in Mavericks to sign it and I'm using root to move it from its network location into the Applications folder. I've adjusted the permissions to allow all Admin users to r/w (along with everyone else). To the root user, it shows as a usable application, but every other user on the Mac sees it as damaged/incomplete.
What I want to do is add it to the default Login Items, so I can run the final AppleScript command to simply remove the login items listing. That way I don't need to worry about it running again, but it's still available for the next user to sign onto the deployed Mac.
I know it's a little convoluted, but this is the final piece to the NetRestore deployment I've been working on for months. Any suggestions on how to make this work (or even a completely different solution) would be greatly appreciated.
Here was the original shell script in case you're curious.
#!/bin/bash
## Prompt for current user admin for use in Certificate Install
while :; do # Loop until valid input is entered or Cancel is pressed.
localpass=$(osascript -e 'Tell application "System Events" to display dialog "Enter your password for Lync Setup:" default answer "" with hidden answer' -e 'text returned of result' 2>/dev/null)
if (( $? )); then exit 1; fi # Abort, if user pressed Cancel.
localpass=$(echo -n "$localpass" | sed 's/^ *//' | sed 's/ *$//') # Trim leading and trailing whitespace.
if [[ -z "$localpass" ]]; then
# The user left the password field blank.
osascript -e 'Tell application "System Events" to display alert "You must enter the local user password; please try again." as warning' >/dev/null
# Continue loop to prompt again.
else
# Valid input: exit loop and continue.
break
fi
done
echo $localpass | sudo security import /'StartupFiles'/bn-virtual.crt ~/Library/Keychain/login.keychain
osascript -e 'tell Application "System Events" to delete every login item whose name is "LyncCert"
And this is the AppleScript itself. (I used the \ to make it easier to read. The first line is actually one complete command)
display dialog "Click OK to start installing Mac Network Certificate." & return & return & \
"In the following prompts, click the 'Add' then 'Always Trust'." & return & return & \
After you have clicked 'Always Trust', quit Keychain Access." default button 1 with title \
"Mac Network Certificate Install"
activate application "Keychain Access"
tell application "Finder" to open POSIX file "/StartupFiles/bn-virtualcar.crt"
tell application "System Events" to delete login item "Lync-AppleScript"
end
Thank you for your help!I have run into this same issue. Are you trying to run the script one time as a new user logs in or everytime a user logs in?
-
How to run an XML Report from Oracle Forms 10G
Hello Friends,
I am in need of showing a xml report output through a button press trigger in Oracle Forms10G.
I have designed the report in XML Publisher and the report looks fine.I found few scripts useful in running the Oracle Report from Oracle forms10G like Run_Report_Object.But I am not aware of any script that could run a XML report and show the output directly from a Form.
All I want is to run a XML report from an Oracle Form with a button press trigger and show the output in an html version.
Can this be achieved?
If so, Kindly advise as this is an immediate work.
Regards,
Badrul.Hi,
If I am not wrong the XML publisher is same as BI publisher ...
There is one document which explains how to integrate using web service
You want to check this
http://www.oracle.com/technology/products/xml-publisher/docs/Forms_BIP_v22.pdf
or you can also try web.show_document .. -
How to run multiple scripts in sql*plus?
I would like to run 2 scripts in sql*plus, how do I do this? I tried the following, but it won't run.
create table student_new
AS
select *
from student
insert into student_new
(last_name, first_name
values
(Crop, Jenny)
The above are the two scripts I want to run, what am I doing wrong.
ThanksDo you have a solution to run multiple scripts continuosly, one after the other as one script.
Say I have file1.sql file2.sql, file3.sql.
I want to create a script run.sql, where this will run file1.sql,file2.sql,file3.sql one after other without any one running one after the other like follows:
run.sql should have
begin
@file1.sql
@file2.sql
@file3.sql
dbms_output.put_line(select sysdate from dual);
end;
If I run run.sql all the three scripts should be executed successfully and then display the current time . All these files have update statements(50,000 updates each file).
Very urgetn. Can some one hlpe, please.
Thanks in advance.
Maybe you are looking for
-
Expdp/impdp a partitioned DB
Hi, I'm importing a full DB with partitioned tables but have errors like this: ORA-31693: Table data object "SOMETHING"."SS_TRANSACTION_HIST":"SS_TRANSACTION_HIST_0907" failed to load/unload and is being skipped due to error: ORA-02354: error in expo
-
Lightscribe dvd supermultidrive/cd writer will not operate
Hi. I'm new to the forum. I have a HP Mediacenter pc 2006. For a while now, I cannot get the dvd/cd to operate. It says that there is registry errors code 19. Does anyone know of a way to fix this. I've tried to reinstall the device drivers,but it sa
-
Unicode X type variable problem
Hi, We are migrating to a Unicode system. In non Unicode system we have the following code. var1 type x value '0D'. replace var1 with ' ' into string1. When i am doing uccheck it is giving error 'var1 must be charecter type'. how to solve this proble
-
Firefox crashes when Mac OS X 10.6.8 wakes up from hibernation
Firefox has crashed now multiple times within a month in following event: - Firefox browser is open (with 1 or more tabs) and Mac OS X 10.6.8 wakes up from sleep - whenever clicking to Firefox to continue browsing, it crashes immediately. Open tabs h
-
Things Freezing and not Force Quitting
Lately, some of my applications are freezing up. One is Final Cut Pro, but my MS Word also has in the last few days. When I force quit, the application closes, but if you look on the dock, it still has a white dot next to it like it is open so in ord