How to run a script in the idle task
Hi all
Successfully, I wrote and performed a routine of idle task that periodically executes a simple method. now, I need to add a feature to this method so that it performs a simple javascript.
Here is my code:
...
UInt32 myTestIdleTask::RunTask)
UInt32 appFlags, IdleTimer * timeCheck) {}
If (appFlags &)
(IIdleTaskMgr::kMouseTracking
| IIdleTaskMgr::kUserActive
| IIdleTaskMgr::kInBackground
| IIdleTaskMgr::kMenuUp))
{
Return kOnFlagChange;
}
This-> runTestScript();
Return kmyTestFvExecInterval;
}
void myTestIdleTask::runTestScript() {}
This is the test script
PMString myTestScript ("app.activeDocument.exportFile (ExportFormat.pdfType, File(\"/Users/testuser/testing.pdf\"),false);" ');
I think that I should call CScriptRunner::RunScript()
somewhere here but without success
}
Any help on how to run the Javascript code for myTestScript from the runTestScript() method?
Thanks in advance,
Halin
Already, I solved my problem by using "IExtendScriptUtils".
For those who are interested, here is my solution:
void myTestIdleTask::runTestScript() {}
This is the test script
PMString myTestScript ("app.activeDocument.exportFile (ExportFormat.pdfType, File(\"/Users/testuser/testing.pdf\"),false);" ');
PMString engineName ("myengine");
Int32 errorCode is Utils
} Good luck. halin
Tags: InDesign
Similar Questions
-
How to run a script using the OMB tcl
I'm trying to run a tcl script using the following syntax in cmd
D:\app\Username\product\11.1.0\db_2\owb\bin\win32 > ombplus.bat c:\t.tcl
and I get the error
OMB01001: Not connected to the repository.
The tcl script was basically accompanied by a tutorial and I can't continue the OWB tutorial, unless I run it firstDeparture ombplus.bat
You can then start the script with the source command such as
source C:/t.tcl
Be careful with the backslash (he is not C:\t.tcl)
You must also add a connection before your script to OWB with the OMBCONNECT
OMBCONNECT $UserLogin/$UserPassword@$DBHostName:$DBHostPort:$ServiceName USE REPOSITORY '$RepositoryUser' USE MULTIPLE_USER_MODE
Replace the parameters $ with your own value.
And then your script, you can disconnect:
OMBDISCONNECT
Success
NicoDocumentation is here for the 11g OMBCOMMAND
http://download.Oracle.com/docs/CD/B28359_01/OWB.111/b31279/TOC.htm -
How to run a script in environment unix and how to run this program into a toad
Hello guys
Please help me!
How to run a script in the unix environment (Group of programs (cursor, programs...) stored in a file file.sql).
file.sql luks like this
WHENEVER OSERROR EXIT FAILURE
WHENEVER SQLERROR EXIT SQL. SQLCODE
SET the position
SET serveroutput size 1000000
coil ins2aais_jobs;
SELECT "FILE IS: ins2aais_jobs' FROM dual;"
SELECT "STARTED:' began, to_char (sysdate," YY/MM/DD HH24:MI:SS) TIME FROM dual; "
DECLARE
lv_upd_ct number: = 0;
lv_ins_ct number: = 0;
lv_exp_ct number: = 0;
---------------------
date of lv_FROM_date;
date of lv_to_date;
lv_mon_or_week varchar2 (20);
date of lv_week_end_date;
lv_month_indicator varchar2 (8);
-------------------------------------------------
Aais CURSOR IS
SELECT the ID substr (ID, 1, 7), SSN, FNAME, LNAME
, SUCCESS, COMPENSATE, INSTALLATION
, MODU, DRIVE, REVERSE, SUCC_RATE
TRANS_TOTAL, FILE_NAME, WEEK_END_DATE
RUN_DATE
OF weekly_aais;
-------------------------
I aais % rowtype;
-------------------------
PROCEDURE p_ins (r1 aais % ROWTYPE) IS
BEGIN
BEGIN
INSERT INTO AAIS_JOBS
(ID, SSN, SUCCESS, COMPENSATE, INSTALL, MODU
, DRIVE, REVERSE, SUCC_RATE, TRANS_TOTAL
FILE_NAME, WEEK_END_DATE, RUN_DATE
AAIS_FNAME, AAIS_LNAME
)
VALUES
(r1.ID, r1. SSN, r1. SUCCESS, r1. COMPENSATE, r1. INSTALLATION, r1. MODU
r1. DISK, r1. CONVERSELY, r1. SUCC_RATE, r1. TRANS_TOTAL
r1. File_name, r1. WEEK_END_DATE, r1. RUN_DATE
r1. FNAME, r1. LNAME
);
lv_ins_ct: = lv_ins_ct + 1;
EXCEPTION
WHILE OTHERS then
DBMS_OUTPUT. PUT_LINE ('ERROR IN THE INSERT STATEMENT');
DBMS_OUTPUT. Put_line (SQLERRM);
lv_exp_ct: = lv_exp_ct + 1;
END;
END;
------------------------------
PROCEDURE p_disp_msg IS
BEGIN
DBMS_OUTPUT. Put_line (' number of insertion: ' | to_char (lv_ins_ct));
DBMS_OUTPUT. Put_line (' number of Exceptions: ' | to_char (lv_exp_ct));
lv_ins_ct: = 0;
lv_exp_ct: = 0;
END;
---------------------------
BEGIN
lv_FROM_date: = to_date ('& 1', 'DD-MON-RR');
lv_to_date: = to_date ('& 2', 'DD-MON-RR');
lv_mon_or_week: = 'and 3';
lv_month_indicator: = di.get_month_ind (lv_mon_or_week, lv_FROM_date, lv_to_date);
------------------------------------
REMOVE FROM AAIS_JOBS
WHERE WEEK_END_DATE = lv_to_date;
-------------------------------------
COMMIT;
Aais OPEN;
LOOP
EXTRACT the aais IN i;
OUTPUT WHEN aais % NOTFOUND;
BEGIN
p_ins (i);
END;
END LOOP;
Aais CLOSE;
commit;
DBMS_OUTPUT. PUT_LINE ('INSERT INTO TABLE JOBS AAIS');
p_disp_msg;
-----------------------------------
END;
/
SELECT "FINISHED: ' | '. TO_CHAR (sysdate, "MM/DD/YY HH24:MI:SS'") FROM dual
/
spool off
"exit";
and also how we organize this into a toad?
Thank you.Hello
You vous connecter connect to oracle through unix and SQL prompt, run these commands in a .sql file.
Toad, you can run the instructions individually by selecting the sql statements or in a set with the F5 key.
Kind regards
AJR -
How to run a script for all the images in a folder?
How to run a script for all the images in a folder?
You can assign your script to an action, then use processor by batch or image with the option apply to all subfolders.
-
Run a script on the server side
someone at - not how to run a script out server php with him sending variables or receive all the variables and not to open a new window.
#2030 error: end of file was encountered. This is the error I get when you use this code
What is the file php is encode flv files. He calls him self saying that all videos uploaded in the database cue list are converted. So I have download 3 videos the script takes and makes the 1st file then 2nd, then 3rd. In the flash player I get error 2030 whenever the script call it is oneself.
If I call the script php outside of flash with a browser, it works perfectly.
I use all kinds of variations of URLRequest and URLLoader really puzzled. Thank you flexperts.
private function encodeHandler(event:DataEvent):void
{
var variables: URLVariables = new URLVariables();
variables.fileName = has ';
variables.fileExt = of ';
var request: URLRequest = new URLRequest ("""http://" " + ModelLocator.SERVER + ' / scripts/videoConvert.php"")
request.method = "get";
request.data = variables;
var loader: URLLoader = new URLLoader();
loader.dataFormat = can.
loader.addEventListener (Event.COMPLETE, completeHandler);
loader.addEventListener (flash.events.HTTPStatusEvent.HTTP_STATUS, onStatus);
try
{
//status.text = "video encoding".... » ;
loader.load (request);
trace() 'start encoding');
}
catch (error: error)
{
//status.text = "unable to load URL";
trace()"coding error cannot load url");
}
function onStatus(event:HTTPStatusEvent):void
{
If (event.status! = 0) {}
//status.text = "encoding error";
trace('encoding error');
}
}
function completeHandler(event:Event):void
{
//status.text = "complete encoding";
trace(() 'complete encoding');
}
}
Very well, please close this thread.
-
How can I run a script once the PC is booting and after I connect to my account?
Hi all
I'm using Vista, I want to run a script after that my PC is start and run script after I sign in to my account.
Can someone tell me how I can get there?
Thank you very much.
SF
Hello
You can try the suggestions of the link to find out how to assign scripts at startup:
Assign computer startup Scripts
http://TechNet.Microsoft.com/en-us/library/cc770556.aspx
Use startup, shutdown, logon, and Logoff Scripts
http://TechNet.Microsoft.com/en-us/library/cc753404.aspx
Reference: run a program automatically when Windows starts
http://Windows.Microsoft.com/en-us/Windows-Vista/run-a-program-automatically-when-Windows-starts
You can also post your query on the MSDN forum for assistance:
-
How to run a script as administrator and copy some setting of the connected user's profile?
I want to copy some profile setting to the connected on folder (% userprofile%\AppData\Roaming\Microsoft\Word) user profile password when they connect. Because the standard user accounts do not have the right admin to copy files to the folder, so I use schedule a task to run the .cmd as local administrator every time that a user login. But, when I use the % username % setting to try copying the file to the logged on user profile, the setting of % username % is interpreted as the name of the local administrator because the scheduled task is run as administrator. Therefore, the file is exemplary in the local Administrator profile. All solutions? Thank you
I log on as a user account standard and do a right-click the .cmd and run as admin. The script interpreter .cmd parameter of % username % as the admin because I ran as administrator.
-> Not altogether. There are two cases:
- You are connected under an administrator account. When you right click on cmd.exe, then you get a 'high' console session that is still running under the name of your current account.
- You are connected under a regular account. When you right click on cmd.exe and then you get a prompt and admin account name and its password. The new session is running under admin account.
Is there a way to set the parameter to % username % as long as the logged on user, when you run the .cmd as an administrator.
-> No - see above. Execution of a session high under a regular user account would defy the principle of administrator accounts.
Either of these two options, I gave you in my previous answer might work, with a bit of scripting. A much simpler method would be to restore the default permissions to the %userprofile%\AppData\Roaming\Microsoft\Word folder. Normally full, users have access to it. This is my preferred option. With the help of a scheduled task that is running under an administrator account is a kludge.
-
Run a script with the command sudo bash
Hello
I'm trying to run a bash script with comments script Manager package. There is a sudo command in the script and he asks me problem.
First mistake is: sudo: Sorry, you must have a TTY to run sudo
So I tried to run the command sudo with ssh localhost sudo t t < command > but I get a new error (and even one): tcgetattr: Inappropriate ioctl for device
I don't know how to run as the root user is not allowed to connect.
So, launching a vCO sudo command really possible?
Thank you!
Sudo problem is quite easy to solve; "edit/etc/sudoers on the endpoint point ssh and then comment or delete the line"
Defaults requiretty". That should fix that right up. What command are you trying to run?
-
I'm new on this bear so with me
I would like to run this script to list all virtual machines and their data warehouses, but I don't know how to make it work lol... Please help thanks
$report = @() $allvms = Get-VM foreach ($vm in $allvms) { $clusterName = ($vm | Get-Cluster).Name $dstores = $vm | Get-Datastore foreach($ds in $dstores){ $row = "" | select VMNAME, DATASTORE, Cluster $row.VMNAME = $vm.name $row.DATASTORE = $ds.Name $row.Cluster = $clusterName $report += $row } } $report | Export-Csv "C:\vm_ds.csv" -NoTypeInformation
Of course, to get the information to the VMDK to a simple VM VMDK, just add
$vmdk = ($vm | get-hard drive)
$row. VMDKSIZE = ($vmdk. CapacityKB) / 1024/1024
$row. VMDKFILE = $vmdk. File name
in the loop where you're collecting information.
You probably want to get the information for all the vmdk and for that you will need to browse all the files on disc - Get-HardDisk returns an array of VMDK when there is more than one. Depending on how your output are collected, which could be interesting.
-
How to run a script php on external server
Hello!
Here's my problem: I want to run a script php on a server by calling a simple url. Here is an example of a possible url: http://servername/dir/scriptname.php?var1=a&var2=2.
The return value is a html code.
I use CVI 2012 AND 3.5!
Hello!
Thank you very much! It's the way I'll do it!
But I have to call a different get command. Here's my way: Fmt (tlsend, "%s %s", "GET" ', http://servername/dir/scriptname.php?var1=a&var2=2 ');
The next problem is the response of the InetTelnetRead. She returns with-4 "system socket error". But the result of the php-script is tlread.
So my problem is almost solved!
-
Windows XP running startup scripts displays the taskbar?
Hi all
I have a newly installed Server 2003 domain.
I have also 2 machines that I have connected to the domain. One of them works very well (goes on the internet, readers of network etc.).
The other is does not work. It connects to the domain, reboot, then I log into the admin account. After that I did a gpupdate, and then restart the system.
The problem is, when the system starts up again, it seems to start to run startup scripts, then seems to automatically connect on a called user account $ media (Media is the name of the computer).
It displays the windows desktop and begins to run explorer.exe, with this user account (MEDIA$), with the start of the Running of scripts loading screen and does not get more.
(Both the Pc running Windows XP Professional SP3)
Any fix for that?
Hello
Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the forum TechNet for assistance:
http://TechNet.Microsoft.com/en-us/WindowsServer/bb512919
Hope the helps of information.
-
How to run an application when the cell phone is power on
I want to run an application when the cell phone is power on. It runs in the background, how so, please give me a code, I don't know, thanks
It is enough to set project properties in JDE as shown on the attached photo (check below: screenshot.png).
-
How to run specific scripts of site for a virtual machine?
I need to run a script that will update the virtual machine IP to DNS server. I intend to use the dns_update.cmd.
1. can I create stimulus steps that are specific to the site?
2. don't VMware SRM SDK provides what API s to determine the name of the Site?
TIA,
Sudhir
> 1. Can I create stimulus steps that are specific to the site?
SRM provides environment variables to scripts step command that will allow you to do. See variable environment for the ordering steps in the administration guide for more information on variables.
The key variable is the variable 'VMware_VC_Host '. You can use this variable in your script to perform different actions depending on which VC you get to.
> 2. VMware SRM SDK provides APIs that s to determine the name of the Site?
Yes, I'm not sure why you would do that? Typically, you call the SRM API to a stage of order recovery plan. You can share what you intend to use these methods for?
Discover the methods "GetSiteName" and "GetPairedSite" in https://www.vmware.com/support/developer/srm-api/srm_58_api.pdf
-
How to run a Script in Vcenter Orchestrator... ?
Hi team,
I m starting to VMware Vcenter orchestrator. I installed Vcenter Orchestrator autonomous set up in my test environment to Windows server 2008 R2. I want to run a script in a client application to vcenter orchestrator.
But I was unable to run the script in Vcenter orchestrator. I m getting after that error"you are not allowed to run the local process '.
I couldn't configure vCO to allow execution of local processes & cALTER vCO to allow access to file system to the scripts folder:
To configure the VCO to allow running local process:
- Go to/app-server/server/vmo/conf
- Edit the file vmo.properties and Add (if not already done) the following line to enable
com.VMware.js.allow - local-process = true Set up VCOs to allow file system access to the scripts folder:
- Go to/app-server/server/vmo/conf
- Edit (or create if it does not exist) the file js - io - rights.conf
- Assuming that the name of a "Orchestrator" on a device folder, enter the following (set at will for windows):
But in my server I found no record of the server app-server... Please someone help me on this to solve the problem.
Kind regards
Odile M
If the file does not exist, you can create simply as described here: http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.vco_administer.doc_42%2FGUID-C9F6748A-32F9-4712-99EB-3A48BFFDF5E9.html - this is a plain text file.
-
Running a script from the command line
Hi all
First of all, I'd like to say I'm just starting ORACLE 11 g with no prior experience of the database. I currently lectures once a week. However, I am stuck with a problem. I am trying to access my database of the United of the House so I can do some work, apparently I can only access it via the command prompt (which is good for me) I began by downloading a shell www.putty.org secure and I managed to connect to my database of test of the University from my laptop at home. However, I have a createHR.sql of script file that is stored in my C:\ORACLE directory which I try to access in order to load my test tables and start practicing with them.
use command line
SQL > C:\ORACLE\createHr and I get SP2-0310: unable to connect to the file "C:\ORACLE\create HR.sql".
normally, this should load and run the script - as with the browser method guests will get the tables is created and the test data.
I am now officially frustrated that I can't get any done practice, offered any help will be welcome.
Concerning
Claude
Published by: 891128 October 12, 2011 09:33
Published by: 891128 October 12, 2011 09:41
Published by: 891128 October 12, 2011 09:44891128 wrote:
I started by downloading a shell www.putty.org secure and I managed to connect to my database of test of the University from my laptop at home.
However, I have a createHR.sql of script file that is stored in my phonebook C:\ORACLEThese two sentences above are essential. If I had to bet a directory C:\ORACLE assumption is located locally on your laptop. However, it seems you have done a SSH connection to your server and connected to the database using SQL * more customer on the server. The client on the server has no idea or access to files on your machine.
You must open the script on your laptop and copy / paste into your SQL SSH * more session or you will need to find a way to copy this script on the server, so you can run it.
I hope this helps!
Maybe you are looking for
-
How do I download firefox 22?
Help! Im trying to do homeworkk
-
How can I send faxes on HP Pavilion P7-1439?
Which modem should I use on my HP Pavilion P7-1439 windows8, so I (can send faxes? or how to send with installed hardware?)
-
Title says it all really, I tried to recover my address book (outlook express). Fails to recover backup data, that is stored on an external drive? A bit of a mess. * original title - installed win 7 when I return to vista is now applying a password.
-
Install HP 6500 Officejet E709n
I have a new printer Officejet 6500 E709n I want to install it on a couple of computers including a HP laptop with WIN7 Home Premium. It seems to be a discussion here about what version of the 6500 you the E709a or the E709n. When I go to download th
-
Media CD/DVD disc unreadable (ATAPI-iHAP222 8)
Hello - any CD or DVD I insert in the drive cannot be read. The computer says there is nothing on the disc. I have an i/o Magic 22 x DVD internal /, product id #IDVD22DLS that I bought about 2 years ago. I ran fixit from Microsoft, but it says the dr