set "serveroutput on ' for the current session.
I'm still new to PL/SQL and I use ' * SET SERVEROUTPUT ON SIZE 100000 "* always before I run a PL program block for dbms_output.". " I really need to know why we need to specify a size of this line & what that size will be applied to. Also, I need to know it was possible to set serveroutput enabled for the current session, rather than execute this line of code before each block of PL.I tried * "ALTER SESSION SET SERVEROUTPUT SIZE 1000000" *; " But it was not run successfully.
Thank you!
If you use SQL Developer, you do not have to issue SET serveroutput.
in the result grid, you will have a tab called DBMS output, since the first icon will be output enable DBMS. Click once to activate it and and run your code. you will get the result in the same pane.
Kind regards
Prazy
Tags: Database
Similar Questions
-
Using TKPROF tracing for an activity for the current session
Hello
I use Oracle 10 g (10.2.0.1) in Solaris 10 Server. I generated a trace file using the script below
execute sys.dbms_system.set_sql_trace_in_session(sid,serial#,TRUE);
It was difficult to find my trace file generated. Is it possible to give a name to our file of track for easy identification?
Kind regards
007Vikash Jain (trainee DBA) wrote:
Hi Srikkhanth,Use query below to find special trace file name.
SET LINESIZE 100
The argument COLUMN FORMAT A60 trace_fileSELECT s.sid,
s.Serial #, s.SchemaName,.
PA. Value | '/' || Lower (SYS_CONTEXT ('userenv', 'instance_name')) |
"_ora_" | p.SPID | '.trc' AS the trace_file argument
V $ session s,.
v$ process p,.
parameter PA v$
WHERE pa.name = 'user_dump_dest.
AND s.paddr = p.addr
AND s.audsid = SYS_CONTEXT ('USERENV', 'SESSIONID');hope this will give u exactly everything you wanted.
Kind regards
Vikash (trainee DBA)I modified this request a little further. Added the SID
SELECT s.sid,
s.Serial #, s.SchemaName,.
PA. Value | '/' || Lower (SYS_CONTEXT ('userenv', 'instance_name')) |
"_ora_" | p.SPID | '.trc' AS the trace_file argument
V $ session s,.
v$ process p,.
parameter PA v$
WHERE pa.name = 'user_dump_dest.
AND s.paddr = p.addr
and s.sid = 143
AND s.audsid = SYS_CONTEXT ('USERENV', 'SESSIONID');HTH
-
Sometimes after using the password to access an account during a given session of firefox, I want to "repeal" this ability of automatic access (i.e. require type the password again once) without having to put an end to the current session and restart firefox.
It's nice to only have to type the password once per session, there are times when after launching an action that I would let the browser unattended for a short period but to prevent others to access sensitive information on other sites if they can't my master password. Note that this is not the same thing as "locking the browser. Currently, the only way I know to force it is to kill the session and restart the browser but it's not very satisfying if I really want to stay connected (allowed) to a particular site. I hope that adding a button in the Security tab "requires the master password for the current session" would be a simple solution to implement? Thank you for your attention.
You can connect from the software security device (e.g. click Cancel in the dialog box display the passwords) to force them to return to the MP once more.
- Tools > Options > Security: passwords: "saved passwords" > "show passwords".
- Tools > Options > advanced > encryption: Certificates > safety devices: software security device: Logout button
-
The message I get is Microsoft word has not been installed for the current user. Please run set up to install the application. I reinstalled the software, but get the same message.
Hello
See the methods listed in the articles below and check.
You receive an error "Microsofthas not been installed for the current user" message when you try to start an Office 2003 program or an Office XP program for the first time http://support.Microsoft.com/kb/898512You receive a message "Microsofthas not been installed for the current user" when you start an Office XP program or start of Microsoft Office Maintenance mode http://support.Microsoft.com/kb/298022
I hope this helps.Thank you, and in what concerns:
Shekhar S - Microsoft technical support.Visit our Microsoft answers feedback Forum and let us know what you think.
If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly. -
When I opened Adode Acrobat, a grey area on the right said retrieve the State of the current session... its been like this for days now and it really slows the responsiveness of the software. How can I solve this? I paid for the Export Department in January 2014.
If this is still the case, I would recommend uninstalling and reinstalling the drive. You should not receive this message if you are logged out.
Best,
Sara
-
History shows that the current session. No history of a previous session.
Firefox 41.0.1 Windows 8.1.
Since the update to version 38 (?) 'show history' shows only the current session.
I have since uodated against 41 with no improvement, bookmarks have remained stable.
I tried: -.
Delete Places.sqlite
Re-install
SafeMode (no addons)
Disablimg AVG and defender
Wisecare and CSA DisablimgChanging privacy options:
Toggle the custom setting remember history/use
Toggle Private mode on/off
Clear history displayed/hidden powerCreated a new profile with the Profile Manager.
Checked the owner and access control of all files and folders in the profile, all full access and read only =.
Installed the "Housekeeping" module and run it.
Can anyone suggest any other delicious dishes, or is this a bug of FF running under Win 8.1?
It creaks! Finally! I think so. I did a positive negative control.
After a lot of installation and reinstallation of FF. (Why the standard uninstall leaves as many orphaned files program / files / registry entries?) When I decide the uninstall, everything must be removed!)
Finally, I uninstalled the newer version of the CSA. Even if all the options for the 'cleaning' and 'monitoring' Firefox were off, it seems that it was ups that prevented the record of history. Once that was removed and then history began to be recorded. She did not used to happen. I used the previous versions for many years without problem, but it seems that one of the recent updates (version unknown) started blocking the history of FF.
(For obvious reasons, I have re - install CSA just to prove the point.)
PS at the moment, I'm also stay with the version of FF 39 -
How to find the number of bind variables declared in the current session
Hi all
I want to know a query to find out the number of variables declared in the current session.Note that the name of this forum is "SQL Developer *(Not for general SQL/PLSQL questions) * ', as well as for the issues with the SQL Developer tool. Please post these questions under the dedicated [SQL and PL/SQL | https://forums.oracle.com/forums/forum.jspa?forumID=75] forum (you have posted here before).
Kind regards
K. -
For the other sessions to find the NLS parameters.
Hi all
Database server Environment Details: 2 Node Oracle 10.2.0.4 RAC on Solaris Operating System
Parameter in Spfile: nls_sort = BINARY_CI nls_comp = LINGUISTIC nls_language = AMERICAN
Parameters in database: SQL> select * from nls_database_parameters; PARAMETER VALUE ------------------------------ ------------------------------------------------------------ NLS_LANGUAGE AMERICAN NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CHARACTERSET AL32UTF8 NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE AMERICAN NLS_SORT BINARY NLS_TIME_FORMAT HH.MI.SSXFF AM NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR NLS_DUAL_CURRENCY $ NLS_COMP BINARY NLS_LENGTH_SEMANTICS BYTE NLS_NCHAR_CONV_EXCP FALSE NLS_RDBMS_VERSION 10.2.0.4.0 20 rows selected.
Now, each index on columns of type of data characters in this database are created as function of the Index of base to support Case Insensitive search using nls_sort to BINARY_CI, as shown below.Parameters at client's environment variable(Its Application sever on Windows): Oracle Client 10.2.0.4 nls_sort = BINARY_CI nls_comp = LINGUISTIC
What worries me started when I created by mistake an index btree normal on a character column. After this error just by curiosity, I enabled index followed up on this clue, when I checked in v$ object_usage it got USED!CREATE UNIQUE INDEX UX_NAME_BR ON ONS (NLSSORT("NAME",'nls_sort=''BINARY_CI'''),"TYPE_ID", "UNIT_NUMBER", "DOMICILE", "IS_ACTIVE", "ID")
So I strongly suspect that there are a few sessions connected to this database with different values of NLS instead of nls_sort = BINARY and nls_comp = LINGUISTIC...
Sort of, I did a little test in production to confirm this, as shown below:
IDX_COD index is a regular btree index...PARAMETER VALUE -------------------------------------------------- ------------------------------------------------------------ NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE AMERICAN NLS_SORT BINARY NLS_TIME_FORMAT HH.MI.SSXFF AM NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR NLS_DUAL_CURRENCY $ NLS_COMP BINARY NLS_LENGTH_SEMANTICS CHAR NLS_NCHAR_CONV_EXCP FALSE 17 rows selected. SQL> set autotrace traceonly exp SQL> select id,is_active from ons where domicile = 'US' and id = 440 and name = 'AMERICAN COMPANY'; Execution Plan ---------------------------------------------------------- Plan hash value: 1171456783 --------------------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | --------------------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 49 | 4 (0)| 00:00:01 | | | | 1 | PARTITION RANGE ALL | | 1 | 49 | 4 (0)| 00:00:01 | 1 | 3 | |* 2 | TABLE ACCESS BY LOCAL INDEX ROWID| ONS | 1 | 49 | 4 (0)| 00:00:01 | 1 | 3 | |* 3 | INDEX RANGE SCAN | IDX_COD | 1 | | 4 (0)| 00:00:01 | 1 | 3 | --------------------------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - filter("ID"=440) 3 - access("DOMICILE"='US' AND "NAME"='AMERICAN COMPANY') SQL> alter session set nls_sort=BINARY_CI; Session altered. SQL> alter session set nls_comp=LINGUISTIC; Session altered. SQL> select * from nls_session_parameters; PARAMETER VALUE -------------------------------------------------- ------------------------------------------------------------ NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE AMERICAN NLS_SORT BINARY_CI NLS_TIME_FORMAT HH.MI.SSXFF AM NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR NLS_DUAL_CURRENCY $ NLS_COMP LINGUISTIC NLS_LENGTH_SEMANTICS CHAR NLS_NCHAR_CONV_EXCP FALSE 17 rows selected. SQL> select id,is_active from ons where domicile = 'US' and id = 440 and name = 'AMERICAN COMPANY'; Execution Plan ---------------------------------------------------------- Plan hash value: 270874147 ------------------------------------------------------------------------------------------------------------------------------ | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | ------------------------------------------------------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 1 | 49 | 2 (0)| 00:00:01 | | | | 1 | TABLE ACCESS BY GLOBAL INDEX ROWID| ONS | 1 | 49 | 2 (0)| 00:00:01 | ROWID | ROWID | |* 2 | INDEX RANGE SCAN | UX_NAME_BR | 1 | | 2 (0)| 00:00:01 | | | ------------------------------------------------------------------------------------------------------------------------------ Predicate Information (identified by operation id): --------------------------------------------------- 2 - access(NLSSORT("NAME",'nls_sort=''BINARY_CI''')=HEXTORAW('669696E6720636F6D70 616E7900') AND "ID"=440) filter("ID"=440 AND NLSSORT(INTERNAL_FUNCTION("DOMICILE"),'nls_sort=''BINARY_CI ''')=HEXTORAW('7588700') )
So, how can I find which sessions have access to these indexes and find the session parameters nls level connected to this database.
I know there is no way to find settings nls for the other sessions without tracing it...
Kickbacks will not work me
NLS_DATABASE_PARAMETERS
NLS_SESSION_PARAMETERS
Could someone help me please to find these sessions these sessions that are not level session as BINARY_CI and LANGUAGE settingsTrigger may fail if the storage space for the trace table is full. This trigger does not use dynamic SQL code: in this perspective, it is a bit more secure.
I don't know any other way supported to retrieve another session NLS parameters. But he can there have no documented similar to this one http://dioncho.wordpress.com/2009/07/18/spying-on-the-other-session/.
-
Find time for the current connection
Hello
in my sql script I want to question and to discover the time of opening of the current session.
If I connect to the gv$ session table, I have to pass other variables as current SID, INST_ID select... to identify the record in the current session
and then extract the logon time value
Instead, I'm looking for a lot more simple function as SYS_CONTEXT
Thank you
Srinivas - Yelamanchiliin my sql script I want to question and to discover the time of opening of the current session.
What is
SQL>select sid, to_char(logon_time, 'dd.mm.yyyy hh24:mi:ss') logon_time from v$session where audsid = sys_context('userenv','sessionid') / SID LOGON_TIME ---------- ------------------- 149 22.10.2009 22:32:06 SQL>
-
where the requirements for the current download? This used to be posted prominently.
where the requirements for the current download? This used to be posted prominently.
See:
You can find the full version of the latest version of Firefox 24.0 in all languages and for all systems operating here:
-
How to set different color for the table column header
Can I set different colors for the 4 following as being attached.
-color of the header text
-the head of the column of the background color
-color of the text of the content
-color of background content
The value of the cluster - 2, -2 to define all of the cells,
Then go back and the cluster the value-1, -2 to simply set the line header.
(If you also had a column of row headers, then -2,-1 would set them. Course the upper left corner which is the intersection of the column header and row header will change with any of them.)
-
Start stuck on "Please wait for the Local Session Manager."
I would say that this problem started a couple of days. Went to start my laptop (Toshiba) and he sat on the "Please wait" message forever.
Had no problems to start in safe mode. Looked up various ways of addressing the problem.
Was able to change the resume date and back a few weeks ago. Still no luck. Happened to read something on a printer Epson being perhaps the problem driver (it was installed a day before the date of restoration chosen). Uninstalled the drivers, computer still does not start.
Tried restarting running. I do not have the CD it came with Vista, but it was an option when you hold F8 during startup (I think?) Couldn't find any problems.
Ran check on memory. No problem either.
Changed settings for a verbose startup and ran a Diagnostic startup - all good for this. Then tried selective startup load system services... This is when the error occurs. When starting, it hangs on "Please wait for the Local Session Manager" and does nothing more.
I looked in the event viewer to see what came that time and a couple mistakes were:
Event ID 6000:
winlogon notification subscriber was unavailable to handle a notification event. Event ID 7026: the next (s) start or start failed to load system
spldr
Wanarpv6It would be very useful for me not having to run my computer in safe mode automatically all the time, although it is useful that I at least have that option. Any help is greatly appreciated.
Hello
1. by chance your computer is connected to a domain environment?
2. as you mentioned in your article that you tried the selective startup, I want to confirm if you have disabled the services left 3rd after hide Microsoft services?
If you did not disable these services make sure you disable and then check if it works.
See the article below for more information.
How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
http://support.Microsoft.com/kb/929135
Note: When the diagnosis is complete, don't forget to reset your computer to normal startup. Follow step 7 in the above article.I hope this helps.
Thank you, and in what concerns:
Shekhar S - Microsoft technical support.Visit our Microsoft answers feedback Forum and let us know what you think.
If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly. -
How to get the last date of 3 days for the current month?
Hello. Guy
How to get the last date of 3 days for the current month?
MY OUTPUT WOULD LOOK LIKE THIS
JANUARY 29, 2016
JANUARY 30, 2016
JANUARY 31, 2016
GUYS HELP ME / / /...
SQL > select last_day (sysdate) - level + 1 double connect by level<= 3="" order="" by="">=>
LAST_DAY)
---------
29 JANUARY 16
30 JANUARY 16
31 JANUARY 16
-
I have windows 8 in my computer toshiba laptop. After you set up windows for the updates it says «restoration of the changes...» Impossible to install the important updates'... What do I do?
Hello
Please, try the suggestions mentioned here and see if they help you:
http://www.thewindowsclub.com/failure-configuring-Windows-updates
Hope this helps, good luck :)
-
use Image catalog script for the current document
Is it possible to use the script to image catalogue for the current document in which we work instead of leaving the mark of script a new document fees for placed images?
use,
//ImageCatalog.jsx //An InDesign CS6 JavaScript /* @@@BUILDINFO@@@ "ImageCatalog.jsx" 3.0.0 15 December 2009 */ //Creates an image catalog from the graphic files in a selected folder. //Each file can be labeled with the file name, and the labels are placed on //a separate layer and formatted using a paragraph style ("label") you can //modify to change the appearance of the labels. // //For more information on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html //Or visit the InDesign Scripting User to User forum at http://www.adobeforums.com . // //The myExtensions array contains the extensions of the graphic file types you want //to include in the catalog. You can remove extensions from or add extensions to this list. //myExtensions is a global. Mac OS users should also look at the file types in the myFileFilter function. main(); function main(){ var myFilteredFiles; //Make certain that user interaction (display of dialogs, etc.) is turned on. app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll; myExtensions = [".jpg", ".jpeg", ".eps", ".ps", ".pdf", ".tif", ".tiff", ".gif", ".psd", ".ai"] //Display the folder browser. var myFolder = Folder.selectDialog("Select the folder containing the images", ""); //Get the path to the folder containing the files you want to place. if(myFolder != null){ if(File.fs == "Macintosh"){ myFilteredFiles = myMacOSFileFilter(myFolder); } else{ myFilteredFiles = myWinOSFileFilter(myFolder); } if(myFilteredFiles.length != 0){ myDisplayDialog(myFilteredFiles, myFolder); alert("Done!"); } } } //Windows version of the file filter. function myWinOSFileFilter(myFolder){ var myFiles = new Array; var myFilteredFiles = new Array; for(myExtensionCounter = 0; myExtensionCounter < myExtensions.length; myExtensionCounter++){ myExtension = myExtensions[myExtensionCounter]; myFiles = myFolder.getFiles("*"+ myExtension); if(myFiles.length != 0){ for(var myFileCounter = 0; myFileCounter < myFiles.length; myFileCounter++){ myFilteredFiles.push(myFiles[myFileCounter]); } } } return myFilteredFiles; } function myMacOSFileFilter(myFolder){ var myFilteredFiles = myFolder.getFiles(myFileFilter); return myFilteredFiles; } //Mac OS version of file filter //Have to provide a separate version because not all Mac OS users use file extensions //and/or file extensions are sometimes hidden by the Finder. function myFileFilter(myFile){ var myFileType = myFile.type; switch (myFileType){ case "JPEG": case "EPSF": case "PICT": case "TIFF": case "8BPS": case "GIFf": case "PDF ": return true; break; default: for(var myCounter = 0; myCounter
-1){ return true; break; } } } return false; } function myDisplayDialog(myFiles, myFolder){ var myLabelWidth = 112; var myStyleNames = myGetParagraphStyleNames(app); var myLayerNames = ["Layer 1", "Labels"]; var myDialog = app.dialogs.add({name:"Image Catalog"}); with(myDialog.dialogColumns.add()){ with(dialogRows.add()){ staticTexts.add({staticLabel:"Information:"}); } with(borderPanels.add()){ with(dialogColumns.add()){ with(dialogRows.add()){ staticTexts.add({staticLabel:"Source Folder:", minWidth:myLabelWidth}); staticTexts.add({staticLabel:myFolder.path + "/" + myFolder.name}); } with(dialogRows.add()){ staticTexts.add({staticLabel:"Number of Images:", minWidth:myLabelWidth}); staticTexts.add({staticLabel:myFiles.length + ""}); } } } with(dialogRows.add()){ staticTexts.add({staticLabel:"Options:"}); } with(borderPanels.add()){ with(dialogColumns.add()){ with(dialogRows.add()){ staticTexts.add({staticLabel:"Number of Rows:", minWidth:myLabelWidth}); var myNumberOfRowsField = integerEditboxes.add({editValue:3}); } with(dialogRows.add()){ staticTexts.add({staticLabel:"Number of Columns:", minWidth:myLabelWidth}); var myNumberOfColumnsField = integerEditboxes.add({editValue:3}); } with(dialogRows.add()){ staticTexts.add({staticLabel:"Horizontal Offset:", minWidth:myLabelWidth}); var myHorizontalOffsetField = measurementEditboxes.add({editValue:12, editUnits:MeasurementUnits.points}); } with(dialogRows.add()){ staticTexts.add({staticLabel:"Vertical Offset:", minWidth:myLabelWidth}); var myVerticalOffsetField = measurementEditboxes.add({editValue:24, editUnits:MeasurementUnits.points}); } with (dialogRows.add()){ with(dialogColumns.add()){ staticTexts.add({staticLabel:"Fitting:", minWidth:myLabelWidth}); } with(dialogColumns.add()){ var myFitProportionalCheckbox = checkboxControls.add({staticLabel:"Proportional", checkedState:true}); var myFitCenterContentCheckbox = checkboxControls.add({staticLabel:"Center Content", checkedState:true}); var myFitFrameToContentCheckbox = checkboxControls.add({staticLabel:"Frame to Content", checkedState:true}); } } with(dialogRows.add()){ var myRemoveEmptyFramesCheckbox = checkboxControls.add({staticLabel:"Remove Empty Frames:", checkedState:true}); } } } with(dialogRows.add()){ staticTexts.add({staticLabel:""}); } var myLabelsGroup = enablingGroups.add({staticLabel:"Labels", checkedState:true}); with (myLabelsGroup){ with(dialogColumns.add()){ //Label type with(dialogRows.add()){ with(dialogColumns.add()){ staticTexts.add({staticLabel:"Label Type:", minWidth:myLabelWidth}); } with(dialogColumns.add()){ var myLabelTypeDropdown = dropdowns.add({stringList:["File name", "File path", "XMP description", "XMP author"], selectedIndex:0}); } } //Text frame height with(dialogRows.add()){ with(dialogColumns.add()){ staticTexts.add({staticLabel:"Label Height:", minWidth:myLabelWidth}); } with(dialogColumns.add()){ var myLabelHeightField = measurementEditboxes.add({editValue:24, editUnits:MeasurementUnits.points}); } } //Text frame offset with(dialogRows.add()){ with(dialogColumns.add()){ staticTexts.add({staticLabel:"Label Offset:", minWidth:myLabelWidth}); } with(dialogColumns.add()){ var myLabelOffsetField = measurementEditboxes.add({editValue:0, editUnits:MeasurementUnits.points}); } } //Style to apply with(dialogRows.add()){ with(dialogColumns.add()){ staticTexts.add({staticLabel:"Label Style:", minWidth:myLabelWidth}); } with(dialogColumns.add()){ var myLabelStyleDropdown = dropdowns.add({stringList:myStyleNames, selectedIndex:0}); } } //Layer with(dialogRows.add()){ with(dialogColumns.add()){ staticTexts.add({staticLabel:"Layer:", minWidth:myLabelWidth}); } with(dialogColumns.add()){ var myLayerDropdown = dropdowns.add({stringList:myLayerNames, selectedIndex:0}); } } } } var myResult = myDialog.show(); if(myResult == true){ var myNumberOfRows = myNumberOfRowsField.editValue; var myNumberOfColumns = myNumberOfColumnsField.editValue; var myRemoveEmptyFrames = myRemoveEmptyFramesCheckbox.checkedState; var myFitProportional = myFitProportionalCheckbox.checkedState; var myFitCenterContent = myFitCenterContentCheckbox.checkedState; var myFitFrameToContent = myFitFrameToContentCheckbox.checkedState; var myHorizontalOffset = myHorizontalOffsetField.editValue; var myVerticalOffset = myVerticalOffsetField.editValue; var myMakeLabels = myLabelsGroup.checkedState; var myLabelType = myLabelTypeDropdown.selectedIndex; var myLabelHeight = myLabelHeightField.editValue; var myLabelOffset = myLabelOffsetField.editValue; var myLabelStyle = myStyleNames[myLabelStyleDropdown.selectedIndex]; var myLayerName = myLayerNames[myLayerDropdown.selectedIndex]; myDialog.destroy(); myMakeImageCatalog(myFiles, myNumberOfRows, myNumberOfColumns, myRemoveEmptyFrames, myFitProportional, myFitCenterContent, myFitFrameToContent, myHorizontalOffset, myVerticalOffset, myMakeLabels, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle, myLayerName); } else{ myDialog.destroy(); } } } function myGetParagraphStyleNames(myDocument){ var myStyleNames = new Array; var myAddLabelStyle = true; for(var myCounter = 0; myCounter < myDocument.paragraphStyles.length; myCounter++){ myStyleNames.push(myDocument.paragraphStyles.item(myCounter).name); if (myDocument.paragraphStyles.item(myCounter).name == "Labels"){ myAddLabelStyle = false; } } if(myAddLabelStyle == true){ myStyleNames.push("Labels"); } return myStyleNames; } function myMakeImageCatalog(myFiles, myNumberOfRows, myNumberOfColumns, myRemoveEmptyFrames, myFitProportional, myFitCenterContent, myFitFrameToContent, myHorizontalOffset, myVerticalOffset, myMakeLabels, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle, myLayerName){ var myPage, myFile, myCounter, myX1, myY1, myX2, myY2, myRectangle, myLabelStyle, myLabelLayer; var myParagraphStyle, myError; var myFramesPerPage = myNumberOfRows * myNumberOfColumns; var myDocument = app.activeDocument; myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points; myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points; var myDocumentPreferences = myDocument.documentPreferences; var myNumberOfFrames = myFiles.length; var myNumberOfPages = Math.round(myNumberOfFrames / myFramesPerPage); if ((myNumberOfPages * myFramesPerPage) < myNumberOfFrames){ myNumberOfPages++; } //If myMakeLabels is true, then add the label style and layer if they do not already exist. if(myMakeLabels == true){ try{ myLabelLayer = myDocument.layers.item(myLayerName); //if the layer does not exist, trying to get the layer name will cause an error. myLabelLayer.name; } catch (myError){ myLabelLayer = myDocument.layers.add({name:myLayerName}); } //If the paragraph style does not exist, create it. try{ myParagraphStyle = myDocument.paragraphStyles.item(myLabelStyle); myParagraphStyle.name; } catch(myError){ myDocument.paragraphStyles.add({name:myLabelStyle}); } } myDocumentPreferences.pagesPerDocument = myNumberOfPages; myDocumentPreferences.facingPages = false; var myPage = myDocument.pages.item(0); var myMarginPreferences = myPage.marginPreferences; var myLeftMargin = myMarginPreferences.left; var myTopMargin = myMarginPreferences.top; var myRightMargin = myMarginPreferences.right; var myBottomMargin = myMarginPreferences.bottom; var myLiveWidth = (myDocumentPreferences.pageWidth - (myLeftMargin + myRightMargin)) + myHorizontalOffset var myLiveHeight = myDocumentPreferences.pageHeight - (myTopMargin + myBottomMargin) var myColumnWidth = myLiveWidth / myNumberOfColumns var myFrameWidth = myColumnWidth - myHorizontalOffset var myRowHeight = (myLiveHeight / myNumberOfRows) var myFrameHeight = myRowHeight - myVerticalOffset var myPages = myDocument.pages; // Construct the frames in reverse order. Don't laugh--this will // save us time later (when we place the graphics). for (myCounter = myDocument.pages.length-1; myCounter >= 0; myCounter--){ myPage = myPages.item(myCounter); for (var myRowCounter = myNumberOfRows; myRowCounter >= 1; myRowCounter--){ myY1 = myTopMargin + (myRowHeight * (myRowCounter-1)); myY2 = myY1 + myFrameHeight; for (var myColumnCounter = myNumberOfColumns; myColumnCounter >= 1; myColumnCounter--){ myX1 = myLeftMargin + (myColumnWidth * (myColumnCounter-1)); myX2 = myX1 + myFrameWidth; myRectangle = myPage.rectangles.add(myDocument.layers.item(-1), undefined, undefined, {geometricBounds:[myY1, myX1, myY2, myX2], strokeWeight:0, strokeColor:myDocument.swatches.item("None")}); } } } // Because we constructed the frames in reverse order, rectangle 1 // is the first rectangle on page 1, so we can simply iterate through // the rectangles, placing a file in each one in turn. myFiles = myFolder.Files; for (myCounter = 0; myCounter < myNumberOfFrames; myCounter++){ myFile = myFiles[myCounter]; myRectangle = myDocument.rectangles.item(myCounter); myRectangle.place(File(myFile)); myRectangle.label = myFile.fsName.toString(); //Apply fitting options as specified. if(myFitProportional){ myRectangle.fit(FitOptions.proportionally); } if(myFitCenterContent){ myRectangle.fit(FitOptions.centerContent); } if(myFitFrameToContent){ myRectangle.fit(FitOptions.frameToContent); } //Add the label, if necessary. if(myMakeLabels == true){ myAddLabel(myRectangle, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle, myLayerName); } } if (myRemoveEmptyFrames == 1){ for (var myCounter = myDocument.rectangles.length-1; myCounter >= 0;myCounter--){ if (myDocument.rectangles.item(myCounter).contentType == ContentType.unassigned){ myDocument.rectangles.item(myCounter).remove(); } else{ //As soon as you encounter a rectangle with content, exit the loop. break; } } } } //Function that adds the label. function myAddLabel(myFrame, myLabelType, myLabelHeight, myLabelOffset, myLabelStyleName, myLayerName){ var myDocument = app.documents.item(0); var myLabel; var myLabelStyle = myDocument.paragraphStyles.item(myLabelStyleName); var myLabelLayer = myDocument.layers.item(myLayerName); var myLink =myFrame.graphics.item(0).itemLink; //Label type defines the text that goes in the label. switch(myLabelType){ //File name case 0: myLabel = myLink.name; break; //File path case 1: myLabel = myLink.filePath; break; //XMP description case 2: try{ myLabel = myLink.linkXmp.description; if(myLabel.replace(/^\s*$/gi, "")==""){ throw myError; } } catch(myError){ myLabel = "No description available."; } break; //XMP author case 3: try{ myLabel = myLink.linkXmp.author if(myLabel.replace(/^\s*$/gi, "")==""){ throw myError; } } catch(myError){ myLabel = "No author available."; } break; } var myX1 = myFrame.geometricBounds[1]; var myY1 = myFrame.geometricBounds[2] + myLabelOffset; var myX2 = myFrame.geometricBounds[3]; var myY2 = myY1 + myLabelHeight; var myTextFrame = myFrame.parent.textFrames.add(myLabelLayer, undefined, undefined,{geometricBounds:[myY1, myX1, myY2, myX2], contents:myLabel}); myTextFrame.textFramePreferences.firstBaselineOffset = FirstBaseline.leadingOffset; myTextFrame.parentStory.texts.item(0).appliedParagraphStyle = myLabelStyle; }
Maybe you are looking for
-
Hello guys,. I tried to download the software from the site assessment of IMAQ Vision Devolopement software of NOR. But I could not. I mean, when I download the EXE file and try to install it, he said that the download failed, please try again. Pleas
-
Pedal for windows media player
Hello. Please can you tell me if I can buy a pedal that will work in windows media player or Cyberlink. I'm working on the Vista operating system. Thank you.
-
I am runing vista, how do I fax on
I am runing vista, how do I fax on
-
problema, el juego virtual tenis, 4 of sega.
I have a game are, virtual tennis, Sega, y no puedo habrirlo completo... Al hacer doble click... me aaprese una acceso ventanilla, then click in the lower part para entarar al juego,... sell me una ventanilla of error... the aparese configurada como
-
Windows Defender expires when you try running under windows 7 64-bit
My environment is as follows: Win7 64 bit running on a generation of Corsair Microsoft Security Essentials. Windows Firewall is also running I see Windows Defender not upward, so I click on: "click here to turn on." This operation returned because th