Scripting menu items

I desperatly ned to find out how to use applescript for exporting pages document.
One way could be through menu scripting.
I am able to show the ruler of a pages document with the code at the end of this message.
But how can I Export a pages document to word format using menu items.
Thanks
Jitse
tell application "Pages"
activate
end tell
tell application "System Events"
tell process "Pages"
activate
set frontmost to true
tell menu bar 1
tell menu bar item "View"
tell menu "View"
click menu item "Show Rulers"
(*click button "PDF" of radio group of sheet 1 of window 1 *)
end tell
end tell
end tell
end tell
end tell

If you don't mind using [GUI Scripting|http://www.macosxautomation.com/applescript/uiscripting/index.html], then the following script (which runs flawlessly on my computer) should do what you are asking for:
--BEGINNING OF SCRIPT
set theName to "Pages document.doc"
tell application "Pages" to activate
tell application "System Events" to tell process "Pages"
click menu item "Export…" of menu 1 of menu bar item "File" of menu bar 1
repeat until sheet 1 of window 1 exists
end repeat
click radio button "Word" of radio group 1 of sheet 1 of window 1
click button "Next…" of sheet 1 of window 1
keystroke "a" using command down -- Select All (⌘A)
keystroke theName
keystroke "d" using command down -- save to Desktop (⌘D)
keystroke return
end tell
--END OF SCRIPT
Hope it can help.
(The above script was tested with Pages ’09 and Mac OS X 10.6.2 “Snow Leopard”.)
Message was edited by: Pierre L.

