CFrasnelly Posted June 13, 2007 Share Posted June 13, 2007 I am trying to right click an item on the start menu and select "Remove from list" programmatically via autoit to remove a particular item. I have a script that does the following: - sends ctrl + esc (to open the start menu) - sends ArrowDown 3 times (to select the item) and I'm stuck here! When I try to send a right mouse click the start menu closes. I'm guessing this is because I need to move the mouse to the currently selected control BUT I can't find a way to 1) determine the current highlighted control and 2) tell the mouse to move there. Any help would be appreciated!!! Link to comment Share on other sites More sharing options...
Rick Posted June 13, 2007 Share Posted June 13, 2007 (edited) RegWrite("HKEY_CLASSES_ROOT\Applications\" & @ScriptName, "NoStartPage","REG_SZ","") Will tell windows to never put @ScriptName it in the frequently used list. (a logoff & logon may be needed if its already there) Edited June 13, 2007 by Rick Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
MisterBates Posted June 13, 2007 Share Posted June 13, 2007 I am trying to right click an item on the start menu and select "Remove from list" programmatically via autoit to remove a particular item. I have a script that does the following:- sends ctrl + esc (to open the start menu)- sends ArrowDown 3 times (to select the item) and I'm stuck here! When I try to send a right mouse click the start menu closes. I'm guessing this is because I need to move the mouse to the currently selected control BUT I can't find a way to 1) determine the current highlighted control and 2) tell the mouse to move there.Any help would be appreciated!!!To do it this way, you'd need to use PaulIAs Auto3Lib UDFs (taskbar and menu). But there's an easier way (if you're running windows and know the name of the item you want to remove).Start menu items are shortcut files stored under @StartMenuDir and/or @StartMenuCommonDir. Search for/delete the shortcut file (will be called "the menu item name.lnk"), and the item will be deleted from the start menu - without the user ever seeing the start menu being opened. [u]MisterBates[/u]_____________________________________________________Suspend/Resume Windows ScreensaverWatchWindows - Window watcher/loggerUDF: Click systray menu/submenu itemsUDF: Outlook Express Folder/Message handling (+ example code)HowTo: Multiple icons in one compiled script Link to comment Share on other sites More sharing options...
CFrasnelly Posted June 14, 2007 Author Share Posted June 14, 2007 To do it this way, you'd need to use PaulIAs Auto3Lib UDFs (taskbar and menu). But there's an easier way (if you're running windows and know the name of the item you want to remove).Start menu items are shortcut files stored under @StartMenuDir and/or @StartMenuCommonDir. Search for/delete the shortcut file (will be called "the menu item name.lnk"), and the item will be deleted from the start menu - without the user ever seeing the start menu being opened.Thanks for the Auto3Lib... I think that will help me. The "pinned" items do not show as a .lnk anywhere and I haven't been able to find them in the registry so as far as I can tell AutoIt (or something like it) is my only option for removing these items!!! Link to comment Share on other sites More sharing options...
MisterBates Posted June 15, 2007 Share Posted June 15, 2007 Thanks for the Auto3Lib... I think that will help me. The "pinned" items do not show as a .lnk anywhere and I haven't been able to find them in the registry so as far as I can tell AutoIt (or something like it) is my only option for removing these items!!! For pinning/unpinning items on the Start menu, take a look at Hey, Scripting Guy! Can I pin a file to the Start Menu by using a script?. After which you'll probably want to know how to create and manipulate objects in AutoIt - gafrost's excellent post on using the scripting.dictionary object should provide what you need. [u]MisterBates[/u]_____________________________________________________Suspend/Resume Windows ScreensaverWatchWindows - Window watcher/loggerUDF: Click systray menu/submenu itemsUDF: Outlook Express Folder/Message handling (+ example code)HowTo: Multiple icons in one compiled script Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now