The script that creates the default tabs in the margin of the document.

I need a script that creates marks (1 cm margins: top, left, right, down and two others in the Center, a vertical and a horizontal) independent of the document size. Would look like this: whenever I create a new document, execute an action which rodadoria the script to create a document with the enclosed area, similar to the figure below: thank you!

http://zip.NET/brsW9j

#target photoshop;
if(documents.length) main();

function main(){
var strtRulerUnits = app.preferences.rulerUnits;
var strtTypeUnits = app.preferences.typeUnits;
app.preferences.rulerUnits = Units.PIXELS;
app.preferences.typeUnits = TypeUnits.PIXELS;
var cm = activeDocument.resolution/2.54;
var W =activeDocument.width;
var H =activeDocument.height;
guideLine(cm,"Vrtc");
guideLine(cm,"Hrzn");
guideLine(W-cm,"Vrtc");
guideLine(H-cm,"Hrzn");
guideLine(W/2,"Vrtc");
guideLine(H/2,"Hrzn");
app.preferences.rulerUnits = strtRulerUnits;
app.preferences.typeUnits = strtTypeUnits;
}
function guideLine(position, type){
    var desc27 = new ActionDescriptor();
        var desc28 = new ActionDescriptor();
        desc28.putUnitDouble( app.charIDToTypeID('Pstn'), app.charIDToTypeID('#Pxl'), position );
        desc28.putEnumerated( app.charIDToTypeID('Ornt'), app.charIDToTypeID('Ornt'), app.charIDToTypeID(type) );
    desc27.putObject( app.charIDToTypeID('Nw  '), app.charIDToTypeID('Gd  '), desc28 );
    executeAction( app.charIDToTypeID('Mk  '), desc27, DialogModes.NO );
};

Tags: Photoshop