Similar Messages

  • CS3 - Scripts Menu item greyed out after using file info

    This looks like a bug to me, anyone else had the same problem ? Or solutions
    I have a couple of scripts which add an extra menu item called "Scripts" on the menu bar (and sub-menu items to call the scripts). If I open the 'file info' for a selected file and then close it again (doesn't matter if it is cancel or okay) the "Scripts" menu item is now greyed out and not accessible.
    Only cure is to shut down and restart bridge - very annoying.
    Bridge v 2.1.1.9 on Win XP SP2.
    Steve

    sorry for the late reply.. just saw your qn in 2 years time.. ;p
    you need to set "Enable Attached Scripts" to check in the Edit>Preferences>General.
    hope that helps 

  • How to position your script menu item

    Hello,
    How do you position your menu item in the right place. 
    I want to create a new type of document.
    How do I get my menu item under the New sub menu.
    Thanks.
    P.

    The MenuItem add function shows you how:
    MenuItem add (associatedMenuAction: MenuAction[, at: LocationOptions=LocationOptions.AT_END][, reference: MenuElement][, withProperties: Object])
    so all it takes is telling it to add yours LocationOptions.AFTER the New menu item.

  • Any way to write code to cache the contents of the scripts menu? (or force ScriptsMenu plugin start)

    In the scripting forum I created the thread Adding custom scripts to actions revisited - Partial workaround
    Basically, you can create actions with keyboard shortcuts to execute custom javascript/vbscript, etc. and successfully reload them after restarting Illustrator but only if the user manually navigates to File->Scripts before manually loading an actions (.aia) file
    Any script menu items added to actions will be stripped from the custom actions when Illustrator is restarted because, I believe, the script menu items are not cached and are therefore invalid when the actions are automatically reloaded.
    Obviously, I'd prefer not requiring the user to navigate to the scripts menu and replace the actions every time Illustrator is started.
    Does anyone have any ideas on a way to write code so that Illustrator caches the contents of the scripts menu? Preferably this would be before the actions are loaded so they don't get invalidated and need to be reloaded in the first place. A keyboard macro would likely execute to late to be of much help.
    If anyone knows anything about the actual mechanism of caching the scripts menu or knows of anything else relevent to this please respond.
    Thanks!
    Edit: The menu is created in the Scripts Menu plugin (ScriptsMenu.aip). Perhaps there is no "cache" of the menu and the plugin just doesn't perform the startup until you browse to the File->Scripts menu?
    AIMenuGroups.h has the global definition of the group:
    #define kScriptsMenuGroup         "ScriptsMenuGroup"

    Have you looked at stored outlines ? They are for plan stability.
    Also you may want to look little deep on where your statistics are going wrong.
    I would recommend using below hint and checking where is difference in estimated(E-Rows) and actual number(A-rows) of rows. This may point out some incorrect stats.
    e.g.
    select /*+ gather_plan_statistics */ * from dual;
    D
    X
    select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST'));
    Plan hash value: 272002086
    | Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers |
    | 1 | TABLE ACCESS FULL| DUAL | 1 | 1 | 1 |00:00:00.01 | 3 |
    ------------------------------------------------------------------------------------

  • Menu Item "Migration/Script Generation" greyed out in 1.5.3

    I have just set this tool up, and am trying to general DDL scripts for an existing database to which I must make incremental modifications.
    I have looked and seen that the way to do this is to use the above menu item, but on my installation it is greyed out. When I open the Preferences menu and select the base of the "Migrarion" sub-tree, the default repository is greyed out, and I am not able to set it.
    What could the problem be? I have looked in the on-line help and forums, but haven't seen anything really relevant. It would seem to be a basic issue.
    By the way, if it's relevant, this SQL Deeloper instance was installed on a German version of Windows XP, and many of the menu items are in German.

    Migration is moving structure and/or data from one type of database to another (e.g. SQL Server to Oracle).
    What you want is the Database Diff tool, which can generate you the diferential scripts...
    Tchuss,
    K.

  • Automatically debugging when calling a script from a menu item

    Hi All,
    I'm coming accross an issue that I was wondering if anyone can help me with or point me in the correct direction.
    I have two start up scripts.
    One runs in the "session" target engine and setups ups some custom menu items and actions which call some other custom scripts.
    The other runs in my own custom session and is used to initialize and share common constants and functions between my custom scripts.
    This all appears to run as expected and clicking on the new menu item calls the correct script however even without the ExtendedScript Toolkit running as soon as i click on the menu item it will load up the ESTK and break on the first line of the script. If I press F5 to continue processing it will finish and runs fine.
    I am currently using the excellent extendables package (http://extendables.org/) to do some HTTP and simplify UI creation which does not specify a session.
    Does anyone know what is causing the scripts to be automatically debugged or is there a setting that might be set to cause this?
    Is this being caused by "session" calling "customSession" using code that will run in the default "main" session?
    this really is irritating me at the moment so if anyone can help it would be much appreciated.
    This is all done using JavaScript in InDesign CS 5.5
    Thanks in advance

    just a quick update.
    After stripping back and stubbing out some code I have been able to trigger a "session" going to my "customSession" then to a non-session (the default) so this is not causing my issue.
    As I mentioned above i am using the extendables package and this appears to be where my issue is arrising. as soon as i include the package:
    #include "extendables/extendables.jsx"
    i get the strange behaviour of it going into debugging mode on the first line of the script being run by my menuItem eventHandler.
    This is without actually using any of the modules available in the extendables package just including it.
    I will try to post a message on the website for this package but if anybody has any ideas about what might be in there that is causing this I would appreciate any ideas/suggestions/theories.
    Cheers

  • How to assign script to menu item? (JS, CS3)

    Hi All,
    I can't find out how to assign a script to a menu item. Instead of clicking a script name in the script panel, I want to appear a menu item in the menu bar. When I click that name on the menu bar I want a certain script to run.
    I've managed to put the menu item in the menu bar, but not to assign the script to it.
    many thanks
    marco

    Hi Marco,
    Here is an example:
    #targetengine "kasyan"
    var myScript1 = new File(app.filePath + "/Scripts/Scripts Panel/Preflight CS3 v3.2.jsx");
    var myScriptAction1 = app.scriptMenuActions.add("Preflight Document");
    var myEventListener1 = myScriptAction1.eventListeners.add("onInvoke", myScript1, false);
    var myScript2 = new File(app.filePath + "/Scripts/Scripts Panel/Rename Sections v3.1.jsx");
    var myScriptAction2 = app.scriptMenuActions.add("Rename Sections");
    var myEventListener2 = myScriptAction2.eventListeners.add("onInvoke", myScript2, false);
    var myScript3 = new File(app.filePath + "/Scripts/Scripts Panel/Check 100 3 SE.scpt");
    var myScriptAction3 = app.scriptMenuActions.add("Check Resolutuon of Images");
    var myEventListener3 = myScriptAction3.eventListeners.add("onInvoke", myScript3, false);
    var myScript4 = new File(app.filePath + "/Scripts/Scripts Panel/Resize Images v16.1.scpt");
    var myScriptAction4 = app.scriptMenuActions.add("Resize Images");
    var myEventListener4 = myScriptAction4.eventListeners.add("onInvoke", myScript4, false);
    try{
    var myScriptMenu = app.menus.item("$ID/Main").submenus.item("Scripts");
    myScriptMenu.title;
    catch (myError){
    var myScriptMenu = app.menus.item("$ID/Main").submenus.add("Scripts");
    var myScriptMenuItem1 = myScriptMenu.menuItems.add(myScriptAction1);
    var myScriptMenuItem3 = myScriptMenu.menuItems.add(myScriptAction3);
    var myMenuSeparator1 = myScriptMenu.menuSeparators.add();
    var myScriptMenuItem2 = myScriptMenu.menuItems.add(myScriptAction2);
    var myScriptMenuItem4 = myScriptMenu.menuItems.add(myScriptAction4);
    Kasyan

  • 'flatten.txt' script for Acrobat 9 Flatten Document Menu Item

    Hello,
    I was following the steps in this blog (Add a Flatten Document Menu Item to Acrobat) to add a Flatten Document menu item in Acrobat 9, and the link the 'flatten.txt' script is dead.  The page directs you to this link:  https://acrobat.com/?d=KlVeiP4I1SXCRcTpRh-2wQ, which is just the Adobe Document Cloud webpage.  Does anybody have a copy of the 'flatten.txt' script?  I've used this before on my last computer, but since re-installing I have not been able to add this feature to Acrobat 9.  Any help is appreciated.  Thanks

    You need to contact Rick Borstein to update the link for the missing file. See his blog entry In case files are missing. Adobe has closed Acrobat.com and started a new service for Acrobat DC.
    There are any number of scripts to provide add this feature with some options.
    PDFScripting free automation tools
    Selective Flattener by UVSAR, you may need to research where the user scripts are stored in the newer versions of Acrobat.
    In the future, you should either copy your custom scripts to a remote location for restoration or keep a copy of the scripts and documentation on removable data or a networked location as a backup.

  • GUI scripting-select menu item in Mail's Styles popupbutton

    Hi,
    The following script complies without returning an error.
    In Mail, with a new message window displayed, the Styles sheet displayed (select Format>Style>Styles...), and the Favorite Styles radio button selected, the script below returns an error when it gets to the line "click pop up button item 'Bold'" (the menu does contain an item "Bold!").
    I'd prefer to select the menu item by name rather than by using keystrokes in the script because I will be adding styles to the Styles menu, which will result in changes in the numbering of items in that menu.
    Could someone please explain to me how to accomplish this?
    Thanks in advance!
    tell application "System Events"
    tell application process "Mail"
    tell first window
    tell first sheet
    tell first radio group
    tell radio button 2
    click
    end tell
    end tell
    tell pop up button 1
    click
    click pop up button item "Bold"
    end tell
    end tell
    end tell
    end tell
    end tell

    When you click the pop up button, the result is a menu, so you will need to click an item of that menu - for example:
    tell pop up button 1
          click
          click menu item "Bold" of menu 1
    end tell

  • Spry Menu Bar - Different Background Image Wanted for menu items

    Hi, I've looked everywhere for help with this and just haven't found any answers yet ...
    I want my Dreamweaver CS5.5 menu to look like this design I've done in PhotoShop ...
    It's a simple one level list with no sub-levels.
    Everything is good, except I can only set one background image for all the menu items at this level.
    I want the first, last, and all the middle, menu items to use different background images.
    I have no idea where or how to insert the code to set a different background image for each individual menu item ...
    I know I could use images set one on top another in a column with rollover image swop, but the spry menu opens the door for dynamic content so I'm keen to get it working.
    Manchester city council has a great example of this style of menu design working at - http://www.manchester.gov.uk/
    They've got funky indenting of the text as well.
    ~~~~~~
    This is the code for my menu list ...
      <div class="sidebar1">
        <ul id="MenuBar1" class="MenuBarVertical">
          <li><a href="#">Home</a></li>
          <li><a href="#">News</a></li>
          <li><a href="#">Groups</a></li>
          <li><a href="#">Events</a></li>
          <li><a href="#">About</a></li>
          <li><a href="#">Contact</a></li>
             <li><a href="#">Help</a></li>
        </ul>
      </div>
    This is how I set the background image (but I can only define one image) ...
    I set the image background to "Menu-Nav-Bar-Pic-Top-v1-w170px-h32px.jpg" through ...
    CSS Styles
    SpryMenuBarVertical.css
    ul.MenuBarVertical a
    I then select the background category
    and browse to the image file.
    doing this changes my CSS code as follows ...
    ul.MenuBarVertical li
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: 170px;
        margin-top: 4px;
        margin-bottom: 4px;
        background: url(/Images/Menu-Nav-Bar-Pic-Top-v1-w170px-h32px.jpg);
    ul.MenuBarVertical ul
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: absolute;
        z-index: 1020;
        cursor: default;
        width: 170px;
        left: -1000em;
        top: 0;
        margin-right: 0;
        margin-bottom: 0;
        margin-left: 95%;
        background: url(/Images/Menu-Nav-Bar-Pic-Top-v1-w170px-h32px.jpg);
    ul.MenuBarVertical a
        display: block;
        cursor: pointer;
        padding: 0.5em 0.75em;
        color: #0000;
        text-decoration: none;
        font: normal 12px Verdana, Geneva, sans-serif;
        background: #EEE url(/Images/Menu-Nav-Bar-Pic-Top-v1-w170px-h32px.jpg);
    ~~~~~~
    These are the three images I want to apply to the top middle and bottom menu items :
    Top menu item background image - "Menu-Nav-Bar-Pic-Top-v1-w170px-h32px.jpg"
    Middle menu items background image - "Menu-Nav-Bar-Pic-Mid-v1-w170px-h32px.jpg"
    Bottom menu item background image - "Menu-Nav-Bar-Pic-Bot-v1-w170px-h32px.jpg"
    ~~~~~~
    As I am unable to set the menu items individually, this is how the menu looks like on my website at the moment ...
    ~~~~~~
    So near yet so far ! I'm hapy with the verdana font, the image size and spacing, but the background images I just can't set them right.
    I'd really appreciate any help on this as I'm out of ideas.
    Thank you.

    The easiest way is to use pseudo elements.
    To style the first and last menu items ifferently to the rest, merely add :first-child and :last-child respectivly as follows
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css">
    <style>
    ul.MenuBarVertical li:first-child a {
        background-color: red;
        color: white;
    ul.MenuBarVertical li:last-child a {
        background-color: green;
        color: yellow;
    </style>
    </head>
    <body>
    <ul id="MenuBar1" class="MenuBarVertical">
      <li><a href="#">Item 1</a></li>
      <li><a href="#">Item 2</a></li>
      <li><a href="#">Item 3</a></li>
      <li><a href="#">Item 4</a></li>
      <li><a href="#">Item 5</a></li>
    </ul>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>
    In your case, in liue of the background colour, you would have an image.
    Gramps

  • NEED more than 15 menu item in Context Menu ????

    Hi,
    I really need to have more than 15 menu item displayed on Context Menu. I desperately need some workaround or ideas to achieve this
    My client has invested thousands of dollar in Flex Project, he definitely need more than 15 menu item.If this project failed , client will NEVER think to invest in flex.
    Had I been  aware of this limitation before I would have thought some solution by now.This comes as a surprise to me at the last moment ,just fews days before Prod Date.
    I cant also user java Scrip heck  as my Flex application is running inside Dot net Container , I do not access to the luxury of java script
    Pls gents help me get rid of this ...PLEASE provide some ideas.
    Thanks in advance.
    Thanks,
    Dharmendra

    Thanks Natasha,
    I got your point  but as for as I  know grouping like Quality is not possibel in Flax Context menu. I also cant go for window style menu(file,edit) because I need them to be displyed on DataGrid right clk . I am designing a trade datagrid where in trader can see all trades and he can approve/reject etc by just right clk and  selcting proper menu item form Context Menu.
    In case of window style (acrobat.com) menu trader will have to reach to  menu instead of  getting all options on mouse right clk
    I will have to think other alternative wich provides same ease as cotext menu.(God knows what is that )
    Once again thanks for suggestion.
    Regards,
    Dharmendra

  • Calling a dll from a new menu item in Bridge.  Idiot help needed

    Hi,
    I'm trying to what I believe is a fairly simple script.  I'm coming from a hobbiest Delphi background, and to be honest I'm finding JavaScript a little bit hard to understand.  My requirements are simple - add a new menu item to Bridge which executes a call to a custom dll.  Note I'm not expecting the dll to return anything here.. 
    Looking at the samples provided even I can add the menu item - but getting it to successfully call the dll is a bit of a mystery. 
    The script compiles and adds the menu item, however the menu action doesn't call the dll.  I believe it should be a fairly simple task and was hoping somebody here could steer me right.  Here's my code (as you'll see a clear cut and paste job from the examples ;o)
    Header 1
    function SnpAddMenuItem()
      this.requiredContext = "\tAdobe Bridge must be running.\n\tExecute against Bridge CS6 as the target.\n";
      this.menuID = "snpmyMenu";
      this.menuCommandID1 = "snpAddMenuItemSub1";
      $.level = 1; // Debugging level
    SnpAddMenuItem.prototype.run = function()
      var retval = true;
      if(!this.canRun()) {
      retval = false;
      return retval;
      // Create the menu element
      var newMenu = new MenuElement( "menu", "myMenu", "before Help", this.menuID );
      // Create the menu item
      var alertCommand1 = new MenuElement( "command", "Load Stuff", "at the end of " + this.menuID, this.menuCommandID1);
      alertCommand1.onSelect = function (m1)
            ExternalObject.myDll = new ExternalObject('lib:/C/temp/apmDLL.dll');
            myDll.sendtoACRPM(1);
    //      return retval;
    SnpAddMenuItem.prototype.canRun = function()
      // Must run in Bridge
      if(BridgeTalk.appName == "bridge") {
      // Stop the menu element from being added again if the snippet has already run
      if((MenuElement.find(this.menuID)) && (MenuElement.find(this.menuCommandID)))
    // $.writeln("Error:Menu element already exists!\nRestart Bridge to run this snippet again.");
    // return false;
                MenuElement.remove(this.menuID);
      return true;
      $.writeln("ERROR:: Cannot run SnpAddMenuItem");
      $.writeln(this.requiredContext);
      return false;
    if(typeof(SnpAddMenuItem_unitTest ) == "undefined") {
      new SnpAddMenuItem().run();

    The dll needs to be compatable with the criteria set in the JavaScript Tools Guide. There is an example in the Bridge SDK that can be downloaded from http://www.adobe.com/devnet/bridge.html
    But it need someone who is knowledgeable with c++
    It would be great if someone could write a wrapper to access other external objects.

  • Unable to create Menu Item List Buttons in Forms - Not Working!

    Hi guys,
    I need desperate help since I have been stuck on these for 2 days and I am unable to move forward!!
    I am trying to create a pdf form using Acrobat pro 9 and Adobe LiveCycle Designer ES. Since I am new to this, I have been browsing through numerous sites, forums and tutorials to learn about this. So far, I was able to create the forum with text fields, etc.. I am trying to have a column in my pdf form where the users can simply copy & paste image icons here..I was having difficulty with this already and have done numerous searches in google. In the end, I thought I am better off trying to use the "stamp" tool for this instead of image field. So this is what I did:
    1) I already placed the image icons (that the users will be copying & pasting) on my pdfs so users can simply click on it to select the image.
    2) I added a new bottom to this form which has the short cut to the menu item "copy" function. I labeled this button as 'Copy' and to this button, I added the following javascript for "Mouseup":
    app.execMenuItem("CopyFileToClipboard");
    3) Next I created another button that I called 'paste' and this button executes the "Paste Clipboard Image as Stamp Tool" menu. This button has the following javascript:
    app.execMenuItem("Annots:Tool:StampFromClipboardMenuItem");
    I thought that after doing the above, the user should be able to click on one of the images in the pdf, then click on 'copy' button and in the end click on 'paste' button that will then run an action so user can stamp this copied image to where ever they want in that file. But this is not happening!! I dont why?? Nothing happens when these buttons are clicked. I have made sure that the "Extended features in Adobe Reader..." is enabled and also tried running the above javascripts on my console window to test it and i know that the actual javascript code is not at fault since these functions works when I try the code through the debugger window. But I just cannot figure out why these menu item functions are not working when the buttons I had created are clicked!!! I dont know if what I have done is correct or if there is a easier way to achieve what I am trying to do!! Its a shame there is no simpler way for the end-users to copy and paste images to the columns in the pdf forms.
    please help me understand why the above button are not working....any help will be great!!

    Hi Paul,
    This is further to our email correspondence. I am just pasting your email response here since it may be useful to other newbies like me:
    "Ok here you go ......I had to add the new row via a script object as the new objects are not completely available until the script ends so I cannot resize the new row from teh current script.
    Then when we resize - we have to resize the row, the cells and the image ....we start with all existing subforms then we do it for the new row that was just added.
    Lastly I see that you have a delete row button. This will have to be part of the row otherwise we ill not know which row the user will want to delete .....unless you ask them (which is not good UI design)."
    I was really impressed the way you modified the script so the table height does not change when new rows are added. That did help me in understanding the methods and it will certainly be v useful to me in the future. I have been practicing and getting a hang of LS and I have actually decided to redesigned my form since it appears that trying to have a fixed table height is quite a bit of work each time a row is added, removed or changed, etc... Your advise so far have been v helpful and it has helped me in redesigned the form into a different layout. So far so good...However, I just have a few more clarifications regarding some hurdles I am facing:
    PS: I have emailed you a sample of my new form now so you can have a look at it.
    1) Dynamic Image fields:
    In this form, I have a subform that has a dropdown list and next to this, I have an image field. I want to change the image based on the selection in the dropdown list. I found a few samples and tutorials on this already and I tried 2 different approach for this. One works and the other doesnt.
    Method that works: What I have done here is, I added all the images in the form and have put their presence to invisible. Then using the javascript, I am making the image visible based on the selection in the dropdown list. I found this method somewhere through googling and it works.
    Method that doesnt work: Its similar to the above, but instead of putting all the images in the form, I just inserted 1 image field and then tried to change the url of this dynamic image based on the selection in the drop down list. But this method is not working. I tried inserting this jscript and nothing happens:
    switch (this.rawValue)
    case "1":
    myImages.value.Image.href=http://www.mysiteaddress.com/blah_blah.jpg;
    break;
    case "2":
    myImages.value.Image.href=http://www.mysiteaddress.com/blah_blah2.jpg;
    break;
    The 2nd method does not work. Although I know the method 1 above works and I am currently using it, I am just curious to find out why the 2nd method is not working? Did I get the script wrong or is this feature no longer allowed? I just thought that if the second method works fine, it saves the hassle of putting all the images on the form and then making them hidden. Instead, I just need to put one image field and then dynamically change its image based on the selection. I hope this make sense..please advise..
    2) Changing the background colour of the Dropdown list box:
    I am trying to change the bg colour of the listbox in the dropdown list object (only the listbox bg color and not the whole background color). So, I added the following script to the mouseEnter event and this works:
    var vName = this.somExpression;
    var fieldObj = xfa.resolveNode(vName + ".ui.#choiceList.border.fill.color");
    fieldObj.value = "255,255,225";
    My Problem: The above script works so I dont need to change anything there. But, I also want to add another script to the mouseExit event to change the fill color to its default once the mouse leaves the dropdown lists. Initially, this field has no fill colour and the border fill style is none. The fill color is only added during the mouseEnter event. How do I change the bg color fill back to none during mouseExit after the above script is executed on mouseEnter?
    (NOTE: If you see my form, I have used the above scripts for the dropdown list only in "boxSubform[0]".)
    3) Changing the length of the Dropdown List box:
    I only have about 1.6 inches workspace to add this dropdown list box. However, the length of some lists (list items) in this dropdown list box is actually longer and the remaining part is cut out. So, I added the following script to increase the dropdownlist length and it does not work the way I would have hoped...
    The script I have written so far:
    I added these to the mouseEnter event and it works fine -
    form1.pageSubform.dynamicSubform.Table1.Row1.boxSubform[0].MyDropdown::mouseEnter - (JavaScript, client)
    this.w = "2in";  //this is to to increase the width of the dropdown list
    I added these to the mouseExit event and it works fine too-
    form1.pageSubform.dynamicSubform.Table1.Row1.boxSubform[0].MyDropdown::mouseExit - (JavaScript, client)
    this.w = "1.625in";
    When I tested the form with the above script, this is what happens:
    1) First when you move the mouse over this field, the width increases. Similarly the width decreased when you move away.
    2) So, even if this is clicked, the list box is opened with this 2inch width so thats good.
    3) There are no problems when the mouse is moved over these list items as well. However, this does not look good when the dropdown list item is clicked with its item lists open and then the mouse leaves this area. In this case, as soon as the mouse leaves this area, the mouseExit script runs and hence it makes the drop down list width to shrink eventhough the list items are still open. How do I resolve this? I was thinking about this and I thought the possible way to overcome this is by writing a javascript for the mouseExit event executing something like this:
    if this dropdown list is open,
    then  this.w = "2in";
    else
    this.w = "1.625in";
    I am not sure how to write a jscript for the above?
    (NOTE: If you see my form, I have used the above scripts for the dropdown list in "boxSubform[0]".)
    4) Hiding the alternative row shadowing for hidden columns:
    If you check out my form, you can notice that I have put the "close" button (button to delete table rows) on the left column and I have also put its presence to "Visible (screen only)". The parent table has got the 'alternative row shadow' checked. What I notice here is, when this page is printed, eventhough the first column's presence is set to "Visible (Screen Only)", it still prints the row shadow for this column and it looks bad. How can I fix this? Any help will be great!
    I have already emailed you my new form again so you can have a look.
    Thanks again Paul and I cant thank you enough for your help. I am sooo happy to see such a great support and resources available here since it can be a nightmare for some newbies like me... :-)

  • Help with selecting files from script menu or drag and drop

    I found this scale images applescript online. It works great when a bunch of files is dragged on top of the script but I would like it to also work when a folder or group of files is selected in the Finder and I activate it from the scripts menu.
    I can't get my on run statement to work. I'm not really an Applescript guy so I'm really just asking if someone can help finish what I started in this on run.
    -- save in Script Editor as Application
    -- drag files to its icon in Finder
    property target_width : 120
    property save_folder : ""
    on run
    tell application "Finder"
    activate
    set folder_path to quoted form of (POSIX path of (the selection as alias))
    set theItems to every file of folder_path
    end tell
    end run
    on open some_items
    -- do some set up
    tell application "Finder"
    -- get the target width, the default answer is the property target_width
    set new_width to text returned of ¬
    (display dialog "Target width:" default answer target_width ¬
    buttons {"OK"} default button "OK")
    if new_width as integer > 0 then
    set target_width to new_width
    end if
    -- if the save_folder property has not been set,
    -- set it to the folder containing the original image
    if save_folder is "" then
    set save_folder to ¬
    (container of file (item 1 of some_items) as string)
    end if
    -- get the folder to save the scaled images in,
    -- default folder is the property save_folder
    set temp_folder to ¬
    choose folder with prompt ¬
    "Save scaled images in:" default location alias save_folder
    set save_folder to temp_folder as string
    end tell
    -- loop through the images, scale them and save them
    repeat with this_item in some_items
    try
    rescaleand_save(thisitem)
    end try
    end repeat
    tell application "Image Events" to quit
    end open
    on rescaleand_save(thisitem)
    tell application "Finder"
    set new_item to save_folder & "scaled." & (name of this_item)
    end tell
    tell application "Image Events"
    launch
    -- open the image file
    set this_image to open this_item
    set typ to this_image's file type
    copy dimensions of this_image to {current_width, current_height}
    scale this_image by factor (target_width / current_width)
    save this_image in new_item as typ
    end tell
    end rescaleandsave

    When items are dragged to your script's icon they are passed in to the on open handler, so this triggers:
    on open some_items
    and the dragged items are passed in as some_items
    In contrast, when you double-click on the script, or invoke it via the Script menu, this runs the on run handler:
    on run
      tell application "Finder"
        activate
        folder_path to quoted form of (POSIX path of (the selection as alias))
        set theItems to every file of folder_path
      end tell
    end run
    However, there's nothing in this block that actually does anything with the selection - you (dangerously) assume that the selection is a folder (you really should check first), and just set theItems to every file in that folder then you exit.
    So to do what you want you'll need to edit your run handler to filter the selection and pass files over to the code that does the hard work.
    You already have the basis for this - your rescaleandsave() handler, so it's just a matter of identifying the files in the selection and passing those over to that handler:
    on run
      tell application "Finder"
        set cur_selection to (get selection) -- get the selection
        repeat with each_item in cur_selection -- iterate through
          if class of each_item is folder then -- do we have a folder?
            set theFiles to every file of each_item -- if so, get its contents
            repeat with each_file in theFiles -- iterate through them
              my rescaleand_save(eachfile) -- and process them
            end repeat
          else if class of each_item is document file then -- do we have a file selected?
            my rescaleand_save(eachitem) -- if so, process it
          end if
        end repeat
      end tell
    end run
    So the idea here is that the run handler gets the selection and works through the (potentially-numerous) items. For each selected item it checks whether its a folder or a file, if its a folder it gets all the files within and passes them to the rescaleandsave handler.
    Note that this is not recursive - it won't catch files within folders within folders - since it only looks at the top level of selected folders, but it wouldn't be hard to rework the script to handle that if that's what you need.

  • Windows and icons are black, menu items are not showing correctly

    Hello!
    Well just doing my normal routine today browsing the Internet, watching videos on vlc, my computer suddenly started to glitch. Icons were disappearing, Safari turned black.
    So i did a restart but the problem is still there. I cant even choose the user properly because the avatars are not there it's just all dark gray. Remembering where my user avatar is, i do a click and type in my password and I do and able to get in to my system but all windows menu items and icons are black.
    Basically what I'm saying is the system seems to be working fine except for that I can't see the icons and windows properly displayed.
    I've already tried to reinstall of Mavericks hoping that it's a software thing. You guys think it's a problem with the graphic processor?
    Any help or suggestions will be appreciated thank you.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It changes nothing, and therefore will not, in itself, solve your problem.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The procedure will help identify which such modifications you've installed, as well as certain other aspects of the configuration that may have a bearing on the problem. Don’t be alarmed by the apparent complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac. 
    These steps are to be taken while booted in “normal” mode, not in safe mode, if possible. If you’re now running in safe mode, reboot as usual before continuing. If you can only boot in safe mode, you can still use this procedure, but not all of it will work. Be sure to mention that in your reply, if you haven't already done so. 
    Below are instructions to enter UNIX shell commands. The commands are safe and do nothing but produce human-readable text output, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. I am not asking you to trust me. If you can't satisfy yourself that these instructions are safe, don't follow them.
    The commands will line-wrap or scroll in your browser, but each one is really just a single long line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it.
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. Step 1 should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click anywhere in the line of text below on this page to select it:
    { echo "Loaded kernel extensions:"; kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'; echo $'\n'"Loaded user agents:"; launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)|\.[0-9]+$/{print $3}'; echo $'\n'"Inserted libraries:"; launchctl getenv DYLD_INSERT_LIBRARIES; echo $'\n'"User cron tasks:"; crontab -l; echo $'\n'"System launchd configuration:"; cat /e*/lau*; echo $'\n'"User launchd configuration:"; cat .lau*; echo $'\n'"Login items:"; osascript -e 'tell application "System Events" to get name of login items' | sed $'s/, /\\\n/g'; echo $'\n'"Safari extensions:"; /usr/libexec/PlistBuddy -c Print L*/Saf*/*/E*.plist | awk -F'= ' '/Bundl/{print $2}' | sed 's/\..*$//;s/-[1-9]$//'; printf "\nRestricted user files: %s\n" $(find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \) | wc -l); echo $'\n'"Extrinsic loadable bundles:"; cd; find -L /S*/L*/E* {,/}L*/{Ad,Compon,Ex,In,Keyb,Mail/Bu,P*P,Qu,Scripti,Servi,Spo}* -type d -name Contents -prune | while read d; do /usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' "$d/Info.plist" | egrep -qv "^com\.apple\.[^x]|Accusys|ArcMSR|ATTO|HDPro|HighPoint|driver\.stex|hp-fax|JMicron|print|SoftRAID" && echo ${d%/Contents}; done; echo $'\n'"Unsigned shared libraries:"; find /u*/{,*/}lib -type f -exec sh -c 'file -b $1 | grep -qw shared && ! codesign -v $1' {} {} \; -print; echo; ls -A {,/}L*/{La,Priv,Sta}* L*/Fonts; } 2> /dev/null | open -ef
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    The command may take up to a few minutes to run, depending on how many files you have and the speed of the computer. A TextEdit window will open with the output. Post the contents of the TextEdit window (not the Terminal window) — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Remember that you must be logged in as an administrator for this step. Do as in Step 1 with this line:
    { echo "Loaded system agents:"; sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; echo $'\n'"Login hook:"; sudo defaults read com.apple.loginwindow LoginHook; echo $'\n'"Root cron tasks:"; sudo crontab -l; echo $'\n'"Log check:"; syslog -k Sender kernel -k Message CReq 'GPU |hfs: Ru|I/O e|find tok|n Cause: -|NVDA\(|pagin|timed? ?o' | tail | awk '/:/{$4=""; print}'; } 2> /dev/null | open -ef
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    You can then quit Terminal.
    To prevent confusion, I'll repeat: When you type your password in the Terminal window, you won't see what you're typing.
    Note: If you don’t have a login password, set one before taking Step 2. If that’s not possible, skip the step.
    Important: If any personal information, such as your name or email address, appears in the output of these commands, anonymize it before posting. Usually that won't be necessary.
    Remember, Steps 1 and 2 are all copy-and-paste — no typing, except your password. Also remember to post the output as text, not as a screenshot.
    Please post the contents of the TextEdit window, not the Terminal window.

Maybe you are looking for

  • Left Over Files after Uninstall

    IBM PC running Win 8.1 in Desktop Mode I uninstalled PSE 8 several years ago and installed PSE 9.  I now want to uninstall PSE 9 and replace it with PSE12.  In addition PSE 8 still appears as being installed and if I select Uninstall A message appear

  • How to generate a Code 39 barcode?

    We want to print our Service Order Numbers as a Code 39 bar-code. I read that you can print the bar-code in the report (as a graphic) by downloading a Code 39 barcode font. But first I have to convert our SO Number to a Code 39 barcode. Is there is a

  • Importing multiple proj (just name, start & end)

    Anyone know how to import a list of projects (just project name and maybe start and end date..no detail or activities necessary) into P6? I have my current list of project names in Excel. Thanks Peter

  • Artntek-help-urgent

    hi i need explanation of your code and also how you will fix this one.... i saw in ur forum threads..... tabbedpane.setUI(new javax.swing.plaf.basic.BasicTabbedPaneUI() { public Insets getContentBorderInsets(int tabPlacement) { return new Insets(0,0,

  • Naming Song Problems in Library

    i downloaded the new itunes 7.0.1.8 and i want to change the song info of some of the songs in my library and its not letting me change anything. its not letting me add an album name to it, but when i right click -> change info, it says the album nam