MrCreatoR Posted February 23, 2007 Share Posted February 23, 2007 (edited) Hi!This function is going to replace a standard FileRun window, that can be found from “Start -> Run...”.This function have a $hWnd_Parent parameter, that allow to “attach” the window to another parent window (by WinGetHandle())....The function is allmoust like the original window, but there is just few excludes - the help button do nothing (if someone can show me how can i make it do something, it will be great) now it does , and this is a custom window that can be used with your apps .In this example the window is “attached” to currently active window:#NoTrayIcon #include <FileRun_Incl.au3> ; Global $RunList = "";"http://www.autoitscript.com/autoit3/|notepad" ;We read the current FileRun list For $i = 97 To 122 $RegCurrentVal = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU", Chr($i)) If StringRegExp(StringRight($RegCurrentVal, 2), "\\[0-9]") Then $RegCurrentVal = StringTrimRight($RegCurrentVal, 2) $RunList &= $RegCurrentVal & "|" Next If StringRight($RunList, 1) = "|" Then StringTrimRight($RunList, 1) $RegReadRunList = RegRead("HKEY_CURRENT_USER\Software\_FileRunApp", "") If $RegReadRunList <> "" And StringInStr($RegReadRunList, "|") Then $RunList = $RegReadRunList ;Now we show the dialog $Current_hWnd = WinGetHandle(WinGetTitle("")) $RunList = _FileRun_Dialog($RunList, "FileRun program App", -1, $Current_hWnd) If Not @error And $RunList <> $RegReadRunList Then RegWrite("HKEY_CURRENT_USER\Software\_FileRunApp", "", "REG_SZ", $RunList)EDIT (22.03.2009):; The UDF is rewrited for latest AutoIt version (3.3.0.0)EDIT (11.04.2007):; Changed example.; Now there is no need for #include <GuiConstants.au3> and Opt's funcs, all this is local now.; If as $hWnd param passed a title, then it converted to a Hwnd.; Changed the font name - now it's Georgia.; Now more effective the process of executing app/file, if you type only spaces, then button "Run" will be disabled. And any spaces at end/start of typed/inserted filename will be stripped.; When you Browse to choose file, the initial dir is the last used (opened), not the @SystemDir.; If you press Cancel button, then @error set to 1, and returned empty string ("").EDIT (02.11.2007):Totaly rewrited;* The main UDF is now in seperated Include file.* Help button from the title bar now work as it should .* If was called a "file selection window" ('Browse' button), now when we close the FileRun Dialog parent window not minimized as before.* No more hotkeys set, instead of this i used $BS_DEFPUSHBUTTON style.* Now when execute program, the working dir is set to program's dir.* Shortcats now executed properly.* And more fixes._FileRun.au3 - See the next attached zip file, it include example and the UDF._FileRun.zip_FileRun.zip - Compatible with 3.3.0.0. Edited March 22, 2009 by MrCreatoR 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...
James Posted February 23, 2007 Share Posted February 23, 2007 Hmm clever. I like how it attaches itself Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
MrCreatoR Posted April 10, 2007 Author Share Posted April 10, 2007 Edit the first post, the function is modified "badly" - see attached file at the first post to get full function (with 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...
MrCreatoR Posted November 2, 2007 Author Share Posted November 2, 2007 EDIT (02.11.2007):Totaly rewrited;* The main UDF is now in seperated Include file .* Help button from the title bar now work as it should.* If was called a "file selection window" ('Browse' button), now when we close the FileRun Dialog parent window not minimized as before.* No more hotkeys set, instead of this i used $BS_DEFPUSHBUTTON style.* Now when execute program, the working dir is set to program's dir.* Shortcats now executed properly.* And more fixes.See the first post 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...
colafrysen Posted March 22, 2009 Share Posted March 22, 2009 (edited) Hi, i know it's been like 2 years since you last posted anything on this UDF, but i am having some errors. So first, the Include GuiCombo.au3, where do I get it? And second, all the RunErrorsFatal Errors? what are the and why are they? I assume that the last error (ERROR: _GUICtrlComboAutoComplete(): undefined function) Is because of the missing Include CODEC:\Documents and Settings\%username%\Desktop\FileRun_Incl.au3(2,10) : ERROR: can't open include file <GuiCombo.au3> #include <GuiCombo.au3> ~~~~~~~~~^ C:\Documents and Settings\%username%\Desktop\FileRun_Incl.au3(33,49) : ERROR: Opt() called with illegal argument 1: "RunErrorsFatal" Local $OldOptErrFatal = Opt("RunErrorsFatal", 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\%username%\Desktop\FileRun_Incl.au3(129,39) : ERROR: Opt() called with illegal argument 1: "RunErrorsFatal" Opt("RunErrorsFatal", $OldOptErrFatal) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\%username%\Desktop\FileRun_Incl.au3(138,42) : ERROR: Opt() called with illegal argument 1: "RunErrorsFatal" Local $Old_REF = Opt("RunErrorsFatal", 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\%username%\Desktop\FileRun_Incl.au3(141,32) : ERROR: Opt() called with illegal argument 1: "RunErrorsFatal" Opt("RunErrorsFatal", $Old_REF) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\%username%\Desktop\FileRun_Incl.au3(125,48) : ERROR: _GUICtrlComboAutoComplete(): undefined function. _GUICtrlComboAutoComplete($ComboBox, $LastRun) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\%username%\Desktop\_FileRun_Example.au3 - 6 error(s), 0 warning(s) Thanks in advance! Edited March 22, 2009 by colafrysen [font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size] Link to comment Share on other sites More sharing options...
MrCreatoR Posted March 22, 2009 Author Share Posted March 22, 2009 i am having some errorsYou can read about the changes between AutoIt versions here, i sure you are using the latest one .P.SUploaded a fixed version (check the first post), for AutoIt 3.3.0.0. 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...
colafrysen Posted March 22, 2009 Share Posted March 22, 2009 Thanks! Awesome UDF, appreciate all your work [font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size] Link to comment Share on other sites More sharing options...
BinaryBrother Posted March 23, 2009 Share Posted March 23, 2009 And just to think, I get paranoid over bumping a thread that's over a couple months old... Sorry, had to mention that... lol Anyway, I can actually use this... I hadn't seen it around before, so I appreciate the bump! SIGNATURE_0X800007D NOT FOUND 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