ken82m Posted December 8, 2008 Share Posted December 8, 2008 okay I have this plugin on my the main menu withing mce, and I know what file it opens. I'm trying to figure out how to create a script that can instruct the the mce interface (ehshell.exe) to open that file. I can open it using this command if that helps C:\WINDOWS\ehome\ehshell.exe /url:"C:\Program Files\MCE\My Movies\Movies.htm" Thanks, Kenny "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
MrCreatoR Posted December 8, 2008 Share Posted December 8, 2008 Hm, the question is not so clear (to me?). What you mean by «instruct the the mce interface (ehshell.exe)to open that file»?P.SIt's not accepting command line to open file as well as web page? i.e: ShellExecute('C:\WINDOWS\ehome\ehshell.exe', '/file:"C:\Program Files\MCE\My Movies\Movies.htm"') Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
ken82m Posted December 8, 2008 Author Share Posted December 8, 2008 just have to change the switch from file to urlShellExecute('C:\WINDOWS\ehome\ehshell.exe', '/url:"C:\Program Files\MCE\My Movies\Movies.htm"')well what I meant was, the command above launches mce and tells it to open my movieswhich is the htm file.If I'm already in MCE and I want to launch it then I click on the item on the main menu. That causes the same action MCE opens "Movies.htm"I'm trying to find a way to send a request that does the same thing as the main menu.Tells the existing MCE Window/Process to open "Movies.htm"Maybe in the form of some WIN API command idonoThanks,Kenny "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
MrCreatoR Posted December 8, 2008 Share Posted December 8, 2008 You can click on the menu like this: #include <GuiMenu.au3> Run(@WindowsDir & "\Notepad.exe") WinWaitActive("[REGEXPCLASS:Notepad.*]") $hWnd = WinGetHandle("[REGEXPCLASS:Notepad.*]") $hMenu = _GUICtrlMenu_GetMenu($hWnd) $hHelp = _GUICtrlMenu_GetItemSubMenu($hMenu, 4) ;Help menu $iItemID = _GUICtrlMenu_GetItemID($hHelp, 2) ;Third item (zero-based) ;Show the [About "Notepad"] window _GUICtrlMenu_ClickMenuItem($hWnd, $iItemID, 0) Func _GUICtrlMenu_ClickMenuItem($hWnd, $iItemID, $iWaitEndMessage=0) Local $sMsgFuncName = "PostMessage" If $iWaitEndMessage Then $sMsgFuncName = "SendMessage" DllCall("user32.dll", "int", $sMsgFuncName, "hwnd", $hWnd, "int", 0x0111, "int", $iItemID, "int", 0) ;$WM_COMMAND = 0x0111 EndFunc Just find out what index is the needed menu and the index of the item in it, and change this example. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
ken82m Posted December 8, 2008 Author Share Posted December 8, 2008 (edited) I think I got it, I found the MCL for my movies which can also call the plug in. And it calls it within the active window, or launches a new window if needed. But I've noticed the windows explorer goes screwy, my start menu won't come up. Any ideas? Here's what I have: Opt("TrayIconHide", 1) Global $MyMovies HotKeySet("^+!{F12}z", "LaunchMyMovies") If ProcessExists("ehshell.exe") Then $Run = ProcessExists("ehshell.exe") Else $Run = Run(@WindowsDir & "\ehome\ehshell.exe") If $Run = 0 Then Exit EndIf $MyMovies = RegRead("HKLM\SOFTWARE\My Movies", "InstallPath") If StringRight($MyMovies, 1) <> "\" Then $MyMovies = $MyMovies & "\" $MyMovies = $MyMovies & "MyMovies.mcl" If Not FileExists($MyMovies) Then Exit While ProcessExists($Run) Sleep(100) WEnd Func LaunchMyMovies() ShellExecute($MyMovies, "", @ScriptDir, "open") EndFunc Edited December 8, 2008 by ken82m "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." 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