Similar Questions

  • view script that creates a view of another user

    How can I see the script for a view?

    Thank you

    From sqlplus do following:
    set pages 0
    the value of 10000 long
    Select dbms_metadata.get_ddl ('SEE', 'Nom_de_vue') of double;

  • Using scripts to create expressions?

    I am trying to automate the creation of a bunch of expressions rather involved.  Is - this it is possible to write a script that creates an expression?  For example, can I write a script that sets the position of a layer to "wiggle (5,10)? 

    And conversely, a script can access the source code of an existing expression?  If I look at the value of a layer that has a wiggle function, I just get the wiggle, not the actual code value generating these random values.

    To set an expression:

    myLayer.property("Position").expression = "wiggle (5,10);

    To retrieve an expression

    var myExpr = myLayer.property("Position").expression;

    Dan

  • How to create a default domain and deploy the app in jdeveloper using a script or code (not manually)

    Hello

    I installed Jdev using silent installation.

    Now I have some apps already created I want to create a default domain, and then to deploy apps in it through any script or ants?

    Can someone help me on this?

    Thank you and best regards,

    Vivek Pemawat

    Hi This worked for me I checked the log of the jdev, how he creates the domain and then using that I created the field

    I used the python script for deploying applications:

    Connect ('weblogic', 'welcome1 ','slc01fnw:7103 ')

    deploy (appName = ' Application13 ', path='/home/rasubra/jdeveloper/mywork/Application13/deploy/Application13_Project1_Application13.ear' target = 'DefaultServer')

    Exit()

    called using wlst.sh TestAppsDeploy.py

    Thanks for all the help!

  • I created a Javascript script that adds a watermark on the document action "paper print".  This works in Acrobat Pro, but does not work in the drive.

    I created a Javascript script that adds a watermark on the document action "paper print".  This works in Acrobat Pro, but does not work in the drive.  I am a novice using Javascript, so what am I doing wrong?

    Cannot use either addWatermarkFromFile or addWatermarkFromText methods of document with player as shown in the documentation. You can hide/display the form fields and the existing layers, so consider this approach.

  • How to create a default profile for all users of a computer under Windows 7/Vista for Firefox versions greater than 8? I would that all new users on a computer to get the same values by default, homepage, bookmarks, etc...

    I found some help on older versions of Firefox, but I can't seem to find anything for the latest versions greater than 8. There must be a way to do this for imaging large scale.

    Have you created a defaults\profile in the folder of the program Firefox (C:\Program Files\Mozilla Firefox\)?

    All files in this folder will be moved into each newly created profile folder.

    To give the prefs a default, it is best to do this via a mozilla.cfg file.

    Use a mozilla.cfg file in the Firefox program folder to lock the prefs or specify default values.

    Place a local file - settings.js in the defaults\pref folder where you will also find the channel - prefs.js to specify using mozilla.cfg file.

    pref("general.config.filename", "mozilla.cfg");
    pref("general.config.obscure_value", 0); // use this to disable the byte-shift
    

    See:

    You can use these functions in mozilla.cfg:

    defaultPref();  // set new default value
    pref();         // set pref, but allow changes in current session
    lockPref();     // lock pref, disallow changes
    
  • Double click on the arrow to the left on the tab bar creates a new tab at the end of the right hand.

    With Firefox 29.0.1 by double clicking on the arrows on the right in the tab bar or the left creates a new tab at the end of the right hand of the tab bar. It is embarrassing behavior that violates standards around UI design click and double-click. A double-click should extend the behavior of the single click rather than do something completely different (opening a new tab). An example would be, in a Word, a single click selects a Word, double click selects the sentence and a triple click selects the paragraph. Note that this is a separate issue from double click the tab bar itself to create a new tab.

    When there are more tabs on the tabs in the window toolbar, that highlight the tabs on the side will not hold show tab in use. I can click on the left and right arrows at the end of the tab bar to scroll the bar in this sense to bring a tab I want to select in the display. I believe that the double click on the arrow to the left would scroll the bar completely to the right, exposing the tab on the left Double click on the right arrow would scroll the bar left entirely exposing the rightmost tab.

    It is a logical extension and expected behavior of single click. Single click - scroll once (seems to be the value of the tab in three), double-click on - scroll all the way.

    For now, if I want to access the tab on the left, I have to click the arrow slowly and carefully until I get to it. I used only one quick click on the arrow to the left until that shponkah stop scrolling without having to count how many clicks. It is possible that my simple quick clicks were actually double-click. However, the bar tabs would stop scrolling when it reaches the end.

    Now, the behavior is really annoying and unexpected. Double click on left dead entirely right tabs completely left arrow and creates a new tab at the end of the right hand. Ditto the arrow right in the opposite direction.

    While I can (maybe) see that the value of a double click on the tab bar itself to create a new tab, double click on one of the scroll arrows should show a new tab.

    Double click on the arrows of the tab should scroll the tab fully for this purpose bar. If the tab bar is already entirely Scrolls towards ending extra clicks (single, double and triple...) should be ignored.

    I like the idea of opening a new tab to the right of the one that has the focus. This should be an option of the contextual right click menu.

    That should not occur if you click the scroll buttons in the tab bar.
    A double-click should act as page up/down and move a full screen and a triple click should move to the left (first tab) or the right (last) until now tab.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe
  • Invoking the browser opens the default tab

    Hi guys,.

    I am writing an application that calls the browser and sends a URL to open for the user. This works perfectly on OS 4.6 to 5.0. However, the OS 6 and 7 the browser is still open with two tabs; We understand the URL I'm trying to open, and the other is the default page of the BlackBerry browser. In addition, the tab with the browser blackberry detaulf page is to the point and my users almost always miss to see that there is another tab open on their browser.

    Has anyone seen this behavior before? If Yes, do you know how I can fix this problem?

    Hello anawara,

    I'm working from memory here, but I believe that the call to b.displayPage (url) displays the browser to your URL, and then b.showBrowser () starts the 2nd tab. If you remove the call to b.showBrowser () on 6.0 +, I believe that the second tab will not be created and only your URL will be displayed.

    I'll check this in a sample, but I remember this coming upwards before and I'm pretty sure that's where the problem comes.

    Erik Oros

    BlackBerry Development Advisor

  • How and where to use Java script to create a new button in the page of detail of the object

    Hi all

    I want to create "New/Add button" in the page of detail of the object. If I'm not mistaken I need to use the java script for this, but could you please let me know how and where to use Java script to create a new button in the page of detail of the CRMOD object.

    Thanks in advance.

    Kind regards
    Manish

    Any related object on the details of the page should have an 'Add' or 'New' or the two default buttons - it of a vanilla feature and will do the required action.

    If you want to change this behavior and do something delicate you will potentially have to to go for javascript. You must add the javascript code in a web custom tab on this object.

    Admin--> Application Customization--> Contact--> Applet Web Contact

    Now add your javascript in the code box, after selecting the type = HTML for this web applet, expose this web applet on the Contact details page layout and your javascript will be called every time this page is loaded.

    Check this document online to see how javascript can be integrated into the CRM on demand http://helponmyproject.com/TTOCOD/

    See you soon!
    Royston

  • WLST Script to create the field of OSB with Oracle XE

    I installed oracle Service bus 10.3 with Oracle XE on a CentOS linux distribution. Everything went well. I created a default domain with the Wizard (so with Pointbase). Now, I want to go a little further. So I want to automatically create a domain OSB for Oracle XE. I used the following script (I borrowed from another thread ;-))):

    -----
    import sys

    Print "@ from the script...» »

    Try:
    domaintarget = "/ apps/bea/user_projects/domains/test2.
    domainUser = "weblogic.
    wl_home='/apps/BEA/wlserver_10.3'
    workshop_home='/apps/BEA/workshop_10.3'
    osb_home='/apps/BEA/osb_10.3'


    def configOraDB (dataSource):
    CD (DataSource)
    URL = "jdbc:oracle:thin:@localhost:1521:XE".
    Set ('URL', URL)
    Set('DriverName','oracle.) JDBC. OracleDriver')
    cmo.setPasswordEncrypted (domainUser)
    CD (' Properties/NO_NAME_0/Property/user')
    Set ('Value', domainUser)
    CD ('. /.. /.. /.. /.. /.. /.. / JdbcConnectionPoolParams/NO_NAME_0 ')
    cmo.setTestTableName ('dual')


    # Open a field template.
    readTemplate (wl_home + ' / common/templates/domains/wls.jar')

    CD (' Servers/AdminServer')
    together ('ListenPort', 7002)
    Set('ListenAddress','')


    CD('/')
    CD (' Security/base_domain/user/weblogic')
    cmo.setName ('weblogic')
    cmo.setPassword ('weblogic')
    setOption ('OverwriteDomain', 'true')
    writeDomain (domaintarget)
    closeTemplate()

    readDomain (domaintarget)


    addTemplate (workshop_home + ' / common/templates/applications/workshop_wl.jar')
    addTemplate (wl_home + ' / common/templates/applications/wls_webservice.jar')
    addTemplate (osb_home + ' / common/templates/applications/wlsb.jar')

    configOraDB('/JdbcSystemResources/wlsbjmsrpDataSource/JdbcResource/wlsbjmsrpDataSource/JdbcDriverParams/NO_NAME')
    configOraDB('/JdbcSystemResources/cgDataSource/JdbcResource/cgDataSource/JdbcDriverParams/NO_NAME')
    configOraDB('/JdbcSystemResources/cgDataSource-nonXA/JdbcResource/cgDataSource-nonXA/JdbcDriverParams/NO_NAME')



    updateDomain()
    closeDomain()


    except:
    dumpStack()
    Print "unexpected error:", sys.exc_info () [0]
    lift
    -----

    This creates a pretty empty field, as I have not yet created a real database. The command I found was

    loadDB ('10g ','wlsbjmsrpDataSource ')

    that will load the appropriate tables (of OSB/dbscripts /..)

    The problem is that I have no schema/user created in Oracle XE. So, I can manually create this but is not what I want to do. I also want to be scripted. So, how can I do this or is this not the way to go. You always manually create users on the database for three data sources (cgDataSource, wlsbjmsrpDatasrouce, cgDataSource-nonXA) before running a script to make a loadDB. Or do I run some kind of script create_user.sql or something.

    A second issue is that I can't find the scripts for the databases for cgDataSource and cgDataSource-nonXA data sources. They should be somewhere in workshop_10.3 but I can't find them. So, what is the problem here, I have to do a loadDB('10g','cgDataSource') or that eventually an error?

    My last question is I want to change the ALSB_DEBUGPORT (7 something) and debugging of the FMV of port (8453) in my script, how can I do this? I had another instance that already use these ports, so this won't work...

    My preference would be to invoke wslt by ant. This way Weblogic specific configurations can be addressed using WSLT and generic configurations (create DB users) can be done using ant.

    The files SQL to create tables required for the OSB are present in/MiddlewareHome/Oracle_OSB1/dbscripts/oracle. Try to run manually by using the Ant sql task. Create DB users is also possible using the same Ant SQL task http://ant.apache.org/manual/CoreTasks/sql.html.

    There are several ways you can do. I use http://ant.apache.org/manual/CoreTasks/replace.html as shown below in an Ant macro. Similarly, you can replace the ALSB_DEBUGPORT debug port and jvm debugging.

              
         



              
         


              
         


              
         


              
         


              
         


    Maury

  • I need to find the source file or registry that creates "Services" Exceptions in the firewall of Windows XP when the system is restarted.

    I have a boot sector virus (Troj/MBroot-H) that I can not remove from my computer without losing access to my HARD drive due to a custom boot partition.  I can't afford to repair or replace the computer I have at the moment, so I try to disable things as much as possible to neutralize this virus.  I have already downloaded Malwarebytes and analysis had revealed 18 registry viruses and files that have already been removed from the system.  The HelpAssistant account and its files have been deleted from the system.

    The only thing left to change is the firewall of Windows XP.  I currently have to restore Windows Firewall to its settings by default whenever I restart my computer because the virus has configured the system to add more 'services' and 'management' objects in the list of Exceptions whenever the system is restarted.  If I don't do that an outside source will invade the system via remote desktop and add the HelpAssistant account and the file.  I need to know how to replace system orders that creates these objects for additional exceptions during the restart.  I want to restore full contol on the firewall of Windows XP by allowing not exceptions except those I choose.  Is there a Window XP Firewall registry key or file that can be removed, replaced or changed to keep these elements to be added to the list of exceptions?

    Thank you

    Spacejunkie1

    The computer is still severely infected and you will not be able to "establish complete control over the firewall of Windows XP". Backup your data and do a clean install of Windows. I understand that you do not want to hear this, but it is, IMO, the answer. Please specify your first sentence if you need assistance.

    http://michaelstevenstech.com/cleanxpinstall.html - Clean install - how-to
    http://www.elephantboycomputers.com/page2.html#Reinstalling_Windows - what you will need at hand

    MS - MVP - Elephant Boy computers - don't panic!

  • Folder permissions in Windows 7 - a program that creates a file always has the authority to check the size of this file?

    Hello

    Where I work, we have a phone call, saving application that creates records of calls as .wav files.

    Before placing each record in long-term storage, the application creates a copy of the file (which is smaller) MP3 and then made a calculation of the free space to ensure that there is place in the long term for the newly created file storage.

    As part of the application must check the size of the MP3 file that he had just created and - I thought - calculation of space under Windows 7 that determination of the size of the file is sometimes a failure.

    (I think I understand, is that a .net function allows to determine the size of the file.)

    My query...

    If an application has sufficient privileges to create a file in a folder on the drive C: of the PC default also always have the right to determine the size of this file?

    Or are these two completely separate rights?

    For example, is it possible to have with no other rights granted write access?

    Thank you very much.

    The order of the questions, you asked:

    Yes

    Yes

    NO.

    It is indeed possible to give the file 'write' - access to the account, but not 'read' - access. However, even in this case the account can determine the size of the file.

    Log in under the account you are using for the conversion allows you to confirm my answers. To see the size of a file, use Windows Explorer or the Console command "dir".

  • Case of reunification in Windows 7 libraries: I wish that the library I created to display as the document library

    original title: folder in Windows 7 libraries

    The document library by default for Windows 7 includes two files.  When I select the document library, the contents of these two files is displayed in the right pane without grouping.

    I created a new library for myself and it adds files.  When I select that library, the contents of the folders that I placed inside appear in the right pane, grouped by folder.

    As far as I'm concerned. the grouping is just clutter, and I would the library I created to display as the document library.  Is there a way I can turn on and off grouping in the view "organize by folder"?

    I found the answer after I posted the question.  If you right-click in the free space (but not on any icons) in the pane right when a library is selected, you get a context menu that allows you to change the grouping of this component.  You can't have the same menu by right-clicking in the library in the left pane.  I have not found a way to change the grouping behavior using the diaglogs of folder options.

    I suggest that the list of tasks Microsoft must include an entry to add to the aid system so a search for 'group' and 'library' comes up with something related to the grouping in a library display.

    Thanks for the reply.

  • Transformation of Scripts that run only on the selected Tables

    I'm relatively new to Data Modeler, but found almost everything to be very intuitive. I'm now doing use custom transformation scripts to dynamically add custom DDL elements. I wrote a transformation script that adds a sequence at the end of my DDL trigger successfully, and I'm happy with the results. The problem I run into is that we have two different categories of tables that require slightly different sequence triggers, but as my model is set to the level of database, my transformation scripts are applied to all arrays regardless they come what schema. Do you have any suggestions on how to limit the tables which proceeds by a transformation script? I thought to add if statements to check what schema tables are coming from, but if I have a situation where I have two different tables that require two different processing scripts, but they are in the same pattern, how can that I manage that? Ideally, I'd like to just pick a table and apply a transformation script for this table individually. Is this possible?

    I work in a relational model with Data Modeler 4.0.

    to dynamically add items customized to DDL

    you need to check the custom of DDL in DM 4.1 features - "tools > rules and design transformations > Table DDL transformations"-DM 4.1 comes with example to generate tables of the newspaper and associated trigger.

    . I wrote successfully in a transformation script that adds a sequence at the end of my DDL trigger

    Data Modeler can generate the sequence and relaxation for you - you need to define the column as 'auto increment' / identity and set in preferences, you want "trigger" put in place. 4.1 DM added support for z/OS, DB2 LUW DB2 and MS SQL Server 2012.

    Do you have any suggestions on how to limit the tables which proceeds by a transformation script? I thought to add if the instructions to check the schema, the tables are coming, but if I have a situation where I have two different tables that require two different processing scripts, but they are in the same schema

    Well you need to sort it out on yourself - you can use classification types, dynamic properties user defined properties (in DM 4.1) or put paintings in various subviews or use the search feature (4.0.3 DM / DM 4.1 comes for example how to use the search results to create subview).

    Ideally, I'd like to just pick a table and apply a transformation script for this table individually. Is this possible?

    Here is an example of how get selected tables:

    appv = model.getAppView();
    dpv = appv.getCurrentDPV();
    //check there is a diagram selected and it belongs to the same model
    if(dpv!=null && dpv.getDesignPart() == model){
     tvs = dpv.getSelectedTopViews();
     for(var i=0;i
    

    Philippe

  • I created form in adobe acrobat X 1 Professional. Now, I want to put logic on a field. I want that the document will be closed if someone between age under the age of 18. and display a message for minors?

    I created form in adobe acrobat X 1 Professional.

    Now, I want to put logic on a field.

    I want that the document will be closed if someone between age under the age of 18. and display a message for minors?

    The final document is a little drastic... Perhaps simply display an error message? In any case, you can do it like this, as a custom field validation script:

    if (event.value && Number(event.value)<18) {
        app.alert("You must be an adult to fill in this form!");
        this.closeDoc(true);
    }
    

    Be aware that using this code will close the file without saving it, and the user will lose all unsaved data that they have entered.

Maybe you are looking for