Save as menu item

Been playing with a config.js folder level script for a couple of hours now without much sucess... can anyone help
I want to create a menu item in the FILE menu of acrobat reader x for a save as function that specifies a predefined filename and path
Can anyone help out, really stuck on this one and is desperate for tommorrow.
Many thank
Andy 

Hi Still struggling can anyone have a look at this script not sure where im going wrong...
app.addMenuItem({cName:"-", cParent:"File", cExec:" "});
app.addMenuItem({cName:"Sign with Click2Sign", cParent:"File", cExec:"doc.saveAs('/C/Click2Sign/ForConversion/export.pdf');"});
Thanks
Andy

Similar Messages

  • Implementing menu items and saving state in my app

    Hello
    I'm a new user to the forums, but have a little bit of java programming experience.
    currently i'm writing some business applications, one of which is a payroll system. The target audience is end-user bookkeepers so i am planning for a GUI front end.
    My first question relates to how programs save their state. for example, each month the bookkeeper will launch the program and add the next months payments, or he/she will open the program to fix a mistake. In general how do programs like word, excel (or anything) save and load files to work with? I was thinking about using XML. I thought i would load in an XML file containing all work so far, and then the user could save to it, which would add the new work.
    Question the second: A lot of gui java apps i use (like argo, symphony etc) have standard menus at the tops. Items like open, save, close, print etc. How are developers actually doing this? is there some premade classes i can just use in my programs as well that would be me this funtionality? This kindof relates to my first question about saving and opening. Further, it seems there are two GUI libraries to consider - either SWT or Swring. Eclipse plugins are written in SWT (from what i have heard). Can anybody recommend which API i should be using to create a GUI for my program?
    I think that's it for now. If anybody can provide me with advice i woudl be most grateful, as i'm at a bit of a standstill with my development.
    thanks.
    Edited by: minofifa on Oct 25, 2007 1:09 PM
    attempted to take topic off the watch list - sorry guys

    My first question relates to how programs save their state. for example, each month the bookkeeper
    will launch the program and add the next months payments, or he/she will open the program to fix a
    mistake. In general how do programs like word, excel (or anything) save and load files to work with? I
    was thinking about using XML. I thought i would load in an XML file containing all work so far, and then
    the user could save to it, which would add the new work. It sounds more like you are talking about saving the data instead of state--save in a database for mass and long term storage. Simple state info can be easily save in a database also or in a bean or text file.
    Question the second: A lot of gui java apps i use (like argo, symphony etc) have standard menus at
    the tops. Items like open, save, close, print etc. How are developers actually doing this? is there
    some premade classes i can just use in my programs as well that would be me this funtionality? This
    kindof relates to my first question about saving and opening. Further, it seems there are two GUI
    libraries to consider - either SWT or Swring. Eclipse plugins are written in SWT (from what i have
    heard). Can anybody recommend which API i should be using to create a GUI for my program?Maybe this is not what you are asking, but menu systems are implemented with Menu, MenuBar, MenuItem, etc objects in Java. The specifics of what happens when the individual menu items are selected are left up to the programmer.
    If you are looking for prebuilt menubars with code attached to perform common functions, then I do not know of any included in Java.

  • Start Menu items/shotcuts and Start Menu search ability on multiple workstations

    2/13/2014 our IT department began to receive complaints of missing programs. After investigation of a few users we were able to determine that the programs existed but all shortcuts and items from the start menu had been completely removed. In addition the
    searching feature of the start menu was not functional. This happened to about 90% of our environment and the catalyst seemed to be Windows updates or at least occurred after the auto reboot initiated by Windows Updates.  The only items visible in start
    menu were items added after the fact, internet explorer, magnifier, command prompt, and notepad. All other items, folders, and the ability to search installed programs or folders were completely removed. However all programs are present in the program files
    folders. THe start menu folder in program data was empty except for the aforementioned items. Additionally properties of start menu had all necessary checks in boxes such as search program files and folders etc. Also show hidden items and folders is enabled
    for many users so the items were not hidden but gone. And the biggest kicker of all was after a full domain investigation into the issues we found that the majority of our windows server platforms, primarily 2008, were also affected and system restore is unavailable.
    This conflicts with our idea that Windows Updates caused this since our servers get their updates on a manual initiated basis by their admins which we have not performed as of yet for this month. This caused me to begin looking at SCCM SCEP as all systems
    have System Center Endpoint Protection and received definition updates. Also accessing different user profiles or even a new profile did not make a difference, issue still present.
    Due to the enormous inconvenience we sent out a company wide email asking users to perform system restores to get us in a stable state. A system restore to the day before Windows updates (second Wednesday of every month configured by SCCM SCUP) restored
    the start menu items.
    On a multitude of machines IT performed troubleshooting and system restores recording the changes removed and added. We then, on a healthy machine, started to apply the windows updates and SCEP (antivirus) definitions 1 by 1 with out success of replicating
    the issue. Next we performed a system wide antivirus full scan and did not find any viruses. This is obviously not a system criticle issue bringing us down but is a huge concern for us in IT as it happened company wide and caused a large flux of tickets and
    some down time for non-technical users. We most definitely want to know the cause and after several days of investigation and troubleshooting Im turning to the Microsoft community for help.
    I know I categorized this as a Windows 7 issue and its affecting windows server 2008, 2003, and 7, but I did not see a forum for all windows platforms. Since the majority of affected users are Windows 7 I opened it here.
    So to summarize in a bulleted format:
    Issue: Wide spread issue affecting around 60-70 users and servers, all profiles, were all start menu items save one or two system defaults were removed. Additionally the searching feature for the start menu looks to be broken as programs
    exist in program files and are unsearchable from start menu. IT was also affected and I remain affected until I find the cause.
    Investigation and Troubleshooting:
    Start menu properties: nothing has changed and search options are enabled.
    Missing items are not hidden, hiding and unhiding does nothing and folder options show hidden files is checked.
    Program data start menu location is indeed empty as well as user app data start menu location
    No group policy's are in place altering start menu items and no group policy changes were made as of recent
    No SCCM packages pushed company wide in last month or pushed individually
    Windows Updates occurred on windows 7 machines only before the issue occurred and computers restarted and the issue surfaced
    System Center Endpoint Protection Antivirus updates and definitions deployed just before the occurrence with windows updates. SCEP def updates happen on all windows boxes to include servers
    Paint.exe was completely missing from system32 folder for some users machines to include my own
    System restore to that morning before restarts or previous day fixes the issue for windows 7 users
    No windows updates were initiated on any servers
    Servers were also affected with windows 7 machines
    About half the users affected had corrupt Microsoft Office 2013 Pro Plus Click to Run installations and for some the system restore did not fix this and we had to re-install office for around 10 users
    SCEP antivirus did not catch any viruses that could cause this, I performed MBAM scans on a handful of machines and didn't find anything either.
    Re-creating start menu shortcuts works
    Happened to two of our companies locations NH and MA, all part of the same domain but different LANS of course. Companies are interconnected by MPLS connection.
    I combed through SCCM to see if anything deployed and found nothing. Currently I have SCUP updates and SCEP updates disabled. I will post a list of Windows Updates that occurred when the issue occurred as well as the SCEP updates. I have read all the threads
    about this types of issues and tried all steps without success. Googling the issue also did not rear results.
    MichaelSpaulding

    Hi,
    I would like to suggest you try these steps to figure out what could be causing this problem.
    1. Run Troubleshooter
    Open the Search and Indexing troubleshooter
    http://windows.microsoft.com/en-US/windows7/Open-the-Search-and-Indexing-troubleshooter
    2. Create a new library and include fewer folders for test purpose. Now search for a file from that folder. See if it works.
    Create a new library
    http://windows.microsoft.com/en-US/windows7/Create-a-new-library
    3. Try to rebuild search indexing. Refer the steps from the following article.
    http://windows.microsoft.com/en-US/windows7/Change-advanced-indexing-options
    Also you may use the System File Checker tool (SFC.exe) to check the issue. The sfc /scannow command scans all protected system files and replaces incorrect versions with correct Microsoft versions.
    How to use the System File Checker tool to troubleshoot missing or corrupted system files on Windows Vista or on Windows 7
    http://support.microsoft.com/kb/929833
    In addition, you may refer to the following Microsoft TechNet article for the Windows Search related Group Policies.
    Group Policy for Windows Search
    http://technet.microsoft.com/en-us/library/cc732491(WS.10).aspx
    Hope it helps.
    Regards,
    Blair Deng
    Blair Deng
    TechNet Community Support

  • Alt+mnemonic key is not working properly for Menu Items

    Assume there are two menus , File Menu with mnemonic Alt+F
    and Save Menu with mnemonic Alt+S. File Menu contains the
    menu items like PageSetup with Mnemonic S. Save menu has
    the menu item Properties with Mnemonic P.
    Pressing Alt+F opens the File Menu which has the menu item
    PageSetup.Pressing S activates the PageSetup menu item.
    Similarly Pressing Alt+S opens the Save Menu which has the
    menu item Properties. Pressing P activates the Properties
    menu item acion. But Pressing Alt+P also activates the
    Properties menu item action(it is not the desired behaviour)
    Pressing Alt+Mnemonic key has to open only the Menus.It
    should not consider the menu items.
    STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
    1.Press Alt+F
    2.File Menu is invoked
    3.Press S
    4. Invokes the menu item action
    5. Press Alt+S
    6. Save menu is invoked
    7. Press P
    8. Invokes the menu item action
    9. Press Alt+P
    10. Invokes the menu item action
    EXPECTED VERSUS ACTUAL BEHAVIOR :
    Pressing of Alt+Mnemonic key invokes the menu and also menu
    item actions. If the same mnemonic is present in the Menu
    it is giving the priority to Menu only.Pressing of Alt key
    alone does not hiding the pull down menu
    Expected Result;
    Pressing of Alt+Mnemonic key has to list out the pull
    down menu only.It should not consider the menu items with
    the same mnemonic. If Alt key alone is pressed the pull
    down menu has to hide.
    REPRODUCIBILITY :
    This bug can be reproduced always.
    ---------- BEGIN SOURCE ----------
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class JavaBug extends JFrame
    public JavaBug()
    // Create menu bar
    JMenuBar menuBar = new JMenuBar(); // Create menu bar
    setJMenuBar(menuBar); // Add menu bar to window
    // Create first option on menuBar
    JMenu m1 = new JMenu("File");
    m1.setMnemonic('F');
    JMenuItem m1o1 = new JMenuItem("PageSetup");
    m1o1.setMnemonic('S');
    m1o1.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    System.out.println("File/PageSetup was selected");
    m1.add(m1o1);
    // Create second option on menuBar
    JMenu m2 = new JMenu("Save");
    m2.setMnemonic('S');
    JMenuItem m2o1 = new JMenuItem("Properties");
    m2o1.setMnemonic('P');
    m2o1.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    System.out.println("Save/Properties was selected");
    m2.add(m2o1);
    menuBar.add(m1);
    menuBar.add(m2);
    this.setTitle("Mnemonic Bugs");
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    setSize(400,250);
    show();
    public static void main(String[] args)
    JavaBug bug = new JavaBug();
    Suggestions welcomed
    punniya

    I tried your code, but didn't get your "bug" using jdk 1.3 on windows 2000 (at my school).
    Kind regards,
    Levi

  • Is there a way to change the list of menu items?

    I'm using Pages 5.5.2. The "save as" command has been deleted from the File menu and replaced with "Duplicate". Is there a way to restore "save as" as a menu item? I've discovered how you can do it by keystroke but miss it in the drop down menu.

    You will find that by pressing the option key when you are in the File menu, that Duplicate changes to Save As… .

  • 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... :-)

  • Keyboard shortcut for Sub Menu item Only works AFTER using it

    I have a Custom MOVE TO READ Mailbox shortcut. This is a SUB Menu item.. MESSAGE/Move To/READ FOLDER.
    It is really sweet to clear out my INBOX and save emails.
    So, what is ODD is that that menu has to be Clicked on and shown each time MAIL is run for that keyboard shortcut to work.
    I find that Odd and would love to have it work without having to "train" it everyday.

    Hello,
    Post in the iTunes Forum: http://discussions.apple.com/forum.jspa?forumID=789
    Check out the AppleScript Forum also: http://discussions.apple.com/forum.jspa?forumID=724
    Carolyn

  • How to customize or create new file menu items in Adobe Illustrator CS 6?

    Hi all,
    I have developed a script to perform some Custom action in Illustrator. I want to make this script run from a a File Menu Item so it can be invoked easily. Is there a way to customize Illustarator to add a new menu item or modify the existing menu tems functions. For example if the script needs to be invoked when the user click "Save" is there a way that could be done.
    Thanks

    Thanks Mark,
    When you mean by limited menu location does it mean a plugin could be added under "File" as options or AI only allows it under "Window" where you launch the plugins from normally.

  • Menu item appears multiple items

    I've created a menu item for the extension I'm working on; however, it is showing up 4 times in the Tools menu instead of just once. I've looked at various tutorials on the subject,but I can't seem to find what I've done incorrectly.
    VSCT File
    <?xml version="1.0" encoding="utf-8"?>
    <CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <Extern href="stdidcmd.h"/>
    <Extern href="vsshlids.h"/>
    <Commands package="guidTemplatePackPkg">
    <Groups>
    <Group guid="guidTemplatePackCmdSet" id="MyMenuGroup" priority="0x0600">
    <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>
    </Group>
    </Groups>
    <Buttons>
    <Button guid="guidTemplatePackCmdSet" id="cmdidMyCommand" priority="0x2000" type="Button">
    <Parent guid="guidSHLMainMenu" id="IDG_VS_CTXT_PROJECT_ADD_REFERENCES" />
    <CommandFlag>DynamicVisibility</CommandFlag>
    <CommandFlag>DefaultInvisible</CommandFlag>
    <Strings>
    <CommandName>AddSideWaffleProject</CommandName>
    <ButtonText>Add Template Reference (SideWaffle project)</ButtonText>
    </Strings>
    </Button>
    </Buttons>
    </Commands>
    <!-- SideWaffle Menu Options -->
    <Commands package="guidMenuOptionsPkg">
    <Groups>
    <Group guid="guidMenuOptionsCmdSet" id="SWMenuGroup" priority="0x0600">
    <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>
    </Group>
    </Groups>
    <Buttons>
    <Button guid="guidMenuOptionsCmdSet" id="cmdidOpenSWMenu" priority="0x0100" type="Button">
    <Parent guid="guidMenuOptionsCmdSet" id="SWMenuGroup" />
    <Icon guid="guidImages" id="bmpPic1" />
    <Strings>
    <ButtonText>SideWaffle Settings</ButtonText>
    </Strings>
    </Button>
    </Buttons>
    <Bitmaps>
    <Bitmap guid="guidImages" href="Resources\Images.png" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows"/>
    </Bitmaps>
    </Commands>
    <!-- End SideWaffle Menu Options -->
    <Symbols>
    <GuidSymbol name="guidTemplatePackPkg" value="{e6e2a48e-387d-4af2-9072-86a5276da6d4}" />
    <GuidSymbol name="guidTemplatePackCmdSet" value="{a94bef1a-053e-4066-a851-16e5f6c915f1}">
    <IDSymbol name="MyMenuGroup" value="0x1020" />
    <IDSymbol name="cmdidMyCommand" value="0x0100" />
    </GuidSymbol>
    <!-- SideWaffle Menu Options -->
    <GuidSymbol name="guidMenuOptionsPkg" value="{796B8CBC-3010-4A76-872B-56775129765F}" />
    <GuidSymbol name="guidMenuOptionsCmdSet" value="{13EE92AE-B8B5-4728-8AF6-F53D8DD9C391}">
    <IDSymbol name="SWMenuGroup" value="0x1020" />
    <IDSymbol name="cmdidOpenSWMenu" value="0x0100" />
    </GuidSymbol>
    <GuidSymbol name="guidImages" value="{900524C9-8677-4F84-AF97-3A1B5B45E3B2}" >
    <IDSymbol name="bmpPic1" value="1" />
    <IDSymbol name="bmpPic2" value="2" />
    <IDSymbol name="bmpPicSearch" value="3" />
    <IDSymbol name="bmpPicX" value="4" />
    <IDSymbol name="bmpPicArrows" value="5" />
    <IDSymbol name="bmpPicStrikethrough" value="6" />
    </GuidSymbol>
    <!-- End SideWaffle Menu Options -->
    </Symbols>
    </CommandTable>
    TemplatePackage.cs
    using EnvDTE;
    using EnvDTE80;
    using Microsoft.VisualStudio.Shell;
    using Microsoft.VisualStudio.Shell.Interop;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.Design;
    using System.Linq;
    using System.Runtime.InteropServices;
    using TemplatePack.Tooling;
    namespace TemplatePack
    [PackageRegistration(UseManagedResourcesOnly = true)]
    [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)]
    [ProvideMenuResource("Menus.ctmenu", 1)]
    [Guid(GuidList.guidTemplatePackPkgString)]
    [ProvideAutoLoad(UIContextGuids80.SolutionExists)]
    public sealed class TemplatePackPackage : Package
    private DTE2 _dte;
    protected override void Initialize()
    base.Initialize();
    _dte = GetService(typeof(DTE)) as DTE2;
    OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
    if (null != mcs)
    CommandID cmdId = new CommandID(GuidList.guidTemplatePackCmdSet, (int)PkgCmdIDList.cmdidMyCommand);
    OleMenuCommand button = new OleMenuCommand(ButtonClicked, cmdId);
    button.BeforeQueryStatus += button_BeforeQueryStatus;
    mcs.AddCommand(button);
    /*if(Environment.GetEnvironmentVariable("SideWaffleEnableDynamicTemplates") != null)*/{
    try {
    new DynamicTemplateBuilder().ProcessTemplates();
    catch (Exception ex) {
    // todo: replace with logging or something
    System.Windows.MessageBox.Show(ex.ToString());
    void button_BeforeQueryStatus(object sender, EventArgs e)
    var button = (OleMenuCommand)sender;
    var project = GetSelectedProjects().ElementAt(0);
    // TODO: We should only show this if the target project has the TemplateBuilder NuGet pkg installed
    // or something similar to that.
    button.Visible = true;
    // button.Visible = project.IsWebProject();
    private void ButtonClicked(object sender, EventArgs e)
    Project currentProject = GetSelectedProjects().ElementAt(0);
    var projects = _dte.Solution.GetAllProjects();
    var names = from p in projects
    where p != currentProject
    select p.Name;
    ProjectSelector selector = new ProjectSelector(names);
    bool? isSelected = selector.ShowDialog();
    if (isSelected.HasValue && isSelected.Value)
    // need to save everything because we will directly write to the project file in the creator
    _dte.ExecuteCommand("File.SaveAll");
    TemplateReferenceCreator creator = new TemplateReferenceCreator();
    var selectedProject = projects.First(p => p.Name == selector.SelectedProjectName);
    creator.AddTemplateReference(currentProject, selectedProject);
    public IEnumerable<Project> GetSelectedProjects()
    var items = (Array)_dte.ToolWindows.SolutionExplorer.SelectedItems;
    foreach (UIHierarchyItem selItem in items)
    var item = selItem.Object as Project;
    if (item != null)
    yield return item;
    [PackageRegistration(UseManagedResourcesOnly = true)]
    [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)]
    [ProvideMenuResource("Menus.ctmenu", 1)]
    [Guid(GuidList.guidMenuOptionsPkgString)]
    [ProvideAutoLoad(UIContextGuids80.SolutionExists)]
    public sealed class MenuOptionsPackage : Package
    // Overridden Package Implementation
    #region Package Members
    protected override void Initialize()
    base.Initialize();
    // Add our command handlers for menu (commands must exist in the .vsct file)
    OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
    if ( null != mcs )
    // Create the command for the menu item.
    CommandID menuCommandID = new CommandID(GuidList.guidMenuOptionsCmdSet, (int)PkgCmdIDList.SWMenuGroup);
    OleMenuCommand menuItem = new OleMenuCommand(MenuItemCallback, menuCommandID );
    mcs.AddCommand( menuItem );
    #endregion
    private void MenuItemCallback(object sender, EventArgs e)
    // Here is where our UI (i.e. user control) will go to do all the settings.
    var window = new SettingsForm();
    window.Show();
    PackageConstants.cs
    // PkgCmdID.cs
    // MUST match PkgCmdID.h
    using System;
    namespace TemplatePack
    static class GuidList
    public const string guidTemplatePackPkgString = "e6e2a48e-387d-4af2-9072-86a5276da6d4";
    public const string guidTemplatePackCmdSetString = "a94bef1a-053e-4066-a851-16e5f6c915f1";
    public static readonly Guid guidTemplatePackCmdSet = new Guid(guidTemplatePackCmdSetString);
    // SideWaffle Remote Source Settings
    public const string guidMenuOptionsPkgString = "796B8CBC-3010-4A76-872B-56775129765F";
    public const string guidMenuOptionsCmdSetString = "13EE92AE-B8B5-4728-8AF6-F53D8DD9C391";
    public static readonly Guid guidMenuOptionsCmdSet = new Guid(guidMenuOptionsCmdSetString);
    static class PkgCmdIDList
    public const uint cmdidMyCommand = 0x100;
    public const uint SWMenuGroup = 0x100;
    I just can't seem to figure out what I might be doing wrong. Any suggestions?

    Already ahead of you on that one. Here's where I'm at
    VSCT File
    <?xml version="1.0" encoding="utf-8"?>
    <CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <Extern href="stdidcmd.h"/>
    <Extern href="vsshlids.h"/>
    <Commands package="guidTemplatePackPkg">
    <Groups>
    <Group guid="guidTemplatePackCmdSet" id="MyMenuGroup" priority="0x0600">
    <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>
    </Group>
    <Group guid="guidMenuOptionsCmdSet" id="SWMenuGroup" priority="0x0500">
    <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>
    </Group>
    </Groups>
    <Buttons>
    <Button guid="guidMenuOptionsCmdSet" id="cmdiSWCommand" priority="0x1000" type="Button">
    <Parent guid="guidMenuOptionsCmdSet" id="SWMenuGroup" />
    <Icon guid="guidImages" id="bmpPic1" />
    <Strings>
    <CommandName>cmdidSWCommand</CommandName>
    <ButtonText>SideWaffle Settings</ButtonText>
    </Strings>
    </Button>
    <Button guid="guidTemplatePackCmdSet" id="cmdidMyCommand" priority="0x2000" type="Button">
    <Parent guid="guidSHLMainMenu" id="IDG_VS_CTXT_PROJECT_ADD_REFERENCES" />
    <CommandFlag>DynamicVisibility</CommandFlag>
    <CommandFlag>DefaultInvisible</CommandFlag>
    <Strings>
    <CommandName>AddSideWaffleProject</CommandName>
    <ButtonText>Add Template Reference (SideWaffle project)</ButtonText>
    </Strings>
    </Button>
    </Buttons>
    <Bitmaps>
    <Bitmap guid="guidImages" href="Resources\Images.png" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows"/>
    </Bitmaps>
    </Commands>
    <Symbols>
    <GuidSymbol name="guidTemplatePackPkg" value="{e6e2a48e-387d-4af2-9072-86a5276da6d4}" />
    <GuidSymbol name="guidTemplatePackCmdSet" value="{a94bef1a-053e-4066-a851-16e5f6c915f1}">
    <IDSymbol name="MyMenuGroup" value="0x1020" />
    <IDSymbol name="cmdidMyCommand" value="0x0100" />
    </GuidSymbol>
    <GuidSymbol name="guidMenuOptionsCmdSet" value="{13EE92AE-B8B5-4728-8AF6-F53D8DD9C391}">
    <IDSymbol name="SWMenuGroup" value="0x1010" />
    <IDSymbol name="cmdidSWCommand" value="0x0090" />
    </GuidSymbol>
    <GuidSymbol name="guidImages" value="{900524C9-8677-4F84-AF97-3A1B5B45E3B2}" >
    <IDSymbol name="bmpPic1" value="1" />
    <IDSymbol name="bmpPic2" value="2" />
    <IDSymbol name="bmpPicSearch" value="3" />
    <IDSymbol name="bmpPicX" value="4" />
    <IDSymbol name="bmpPicArrows" value="5" />
    <IDSymbol name="bmpPicStrikethrough" value="6" />
    </GuidSymbol>
    </Symbols>
    </CommandTable>
    PackageConstants.cs
    // PkgCmdID.cs
    // MUST match PkgCmdID.h
    using System;
    namespace TemplatePack
    static class GuidList
    public const string guidTemplatePackPkgString = "e6e2a48e-387d-4af2-9072-86a5276da6d4";
    public const string guidTemplatePackCmdSetString = "a94bef1a-053e-4066-a851-16e5f6c915f1";
    public static readonly Guid guidTemplatePackCmdSet = new Guid(guidTemplatePackCmdSetString);
    // SideWaffle Remote Source Settings
    public const string guidMenuOptionsPkgString = "796B8CBC-3010-4A76-872B-56775129765F";
    public const string guidMenuOptionsCmdSetString = "13EE92AE-B8B5-4728-8AF6-F53D8DD9C391";
    public static readonly Guid guidMenuOptionsCmdSet = new Guid(guidMenuOptionsCmdSetString);
    static class PkgCmdIDList
    public const uint cmdidMyCommand = 0x100;
    public const uint cmdidSWCommand = 0x101;
    TemplatePackPackage.cs
    using System;
    using System.Linq;
    using System.Diagnostics;
    using System.Globalization;
    using System.Runtime.InteropServices;
    using System.ComponentModel.Design;
    using Microsoft.Win32;
    using Microsoft.VisualStudio;
    using Microsoft.VisualStudio.Shell.Interop;
    using Microsoft.VisualStudio.OLE.Interop;
    using Microsoft.VisualStudio.Shell;
    using System.Collections.Generic;
    using EnvDTE;
    using EnvDTE80;
    using LigerShark.Templates.DynamicBuilder;
    using TemplatePack.Tooling;
    namespace TemplatePack
    [PackageRegistration(UseManagedResourcesOnly = true)]
    [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)]
    [ProvideMenuResource("Menus.ctmenu", 1)]
    [Guid(GuidList.guidTemplatePackPkgString)]
    [ProvideAutoLoad(UIContextGuids80.SolutionExists)]
    public sealed class TemplatePackPackage : Package
    private DTE2 _dte;
    protected override void Initialize()
    base.Initialize();
    _dte = GetService(typeof(DTE)) as DTE2;
    OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
    if (null != mcs)
    CommandID cmdId = new CommandID(GuidList.guidTemplatePackCmdSet, (int)PkgCmdIDList.cmdidMyCommand);
    OleMenuCommand button = new OleMenuCommand(ButtonClicked, cmdId);
    button.BeforeQueryStatus += button_BeforeQueryStatus;
    mcs.AddCommand(button);
    CommandID menuCommandID = new CommandID(GuidList.guidMenuOptionsCmdSet, (int)PkgCmdIDList.cmdidSWCommand);
    MenuCommand menuItem = new MenuCommand(MenuItemCallback, menuCommandID);
    mcs.AddCommand(menuItem);
    /*if(Environment.GetEnvironmentVariable("SideWaffleEnableDynamicTemplates") != null)*/{
    try {
    new DynamicTemplateBuilder().ProcessTemplates();
    catch (Exception ex) {
    // todo: replace with logging or something
    System.Windows.MessageBox.Show(ex.ToString());
    void button_BeforeQueryStatus(object sender, EventArgs e)
    var button = (OleMenuCommand)sender;
    var project = GetSelectedProjects().ElementAt(0);
    // TODO: We should only show this if the target project has the TemplateBuilder NuGet pkg installed
    // or something similar to that.
    button.Visible = true;
    // button.Visible = project.IsWebProject();
    private void ButtonClicked(object sender, EventArgs e)
    Project currentProject = GetSelectedProjects().ElementAt(0);
    var projects = _dte.Solution.GetAllProjects();
    var names = from p in projects
    where p != currentProject
    select p.Name;
    ProjectSelector selector = new ProjectSelector(names);
    bool? isSelected = selector.ShowDialog();
    if (isSelected.HasValue && isSelected.Value)
    // need to save everything because we will directly write to the project file in the creator
    _dte.ExecuteCommand("File.SaveAll");
    TemplateReferenceCreator creator = new TemplateReferenceCreator();
    var selectedProject = projects.First(p => p.Name == selector.SelectedProjectName);
    creator.AddTemplateReference(currentProject, selectedProject);
    public IEnumerable<Project> GetSelectedProjects()
    var items = (Array)_dte.ToolWindows.SolutionExplorer.SelectedItems;
    foreach (UIHierarchyItem selItem in items)
    var item = selItem.Object as Project;
    if (item != null)
    yield return item;
    private void MenuItemCallback(object sender, EventArgs e)
    // Here is where our UI (i.e. user control) will go to do all the settings.
    var window = new SettingsForm();
    window.Show();
    Once I removed the second package it no longer appeared multiple times in the Tools menu; however, when I click the button the SettingsForm is not being opened.

  • How to change the menu item text

    Hi,
    in cj20n transaction, for one of menu item i have to change the text of the item. How can i change the text.
    Regards,
    Ram

    HI,
    First try to find the exists available for that transaction and find menu exit in that exist. Once you find the exits create project in tcode cmod then go to that menu exit.
    Just double click on that exit, it will show the existing text, if you want to change the text then click on change mode, it will asks for package, you have to provide package then give the text whatever you want and save it and activate it.
    The new text will be available in your transaction.
    Regards,
    Venu

  • VBA Code for Excel Add-in Menu Items

    Howdy.
    Every month my team needs to execute the same process on a couple hundred documents. It's time consuming and inefficient to say the least, so I'm looking for a means by which to call a couple of the menu items on the Excel BPC Add-Ins menu via VBA. Specifically, Park'n'Go; Expand All; and Send and Refresh Schedules.
    Basically what happens is this:
    Open File
    Set Park'n'Go to Live
    Expand All
    Refresh and Send Schedules
    Set Park'n'Go to Offline
    Save
    Exit
    Loop
    I know how to loop through the files and directories, I just don't know the commands for the functions from the menu via code. The macro recorder can't help me, and I've even tried to mimic a user's actions by using mouse coordinates and clicks, but that doesn't work b/c it doesn't allow for the necessary load time from BPC.
    Any help would be extremely appreciated.

    Hey Jeff,
    here are some vba commands that may help you.
    Open a certain file: (you can assign "Path" to a button or range)
    Dim Path As String
    Path = Application.GetOpenFilename("All Files (.),.")
    Opening the Park 'n Go dialog box:
    Application.Run ("MNU_ETOOLS_PARKNGO")
    Expand All:
    Application.Run ("MNU_ETOOLS_EXPAND")
    Sending data and refreshing the workbook:
    Application.Run ("MNU_eSUBMIT_REFSCHEDULE_BOOK_REFRESH")
    Saving a file OFFLINE:
    Dim FName As String
    FName = InputBox(prompt:="Please enter filename")
    If FName = "" Then
    Application.DisplayAlerts = False
    ActiveWorkbook.Close
    Else
    ActiveWorkbook.SaveAs Filename:="c:\" & FName
    ActiveWorkbook.Close
    End If
    Application.DisplayAlerts = True
    Hope, that will help you
    Karsten

  • Can't get menu items to be displayed

    Hello,
    The answer to my problem is probably quite simple but I can't see it and its driving me crazy, basically I can't get my menu items to be displayed like file, create and search. But what ever I add to the file menu items like open or save isn't displayed and I don't know why I think it may have to do with the action listeners but I'm not sure how or why or it could be because of where it is placed in the code, but again I'm not sure. Any help will be appreciated thanks!
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.GeneralPath;
    import java.awt.geom.*;
    import java.awt.image.*;
    class CharacterEditor2 extends JFrame implements ActionListener
      private Container pane;
      public JPanel sidebar = new JPanel();
    public JPanel library;
      public JPanel interface1 = new JPanel();
      private JPanel interface2 = new JPanel();
      public JPanel cards = new JPanel();
      public CardLayout layout = new CardLayout();
      public JButton headb = new JButton ("Head");
      public JButton bodyb = new JButton ("Body");
      private JButton legsb = new JButton ("Legs");
      private JButton handsb = new JButton ("Hands");
      private JButton freeHandb = new JButton ("Free Hand");
      private JButton eyesb = new JButton ("Eyes");
      private JButton mouthb = new JButton ("Mouth");
      private JButton earsb = new JButton ("Ears");
      private JButton noseb = new JButton ("Nose");
      private JButton hairb = new JButton ("Hair");
      public CharacterEditor2()
        addWindowListener(new WindowAdapter(){
          public void windowClosing(WindowEvent e){
            System.exit(0);}});
        pane = getContentPane();
        setTitle("JHH");
        library = new library();
        interface2.setBackground(Color.red);
        interface1.setBackground(Color.green);
        Panel p1 = new Panel();
        p1.setLayout(new GridLayout(2,0));
        sidebar.setLayout(new GridLayout(3,0));
        addButton(sidebar, headb);
        addButton(sidebar, bodyb);
        addButton(sidebar, legsb);
        addButton(sidebar, handsb);
        addButton(sidebar, freeHandb);
        addButton(sidebar, eyesb);
        addButton(sidebar, mouthb);
        addButton(sidebar, earsb);
        addButton(sidebar, noseb);
        addButton(sidebar, hairb);
        JMenuBar menuBar = new JMenuBar();
        this.setJMenuBar(menuBar);
        JMenu fileMenu = new JMenu("File");
        menuBar.add(fileMenu);
        JMenuItem openMI = new JMenuItem("Open");
        openMI.addActionListener(this);
        fileMenu.add(openMI);
        JMenuItem saveMI = new JMenuItem("Save");
        saveMI.addActionListener(this);
        fileMenu.add(saveMI);
        JMenuItem closeMI = new JMenuItem("Close");
        closeMI.addActionListener(this);
        fileMenu.add(closeMI);
        fileMenu.addSeparator();
        JMenuItem exitMI = new JMenuItem("Exit");
        exitMI.addActionListener(this);
        fileMenu.add(exitMI);
        JMenu createMenu = new JMenu("Create");
        menuBar.add(createMenu);
        JMenuItem entryMI = new JMenuItem("Entry");
        entryMI.addActionListener(this);
        createMenu.add(entryMI);
        JMenu searchMenu = new JMenu("Search");
        menuBar.add(searchMenu);
        JMenuItem searchCharacterMI = new JMenuItem("Search by Character");
        searchCharacterMI.addActionListener(this);
        searchMenu.add(searchCharacterMI);
        JMenuItem searchBackgroundMI = new JMenuItem("Search by Background");
        searchBackgroundMI.addActionListener(this);
        searchMenu.add(searchBackgroundMI);
        JMenuItem searchMovieMI = new JMenuItem("Search by Movie.");
        searchMovieMI.addActionListener(this);
        searchMenu.add(searchMovieMI);
        p1.add(sidebar);
        p1.add(interface1);
        p1.add(interface2);
        p1.add(library);
       //add scroller to library
       JScrollPane scroller =
             new JScrollPane(library,    
                       JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                       JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
         scroller.setPreferredSize(new Dimension(100,100));
         p1.add(scroller, library);
        pane.add(p1, BorderLayout.CENTER);
      private void addButton (Container c, JButton b)
        b.addActionListener(this);
        c.add(b);
      public void actionPerformed(java.awt.event.ActionEvent evt)
    ((CardLayout)library.getLayout()).show(library, evt.getActionCommand());
      public static void main(String[] args)
        CharacterEditor2 window = new CharacterEditor2();
        window.setTitle("Character Editor");
        window.setSize(900, 700);
        window.setVisible(true);
    }

    It's because you are mixing Swing components and AWT components. The menu items are actually displayed, but they are hidden behind the panel with all the buttons. Things will work fine if you change the following line:
    Panel p1 = new Panel();  // This is an AWT panel. Use this instead:
    JPanel p1 = new JPanel();Read more about it here:
    http://java.sun.com/products/jfc/tsc/articles/mixing/

  • Error when selecting detailed navigation menu item

    Hi,
    Usually on selection of a menu item from detailed navigation an iview appears which contains values from an R/3 system, but now when i select any item for the detailed navigation i get a download pop up window
    which  ask me to save the page. When i press the save button the download stops.
    Is this a problem with the SAP GUI ? please give me a solution ?
    Regards
    Christina Dove

    hi
    GUI Properties
    Description -
    > New ECC 6.0
    AppServer -
    > here application Server
    SysID       -
    > here System ID
    System Number -
    >
    SAP System  ---> R/3

  • Removing right-click menu items

    When I highlight a group of text in a web page and right click the text, There are 4 options in the menu for converting the text to PDF.
    How do I remove these options from the menu?

    Why doesn't adobe have an option within settings to remove shell/context/menu items?
    For those who don't want the extra crap cluttering up their menus...
    In winXP
    -(with IE closed), click 'start', 'control panel', 'internet options'.
    -Click on the 'programs' tab.
    -click 'manage ad-ons'
    -Find the Browser Helper Object called 'AcroIEToolbarHelper Class',
    --highlight it and click 'disable'.
    -Click 'ok' to close the manage ad-ons window, click 'ok' to close the internet options window.
    You still need to remove the items from the right-click menu.
    (*everyone puts a disclaimer so here goes. If you are scared to edit the registry...don't. Create a restore point, don't touch any other entries except the ones listed.)
    -click 'start', 'run', type 'regedit', click 'ok'
    -go to this entry "[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt]"
    -delete the 8 Adobe 'convert....' entries. (or just the ones you want gone).
    (You can export them if you want, just highlight, right-click, export, and save them somewhere, but it's not necessary. If you want them back just go to 'internet options' in 'control panel' and 'enable' the Browser Helper Object again. If you re-enable it, the next time you start IE the registry entries and right-click items are replaced.)

  • How to make "show all menu items" permanent?

    Does anyone know a preference setting in CS4 to make "show all menu items" enabled all the time?  I use certain menu items regularly which require the extra step of chosing "show all menu items" before they will appear in the menu.  I would love to change this irriating setting.  I have searched preferences over and over and I know there must be one that addresses it, but I cannot spot it.

    The essentials workspace should show all the menu items:
    Window>Workspace>Essentials.
    If you want a different layout or to add panels to the workspace, rearrange/add
    to the workspace (panels) and then save a new workspace under a different name.
    Window>Workspace>Save Workspace.
    MTSTUNER

Maybe you are looking for

  • TS1574 Hi, I dont have sound on my imac. The options in sound are greyed out and there is nothing in the output list

    itunes and you tube are not working.  There is no sound. When I am in itunes and play a song, the song does not start. I checked system preferences, sound.  There is no output options and the input options are greyed out. Does anyone know how to fix

  • Bounce Message processing question

    When a message from our Notes mail server gets sent to the Ironport for outbound delivery, and the recipient email address is incorrect, does the delivery failures message generated by the Ironport to our Notes user bypass outbound content filters an

  • How to find standard function modules for IDOCs

    Hi, Can anyone tell me is there any way to find the standard function module for IDOC. I have checked BD60 but it's not available. For example  Idoc type WPUBON01 and I need to know the function module. Can anyone tell me the way out. Secondly, if an

  • Yahoo mail sign-in - Freeze with 'ask me everytime' cookie setting.

    3.6.13 win7-64 * Default Plug-in * Shockwave Flash 10.1 r102 * Next Generation Java Plug-in 1.6.0_23 for Mozilla browsers * NPRuntime Script Plug-in Library for Java(TM) Deploy * 4.0.51204.0 All plugs disabled - Problem continues. All Extensions disa

  • Require few tips for my project

    Im creating a web-application, using JSP, for my final yr project here is wht i have in my application.... im creating a cookie to store user info as he login to my application and deleting cookies as the user logs out. also im checking whether the c