Scripting using RealBasic

Has anyone tried scripting in RealBasic on Windows? I am trying to Open a document and set the size for the TextFrame but it just won't have it.

I always just create a parameter file in Realbasic then call an InDesign Script that reads in the parameter file and does it stuffs. This way I create complete InDesign issues.
myIndesign=new Oleobject("Indesign.Application")
myIndesign.DoScript(f.AbsolutePath,1246973031)
Ralf

Similar Messages

  • Create a follow up page in scripts using Duplex and Tumble Duplex in print

    How to create a follow up page in scripts using Duplex and Tumble Duplex in print mode of scripts ?

    it depends upon output device types.
    Regards
    Prabhu

  • Getting the output from a Perl script using Runtime.exec

    I cannot get the output from a perl script using Java. Can someone PLEASE help?
    I used the following code:
    Process p = Runtime.getRuntime().exec("C:\\Perl\\bin\\Perl.exe script.pl) ;
    InputSream in = p.getInputStream();
    b...
    do
    System.out.println(b);
    while ((b = in.read()) > 0)
    But there is no way that I get the output in the inputstream. If I use the command "cmd script.pl", the output is displayed in the Dos box, but also not in the inputstream.
    I will appreciate any help.

    Try this
    Process p = Runtime.getRuntime().exec("C:\\Perl\\bin\\Perl.exe script.pl) ;
    BufferedReader rd = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String str;
    while((str=rd.readLine())!=null){
    System.out.println(str);
    Manu

  • Executing a script using full path in ODT 11.1.0.5.10 beta?

    Using a query window from ODT 10x, I used to be able to run a script using '@' and the path to the script. For example: '@D:\Documents\CAL.MB\Oracle\Create Scripts\Applicant\APPLICANT_TB.sql'.
    Now I get the following error:
    Command '@D:\Documents\CAL.MB\Oracle\Create Scripts\Applicant\APPLICANT_TB.sql' is not supported in query window.
    I checked the documentation, but I couldn't find an alternative way to do this. Anyone know of any alternatives?

    Use VS.NET Tools menu->Run SQL*Plus Script->Specify the full path of your filename ->Select the connection->Hit the ok button.

  • Finished script: Use grep find/change to fill in a supplied table of contents

    This script is now complete, and has been the subject of most of my previous posts. Just in case anyone wanted to know what the finished script ended as, here it is.
    Thanks so much to all. A lot of really helpful folks on this board are very responsible for the success of this task. This script is to be one of hopefully many in the creation of our records. But it's a huge leap forward. Thanks again to everyone that helped.
    Cheers,
    ~Nate
    Task:
    Automatically find town names in listings, and fill in table of contents template on page 2 accordingly.
    Example of page 2 toc, initially:
    Example of a page of content. The town names are what need to be referenced on the TOC:
    Example of page 2 toc once script is finished:
    Because of the need to include the transaction dates on the TOC (comes as a provided, tagged-text file), a simple Indesign-generated TOC can't be used alone.
    This script uses an Indesign-generated TOC that's on a master page called "T-tocGen" ... It then uses grep search and replaces to grab the needed information, and insert it into the page 2 TOC.
    The script will update a generated TOC and then search for an instance of a page number, and town name. The generated toc lists all included towns in the following format:
    (line start)## tab townName(line end)
    In Grep, this would be (please note, extra \ for \d and \t ... javascript needs that for some reason):
    ^\\d+\\t(.*)$
    After the script gets the info it needs from a found instance of the above, it replaces that line with "---", to prevent that line from being picked up once again.
    The script with then place the needed page number in it's rightful place on page 2, replacing the XX.
    A while loop is used to repeat the above process until there are no longer any instances of "^\\d+\\t(.*)$" present.
    Not every town runs every issue, so once the script is done, it removes all remaining instance of "XX" on the page 2 TOC.
    FINAL CODE:
    TOC replace
    This script will use grep find/change methods to apply page numbers in
    tocGen to the XX's on page2TOC.
    // define the text frame of generated TOC
        var tocGenFrame  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
    // udpate generated TOC ... store contents in tocGenStuff
        var tocGenStuff = updateTOCGen();
    // set variable for while loop
    var okGo = "1";
    // while okGo isn't 0
    while(okGo.length!=0)
    // get town info from tocGen
    getCurrentTown();
    // replace XX's with tocGen info
    replaceTown();
    // grep find ... any remaining towns with page numbers in tocGen?
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // set current value of okGo ... with any instances of above grep find in tocGen
    okGo = tocGenFrame.findGrep();   
    // grep find/change all leftover XXs in page2TOC
    app.findGrepPreferences = app.changeGrepPreferences = null;       
    app.findGrepPreferences.findWhat = "^XX\\t";
    app.changeGrepPreferences.changeTo = "\\t";
    app.activeDocument.changeGrep();  
    // clear grep prefs
    app.findGrepPreferences = app.changeGrepPreferences = null;
    //  functions                  //
    function getCurrentTown()
    // grep options   
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // grep find:  startLine anyDigits tab anyCharacters endLine
          app.findGrepPreferences = app.changeGrepPreferences = null;
          app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // get grep find results      
    currentGen = tocGenFrame.findGrep();  
    // store grep results content into currentLine
    currentLine = currentGen[0].contents;
    // match to get array of grep found items
    currentMatch = currentGen[0].contents.match("^\\d+\\t(.*)$");
    // second found item is town name, store as currentTown
    currentTown = currentMatch[1];
    // change current line to --- now that data has been grabbed
    // this is because loop will continue as long as the above grep find yields a result
           app.findGrepPreferences.findWhat = "^\\d+\\t"+currentTown+"$";
                  app.changeGrepPreferences.changeTo = "---";
                tocGenFrame.changeGrep(); 
    function replaceTown()
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // find: XX currentTown .... replace with: currentLine
        app.findGrepPreferences = app.changeGrepPreferences = null;
        app.findGrepPreferences.findWhat = "^XX\\t"+currentTown+" \\(";
        app.changeGrepPreferences.changeTo = currentLine+" \(";
    app.activeDocument.changeGrep();   
    function updateTOCGen()
    //set vars ... toc text frame, toc master pag
        var tocGen  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
        var tocGenPage  = document.masterSpreads.item("T-tocGen").pages.item(0);
    //SELECT the text frame generatedTOC on the master TOC
        tocGen.select();
    //Update Table of Contents by script menu action:
        app.scriptMenuActions.itemByID(71442).invoke();
    //Deselect selection of text frame holding your TOC:
        app.select(null);
    //store contents of toc text frame in variable
        var tocGenText = tocGen.contents;
    //return contents of tocGen
        return tocGenText;

    Thanks for the reply.
    You are correct but the problem is there are three rows, One row is 100% black, the second is 60% black and the third is 40% black. I want to change the black to blue, the 60% black to an orange and the 40% black to a light shaded blue. In the find/change option you can select the tint you want to find and replace but yea.. does work on table cells.. oddly enough.

  • Executing a UNIX shell script using SM49

    I have been trying all sorts of things to get this to work and I have been un-successful
    I am trying to run the UNIX script using SM49. the command line that I am using is
    /test/directory/bin/testmail.sh
    the script testmail.sh looks like
    #!/bin/ksh
    /usr/bin/mailx -s testmail <email address>
    I have tried all sorts of combinations to run this script
    example
    sh /test/directory/bin/testmail.sh
    /test/directory/bin/testmail.sh %f
    /test/directory/bin/testmail.sh %F
    does anyone have any suggestions on how to get this to run successfully. once I get this to run successfully in SM49, I am going to try it in the intregration builder of my PI process.

    Hi,
    considering authorization issues, you can use
    CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
        EXPORTING
          commandname                         = 'LIST_DB2DUMP'
          additional_parameters               = l_path
         operatingsystem                      = 'UNIX'
        TABLES
          exec_protocol                       = lt_btcxpm
        EXCEPTIONS
    to extract information about files on the server
    I used this code to get detailed information for display including the attributes
    LOOP AT lt_btcxpm ASSIGNING <btcxpm>
        WHERE length > 57
          AND ( NOT message+57 CO '. '
                OR  message+57 = '..' )
          AND ( message(1) = 'd' OR
                message(1) = 'l' OR
                message(1) = '-' ).
        l_srvfil-type  = <btcxpm>-message(1).
        IF l_srvfil-type  = '-'.
          l_srvfil-type = 'F'.
        ENDIF." l_srvfil-type  = '-'.
        TRANSLATE l_srvfil-type TO UPPER CASE.               "#EC TRANSLANG
        l_srvfil-file  = <btcxpm>-message+57.
        CONDENSE l_srvfil-file.
        l_srvfil-attri = <btcxpm>-message+1(9).
    *    l_srvfil-time = <btcxpm>-message+44(12).
        l_srvfil-size = <btcxpm>-message+32(11).
        APPEND l_srvfil TO lt_srvfil.
      ENDLOOP." at lt_BTCXPM assigning <BTCXPM>.
      pt_srvfil = lt_srvfil.
    For the srvfil information I used this structure
    BEGIN OF typ_srvfil,
      %_box  TYPE flag,                                         "#EC *
      type   TYPE char01,
      attri  TYPE isp_rel,
      file   TYPE file,
      name   TYPE file,
      size   TYPE sytleng,
      owner  TYPE sy-uname,
      mod_date TYPE sydatum,
      mod_time TYPE syuzeit,
      END OF typ_srvfil,
    I do not remember exactly how the attribute information is resolved. In Unix all file system authorizations can be set as for the user, the group or for all and it can be read, write, execute granted. If you are no unix expert, ask one or google/wiki for some details.
    I wrote a program for navigation, display, and some more functions on the file system which is too big to post here and is not fully system-independent. Not perfect but useful and more than 5 years old. Contact me by mail if you want it.
    Regards,
    Clemens
    Edited by: Clemens Li on Oct 23, 2009 9:16 PM

  • Execute unix shell script using DBMS_SCHEDULER

    Hi,
    I am trying run to shell script using DBMS_SCHEDULER.
    1) I check..nobody user exist on my HP-UX.
    2) I check externaljob.ora on (10.2.0.2.0) also..It has an entry..
    run_user = nobody
    run_group = nobody
    3) I created job successfully and enabled it.
    begin
    DBMS_SCHEDULER.CREATE_JOB
    job_name => 'test_unix_script',
    job_type => 'EXECUTABLE',
    job_action => '/tmp/test.ksh',
    start_date => '08-NOV-2006 04:45:16 PM',
    job_class => 'DEFAULT_JOB_CLASS',
    enabled => TRUE,
    auto_drop => FALSE,
    comments => 'test_unix_script.'
    END;
    EXEC DBMS_SCHEDULER.enable('test_unix_script');
    4) test.ksh script had -r-xr-xr-x permission.
    5) When I checking dba_scheduler_job_run_details view, ADDITIONAL_INFO column display following error messgae.
    ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
    Did I miss anything?
    Any help will be appreciated!!
    Thanks..

    My /tmp/test.ksh trying to find database status.
    . ~oracle/.profile > /dev/null
    db_status=`eval sqlplus -s 'system/passwd@DEV' << EOF
    set pagesize 0 feedback off verify off heading off echo off
    select status from v\\$instance;
    exit
    EOF`
    echo $db_status > /tmp/db_status_out

  • Batch Script using System Varriable for Hostname and FQDN results in large space between

    I have a batch script running on Windows 7 that I've created to help a physical computer, connect to his virtual cousin.  Problem is when I try to make
    it use the FQDN (required by the View Client) it puts a large space between the hostname and the domain.
    Result
    ECHO Connecting View Client to PREFIX-SERIAL .domain.comOR"C:\Program Files\VmWare\View.exe" -Args -serverURL PREFIX-SERIAL       .domain.com
    Our computers are named a combination of a prefix and the serial number.  Our virtual computer names are the same, but with a different prefix.  So my attempt was to make a connection
    script, using the computer serial number.  My Process:
    Setting %serial% variable.
    for /F "skip=1 tokens=*" %%b in ('wmic bios get serialnumber') do if not defined serial set serial=%%b
    Set %hostname% variable.
    set hostname=PREFIX-%serial%
    Installation command line
    "C:\Program Files\VmWare\View.exe" -Args -serverURL %hostname%.domain.com
    That results in the output at the beginning of my post.
    I've also tried
    %hostname%.%userdomain%.com
    PREFIX-%serial%.%userdomain%.com
    PREFIX-%serial%.domain.com
    SET FQDN=.domain.com
    PREFIX-%serial%%FQDN%
    %hostname%%FQDN%
    I also tried carets and quotes on set commands without any improvement.
    I'm sure I'm missing something simple here.  Any advise?
    There's no place like 127.0.0.1

    Will something like this get you what you are looking for?
    (gwmi win32_bios).SerialNumber+(gwmi WIN32_ComputerSystem).Domain
    Or
    $hostname=(gwmi win32_bios).SerialNumber+"."+(gwmi WIN32_ComputerSystem).Domain
    Sorry just realized your looking to do this in a Batch file...so maybe something like this
    @echo off
    for /F "skip=1 delims=" %%j in ('powershell "[System.Net.Dns]::GetHostByName((hostname)).HostName"') do (
    set Host=%%j
    goto :DONE
    :DONE
    echo %HOST%

  • Help on scripts used in bpc

    Hi All,
    Hope you can help me in know
    where to find some help doc's on scripts used in BPC and coding in SSIS packeges.
    And does BPC internally convert scripts to SQL script or MDX?
    And can i use both SQL and MDX in single logic file?
    Any help will be greatly appriceated

    The BPC logic engine converts the "SQL-style" script logic syntax into true SQL, that's executed against the data in the fact tables.
    MDX script logic is executed against the Analysis Services cubes; I don't believe that much conversion is involved here, but honestly I'm not an MDX expert, so I could be mistaken.
    You can mix both in a single logic file, subject to a clear understanding of how *COMMIT and XDIM_Member, etc. work to scope a particular block of code. The BPC Admin guide (also in the online admin help) is the key reference guide for this.
    But the most important piece of advice I can give is, don't write MDX logic. Only use it (as sparingly as possible) for raios (division) in member formulas, where you need to evaluate a formula at various points in the hierarchy (not just at base members). For everything else, use business rules or SQL logic.

  • As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 also how we can insert,update,delete records in list using ECMA script.

    As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 step by step also how we can insert,update,delete records in list using ECMA script.
    Thanks and Regards, Rangnath Mali

    Hi,
    According to your post, my understanding is that you want to use JavaScript to work with SharePoint list.
    To create list items, we can create a ListItemCreationInformation object, set its properties, and pass it as parameter to the addItem(parameters) function
    of the List object.
    To set list item properties, we can use a column indexer to make an assignment, and call the update() function so that changes will take effect when you callexecuteQueryAsync(succeededCallback,
    failedCallback). 
    And to delete a list item, call the deleteObject() function on the object. 
    There is an MSDN article about the details steps of this topic, you can have a look at it.
    How to: Create, Update, and Delete List Items Using JavaScript
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Scheduling an sql script using dbms_scheduler

    Hi Experts,
    I am having an oracle 10g database on windows platform. I have an sql script which has a normal set of sql statements (insertion and updation).
    I would like to schedule to run this sql script using dbms_scheduler but I've gone through certain sites and came to know that it's not possible to schedule an sql script using dbms_scheduler. Please let me know how I can schedule this script using dbms_scheduler.

    It is possible - in 10g and above you can use DBMS_SCHEDULER to call an external procedure, which in this case could be a call to your SQL file.
    Get's a bit more complicated with older versions, but still doable.
    But - unless there is a really good reason why you cannot do so, move this into a PL/SQL procedure as suggested.
    Carl

  • Can we get database creation script using any packages?

    Hi Friends,
    we will get table creation script using dbms_metadata.get_ddl package. just like that is there any way to get database creation script? i know that we can add some lines to controlfile trace to convert it into database creation script. but i would like to know whether it is possible through packages?
    thanks in advance.

    I think there's no package to use it for getting database creation script. But anyway, you can search it in [Oracle Database PL/SQL Packages and Types Reference|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/toc.htm]
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How to run expect script using SGD?

    Does any one know how I can run an expect script using the same executable SGD uses? I think the executable is /opt/tarantella/bin/bin/ttatcl, but it seems to be looking for an init file that I cannot find.
    Anyone tried this before?
    Thanks

    ttatcl is a TCL interpreter, the expect functionality is embedded into ttaexecpe and can't be used externally.
    Linux distributions usually include expect and you can find expect for Solaris here :
    http://www.sun.com/software/solaris/freeware/index.xml

  • How to run tests in Firefox when running script using runScript.bat

    I am trying to run OATS script from commandline without opening Openscript IDE(eclipse). I use the following command to execute my script:
    runScript "<scriptpath>/<scriptName>.jwg"The script starts to execute and launches IE. I wanted to run my test on Firefox but it always launches IE even if Firefox is my default browser.
    If I run my script from Openscript IDE it honours the Browser settings in View > OpenScript preferences... OpenScript > General > Browsers. When running thorugh cmd line, these settings are not taken into account as Eclipse preferences settings are applicable only for the workspace selected for the IDE.
    Any thought on how to set these preferences when running scripts using runScript.bat file?
    Thanks,
    Manish Khatre

    Hello
    You need to pass the value/parameters (preferences) to the command line as documented in the OpenScriptUserGuide.pdf.
    Something like
    -browser.type type
    Specify the browser type to use for script playback
    where type is one of the following (use exact case
    and no spaces):
    ■ InternetExplorer
    ■ Firefox
    The default is InternetExplorer
    JB

  • Creating pdf with super/sub script using indesign

    Hi,
         I want to create a pdf with textrise for subscript and super script using indesign. I am new to this. Kindly guide me to acheive the same.
    Regards,
    Kameshwaran A.

    Hi Peter,
         Thanks for the response. I have created the file in ID and exported / print (Both i have made) it to PDF. When i open the pdf and check the textrise value is 0. Actually it should be greater than or less than zero. I don't know what mistake i have made or how to acheive the same. Could you please tell me where i have made the mistake.
    Thanks and Regards,
    Kameshwaran A.

Maybe you are looking for