Seek help for writing a script
Hello
I made a form (with Adobe Acrobat Reader 9 Pro), I want to improve the way to display the data entered
I did a screen capture which summarize the changes wanted.
(1) I would like to be able to select the short date and display it like this: (jj/mm/aaaa)
( 2), I tried a script, but the field in the result column is always equal to 1 when nothing were entered in C1
var a = this.getField ("result");
h.Value = 0;
var b = this.getField ("ValeurB");
var c = this.getField ("make");
a.Value = (b.value - c.value) + 1;
(3) I have always (with my fingers lol) the elapsed time between the date started and finished, it is possible to write a script?
(I've never used JavaScript before, this is my first experience)
Thanks in advance for your help.
For the calculation of the #2, you can use the custom calculation script next to the field "result":
// Custom Calculate script (function () { var b = getField("ValeurB").valueAsString; var c = getField("ValeurA").valueAsString; // Only perform the calculation if both fields have an entry if (b && c) { // Convert the string values to numbers b = +b; c = +c; // Set this field value event.value = b - c + 1; } else { event.value = 0; } })();
Tags: Acrobat
Similar Questions
-
Heys guys,
I'm practically a newb in scripts, so I count on your help to my problem in appropriate javascript.
————————————————————————————————————————————
(1) open all jpg files in a specified folder.
(2) create new doc
I use a set of actions for the next two steps, although I don't know if they can be included in a script
previous document Select 3A) > size of the image > canvas size > select all > copy > doc close without saving changes > paste into new created doc > move
previous document Select 3 b) > size of the image > canvas size > select all > copy > doc close without saving changes > paste in the new created doc > move ('change' a value different than the previous pixel)
4) Save as (variables for the filename as "01.jpg", "02.jpg" etc.)
(5) delete layer 1 & 2
Repeat 3 a) and 3 (b), so that there are not more images (until the previous doc cannot be selected)
————————————————————————————————————————————
Please, you can also refer to all of the messages that actually resemble the description of my problem. I read this thread (http://forums.adobe.com/thread/776366?tstart=0) anything that involves variables in jpg files backup, however, I can't quite what part of the code that I need for my application.
Thank you
You can try this:
combine jpg images in a folder in images in groups of two.
files with the same named are replaced without promting.
If the selected files are open they get closed without promting.
2011, use it at your own risk.
#target photoshop
Select a folder;
Var folder = Folder.selectDialog ("select folder");
If {(Folder)
Download the files;
var theFolderFiles = retrieveJPGs (Folder, []);
If more than one jpg is located in the folder;
If (theFolderFiles.length > 1) {}
change the pref;
var originalRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
jpg options;
var jpegOptions = new JPEGSaveOptions();
jpegOptions.quality = 9;
jpegOptions.embedColorProfile = true;
jpegOptions.matte = MatteType.NONE;
do the surgery;
for (var m = 0; m< thefolderfiles.length="" 2;="" m++)="">
create file;
var app.documents.add = myDocument (new UnitValue (590 "px"), new UnitValue (440, "px"), 300, 'new')
NewDocumentMode.RGB, DocumentFill.WHITE, 1, BitsPerChannelType.EIGHT, "sRGB IEC61966 - 2.1");
get the first image;
var doc1 is scaleInto (myDocument, theFolderFiles [m * 2], 290, 440);.
Doc1.translate (UnitValue (doc1.bounds [0] * (-1), 'px'), UnitValue (0, "px"));
var theName = File(theFolderFiles[m]).name.slice (0, -4);
Get the second image;
If (m * 2 + 1< thefolderfiles.length)="">
var doc2 is scaleInto (myDocument, theFolderFiles [m * 2 + 1], 290, 440);.
Doc2.translate (UnitValue (myDocument.width - doc1.bounds [3], 'px'), UnitValue (0, "px"));
theName = theName.concat ('_' + File(theFolderFiles[m_*_2_+_1]).name.slice (0, -4));
};
Save jpg as a copy:
myDocument.saveAs ((new File(theFolder+"/mont_"+theName+".jpg")), jpegOptions, true);
myDocument.close (SaveOptions.DONOTSAVECHANGES)
};
reset;
app.preferences.rulerUnits = originalRulerUnits;
Alert ('done')
}
};
scale.
function scaleInto (myPath, myDocument, theHeight, theWidth) {}
theDoc = app.open var (File (myPath));
flatten;
theDoc.flatten ();
convert to the same space as the container document.
theDoc.convertProfile ("sRGB IEC61966 - 2.1", Intent.RELATIVECOLORIMETRIC, true, true);
scale;
If (theDoc.width / theDoc.height > = theWidth / theHeight) {}
var = new UnitValue theFactor (theHeight * 100 / theDoc.height, '%');
}
else {}
var = new UnitValue theFactor (theWidth * 100 / theDoc.width, '%');
};
theDoc.resizeImage (theFactor theFactor, myDocument.resolution, ResampleMethod.BICUBICSHARPER);
theDoc.resizeCanvas (theWidth theHeight, AnchorPosition.MIDDLECENTER);
copy of the container layer.
var theLayer = theDoc.layers [0] .duplicate (myDocument, ElementPlacement.PLACEATBEGINNING);
theDoc.close (SaveOptions.DONOTSAVECHANGES);
return theLayer
};
Get subfolders.
function retrieveJPGs (Folder, uses) {}
If (! uses) {var uses = [];}
var content = theFolder.getFiles ();
for (var n = 0; n)< thecontent.length;="" n++)="">
Pourla var = content [n];
If (theObject.constructor.name == "Folder") {}
Uses = retrieveJPGs (pourla, uses)
};
If (theObject.name.slice(-4) == '.jpg' | theObject.name.slice(-4) == "". "") JPG") {}
Uses = theFiles.concat (theObject)
}
};
return of uses
};
-
I need help for an asp script, I installed
I installed a user name & password using an asp script for one of my Web page and when I put the right username and password, it uses the domain name, then the file is correct, however it puts the name of the file to the address once again. Someone has an idea? I have accumulated my brain
Hi Bufordhurley,
The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums for further assistance:
-
Help for writing an analytical application
Hi all
This is my first question, please be patient with my English, I'm Italian and do not write in a foreign language. ^_^
I have a 'simple' with a large table problem.
My table is really simple
CREATE TABLE HH24
(
ACR VARCHAR2 (50 BYTE) NOT NULL,
IDENTIFICATION NUMBER NOT NULL,
DATAORA DATE NOT NULL,
E0 NUMBER DEFAULT 0 NOT NULL,
C0 NUMBER 0 NOT NULL DEFAULT,
BY DEFAULT 0 NOT NULL NUMBER B0
)
It is large (> 50 GB) and partitioned on column DATAORA
Now I need to extract a set of well defined data
In a range of Data1 to data2 where data1 and data2 are ' dd/mm/yyyy hh24.
sum of the E0 and B0 and C0 value for each day of the time range
So, if I
Data1 = to_date (January 7, 2015 07:00 ',' dd/mm/yyyy hh24 ')
data2 = to_date (July 31, 2015 11:00 ',' dd/mm/yyyy hh24 ')
I need an aggregation where a thake every day in the range from 07-11
rank 1-> 07/01/2015 beetween 07:00 and 11:00
Row 2-> 07/02/2015 beetween 07:00 and 11:00
rank 3-> 07/03/2015 beetween 07:00 and 11:00
...
line n-> 31/07/2015 beetween 07:00 and 11:00
of course, I write a first step request to extract the sum, like this
SELECT cab, id,
SUM (c0) c0,
SUM (e0) e0,
SUM (b0) b0
FROM (SELECT hh24.acr, hh24.id,
HH24. C0 c0,
HH24. E0 e0,
HH24. B0 b0
OF hh24
WHERE hh24.acr =: nameacr
AND hh24.dataora > = data1
AND hh24.dataora < = data2)
GROUP BY cab, id
It works to gather data in an extraction of the day (00:00 to 23:59)
Can someone help me to retrieve data only in the necessary time slot?
P.S. obiouvsly problem is'n in the size of the table (or in my bad English, it's another problem)
^__^
Thank you
It won't be quick, but try something like this (note that it is not necessary for online viewing):
SELECT cab, id,
SUM (c0) c0,
SUM (e0) e0,
SUM (b0) b0
OF hh24
WHERE hh24.acr =: nameacr
AND hh24.dataora > = data1
AND hh24.dataora<=>=>
AND TO_CHAR(hh24.dataora,'HH24:MI:SS') BETWEEN TO_CHAR(data1,'HH24:MI:SS') AND TO_CHAR(data2,'HH24:MI:SS')
GROUP BY cab, id
-
Help for writing a mathematical function
Hello again,
I work on a tile game and need to understand an equation... I have a 12 x 11 grid... When I place a tile, I need to check for the existence of other tiles on the same row and column and sum their values...
I need to create an equation with the following variables: -.
Gets a number between 1 and 132: -.
divides or multiplies the number in all the possible divisions of 12 between 1 and 132
Adds or subtracts the correct amount of tiles that are either dependent on its position
(I stretched the grid and, for example, tile 66 has five tiles on each side, tile 121 a 11 to it is because it is in the lower left corner)
Hope this makes some sense to someone... I am now starting work on it, but any help would be appreciated!
Thank you
Martin
F1 will return a 2d array. the first element of array contains all members of rank and 2nd of all the members of the column.
Function f1(n:int):Array {}
var m:int = n - 1;
var row:int = Math.floor (m/12);
var col: int = %(row*12) m;
var rowA:Array = [];
var colA: Array = [];
for (var i: int = 0; i<12; i+)="">12;>
rowA.push (row * 12 + i + 1);
If (i<11)>11)>
colA.push(col+i*12+1);
}
}
return [rowA, colA];
} -
Need your help for writing query complex!
Kindly give me your suggestion to write a query for some situation...
suupose he is 10 in a circle Distributor. and also in each Distributor, there are 10 FOS under each Distributor... and to each FSO, there are also numbers retailers...
Please suggest how to write the query, there look like... (possible may through XML...
Distributor1, FOS1, rt_count, FOS2, rt_count, FOS3, rt_count
Distributor2, FOS1, rt_count, FOS2, rt_count, FOS3, rt_count
...
...
...
8751090151, 8751090147:10, 8751090148:25, 8751090149:11... .etc
Here it is the data...
date_crt dist_msisdn f os_msisdn rt_count
26 MARCH 13 7399998263 7399998263 1
26 MARCH 13 8751090151 8751090147 10
26 MARCH 13 8751090151 8751090148 25
26 MARCH 13 8751090151 8751090149 11
26 MARCH 13 8751090151 8751090151 1
26 MARCH 13 8751090151 8751090152 40
26 MARCH 13 8751090151 8751090326 11
26 MARCH 13 8751090151 8751090327 70
26 MARCH 13 8751090151 8751090328 29
26 MARCH 13 8751090151 8751090335 1
26 MARCH 13 8751090151 9577162731 8
26 MARCH 13 8751090151 9613381589 38
26 MARCH 13 8751090151 9613381790 14
26 MARCH 13 8751090151 9613381969 13
26 MARCH 13 8751090151 9613385207 42
26 MARCH 13 8751090151 9613385284 12
26 MARCH 13 8751090151 9613386523 52
26 MARCH 13 8751090151 9613389220 91
26 MARCH 13 8751090151 9613530655 1
Published by: user3558544 on 1 April 2013 05:36
Published by: user3558544 on 1 April 2013 07:09You can validate the query in the exactly the way you are runnin it and the text of the error?
The query with the name of the table that you post could look like this:
Select dist_msisdn, rtrim (xmlagg (xmlelement (e, os_msisdn |': ' | rt_count |))) ",") stopped by os_msisdn |': ' | (rt_count) .extract ('/ / text()'), ',') combinatoria_b
of LBA_ALERT
Dist_msisdn group -
Help for writing an extension for SQL Developer
Hi all
I want to write an extension for SQL using JDeveloper and Oracle Extension SDK developer and I have a few questions.
(1) is there some imports I need to sign up for the use of certain classes for SQL Developer?
(2) how can I do a new item from the context menu in the area of connections in the left?
(3) is there an example for this, because I have read a few posts of Sue and Kris Rice, but I figured out how to make the extensions only for JDeveloper.
Thanks in advance!SQL Developer Connection browser uses a different site from the JDeveloper Application browser id. The site id OK to use for a listener from context menu is "db_nav". If your listener statement would look like this:
My.listener.Class
Note that a listener can be registered on several sites (if, for example, you wanted as your listener to trigger for publishers, you can use "db_nav; Editor"for the site id.
You can post questions on the development of SQL Developer extensions on the developer forum SQL: SQL Developer this forum is monitored by the staff of SQL Developer.
-John McGinnis
SQL development teamPublished by: John Mcginnis, August 22, 2011 11:34
Published by: John Mcginnis, August 22, 2011 11:36
-
Hello
Can someone show me please how to change this code in a loop. At this point, it is only 10 but could be later if I wanted to learn the right way.
_level0. Copy1.unloadMovie ();
_level0.copy2.unloadMovie ();
_level0.copy3.unloadMovie ();
_level0.copy4.unloadMovie ();
_level0.copy5.unloadMovie ();
_level0.copy6.unloadMovie ();
_level0.copy7.unloadMovie ();
_level0.copy8.unloadMovie ();
_level0.copy9.unloadMovie ();
_level0.copy10.unloadMovie ();
I tried this, but it did not work:
xvar = 0;
While (xvar < 11)
{
Yvar = "_level0.copy" + xvaryvar.unloadMovie ();
xvar = xvar + 1;
}Thank you
Try...
for (i = 1; i<11;>11;>
_level0 ["Copy" + i] .unloadMovie ();
}
-
Need help for PL/SQL Script
If I wanted to give access to all my tables in my schema to a role, how could I do that.
Thus, rather than run a query for each table 100 times, looking for something
who would have a loop.
For each Table in my schema, give select, update and insert, but remove it from user role?
?
Thank you advance, 10 G here.BEGIN FOR v_REC IN (SELECT TABLE_NAME FROM USER_TABLES) LOOP EXECUTE IMMEDIATE 'GRANT SELECT ON ' || v_REC.TABLE_NAME || ' TO your_role_name'; END LOOP; END; /
SY.
-
Hi all
I want to write an application of cfm to manage mp3 files by editing the ASX file, which is an xml-formatted file, as below:
< version ASX = "3.0" >
< Entry >
Enya < TITLE > < /title >
"< ref href =" http://www.xxx.com/mp3/enya.mp3 "/ > "
< / Entry >
< Entry >
love < TITLE > < /title >
"< ref href =" http://www.xxx.com/mp3/love.mp3 "/ > "
< / Entry >
< / ASX >
but when I edit the ASX file and write to the server, coldfusion adds a line <? XML version = "1.0" encoding = "utf-8"? > to the header of the ASX file and Microsoft Media Player can analyze it, how can I write an ASX file or XML file without the line <? XML version = "1.0" encoding = "gb2312"? > to the header of the file?
David
Thank you very much.OK, I did it. Thank you all.
-
Hello, need help for Adobe Reader DC playing animation files that are specified in the pdf output by script Latex Beamer. My Adobe Reader DC refuse to open any format that I gave him. Thank you very much
Hey ihorl18351266,
Please note that you can open PDF files using only the CD player. Any other format will not be supported by the software.
Kind regards
Ana Maria
-
I downloaded the latest version of the DNG Converter Camera Raw version 9.1.1 for windows. However, I get error install the update saying "error opening file for writing. Also on my help menu updates is not active?
If the installation program itself fails to open and run. Download it again maybe your current download is corrupted. Also, what OS you are using and you are an administrator with permission to install.
-
Need help for calculation script
I was instructed to convert an Excel file into a fillable PDF, with formulas and calculations. Unfortunately, I'm a complete newbie to creating forms using calculations and javascript, but so far, I was able to use the built-in functions or to find examples of javascript for the formulas that I am duplicating. However, my final calculation stuck me.
Basically, I do an if / then calculation based on a field being greater or less than another. If the result is greater, the script should return a 'YES', if it is lower, it should return a 'no' the excel function is as follows:
= IF(C45>C32,"YES","NO")
Could someone help me with this script?
Here is the code for calculating customized to do this, assuming that the names of the other fields are C45 C32 and that their format is set to number:
c45 var = getField("C45").value;
c32 var = getField("C32").value;
If (c45! = "" & c32! = "") {}
If the two fields are not empty, compare them...
Event.Value = c45 > c32? "YES": "NO";
} else {}
If the fields are empty, reset this field
Event.Value = "";
}
-
Help with the Powershell script to collect logs from all domain controllers
I am writing a script to retrieve the last 5 days of application, security and log files from all domain controllers. The script runs, but fire the logs from the local server only. The variable $Computer has all of my DC so it's the fine mark. I guess it's a problem with my line ForEach-Object, but is not error. See the below script.
$log = 'application '.
$date = get-date-format MM-DD-YYYY
$now = get-date
$subtractDays = new-object System.TimeSpan 5,0,0,0,0
$then = $Now.Subtract ($subtractDays)
$Computers = get-ADDomainController-filter *.
ForEach-Object - InputObject $Computers - process {Get-EventLog - LogName $log - after $then - before $now - EntryType error | select EventID, MachineName, Message, Source, TimeGenerated |} ConvertTo-html | {Out-file $env:TEMP\Applicationlog.htm}
Invoke-Expression $env:TEMP\Applicationlog.htmThank you
Rich
Hello
To help with the repost the question script to the script Center Forum
http://social.technet.Microsoft.com/forums/scriptcenter/en-us/home
-
could not access vb run time for custom action script
I try to install an air 320u sierra wireless card and I get an error message "could not access vb run time for custom action script. Cannot install the Manager of mobile broadband services. Any ideas?Hello
I suggest you run the fixit and see if it helps:
http://support.Microsoft.com/mats/Program_Install_and_Uninstall
Also check out this link:
It will be useful.
Maybe you are looking for
-
Not charging with cell phones but computers to load adapter
Hello I have iPhone 6 more. I am having some problems. My phone will not charge with laptops, computers desktop or Mac Book. But she sees a power adapter. I tested with another official cable and also does not work. I tunes sync also does not work.
-
Qosmio X 870 - ODD address every 10 minutes
I use the Qosmio X 870 for 2 days now. What really gets angry: every 10 minutes exactly the reader makes a noise - as if he pick up a CD or set the playhead. It could be a defect or do I have the opportunity of this cut in the settings? Thanks a lot
-
Diagnostic policy service will not run despite all methods found to fix
As stated in the subject, I can't get my diagnostic to run, strategy service that prevents me to perform troubleshooting services and others. I started having problems earlier when my laptop stopped while he was starting because the wire had been dis
-
IOS - XE 4500: Crash on the ACL configuration
Hi all We have recently migrated from stand-alone to VSS on our switches C4500 with Sup 7 - E. but the switch hangs at every time we edit or modify the ACL with the below error message: % SYS-3-BADBLOCK: bad block pointer % SYS-6-MTRACE: mallocfree:
-
obpasswordchangeflag not defined during the creation of the user
HelloI have the IOM - OAM 11 GR 2 PS3 integration in my environment. I completed all the steps mentioned in https://docs.oracle.com/cd/E52734_01/oim/IDMIG/oim.htm#IDMIG4000After creating the user, when I tried to connect with the end user is not redi