Jump to content



Photo

_FileRun UDF


  • Please log in to reply
7 replies to this topic

#1 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 23 February 2007 - 08:19 PM

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 :whistle: .

In this example the window is “attached” to currently active window:

AutoIt         
#NoTrayIcon #include <FileRun_Incl.au3> ; Global $RunList = "";"<a href='http://www.autoitscript.com/autoit3/|notepad' class='bbc_url' title='' rel='norewrite'>http://www.autoitscript.com/autoit3/|notepad"</a> ;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 :lol:.
* 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.

Attached File  _FileRun.au3   8.6K   268 downloads - See the next attached zip file, it include example and the UDF.
Attached File  _FileRun.zip   3.64K   315 downloads
Attached File  _FileRun.zip   3.49K   319 downloads - Compatible with 3.3.0.0.

Edited by MrCreatoR, 22 March 2009 - 09:57 PM.

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image 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 ProgramPosted Image UDFs: 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 UDFPosted Image 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 DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team






#2 James

James

    jbrooksuk

  • MVPs
  • 9,468 posts

Posted 23 February 2007 - 09:20 PM

Hmm clever. I like how it attaches itself :whistle:

#3 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 10 April 2007 - 11:01 PM

Edit the first post, the function is modified "badly" :shocked: - see attached file at the first post to get full function (with example).
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image 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 ProgramPosted Image UDFs: 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 UDFPosted Image 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 DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#4 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 02 November 2007 - 11:14 AM

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 :)
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image 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 ProgramPosted Image UDFs: 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 UDFPosted Image 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 DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#5 colafrysen

colafrysen

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 264 posts

Posted 22 March 2009 - 12:34 PM

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

CODE
C:\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 by colafrysen, 22 March 2009 - 05:50 PM.

Use the helpfile, It´s one of the best exlusive features of Autoit.http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCsScience flies us to the moon. Religion flies us into buildings.http://bit.ly/cAMPZV

#6 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 22 March 2009 - 09:58 PM

i am having some errors

You can read about the changes between AutoIt versions here, i sure you are using the latest one :D.

P.S
Uploaded a fixed version (check the first post), for AutoIt 3.3.0.0.
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image 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 ProgramPosted Image UDFs: 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 UDFPosted Image 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 DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#7 colafrysen

colafrysen

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 264 posts

Posted 22 March 2009 - 10:24 PM

Thanks! Awesome UDF, appreciate all your work :D
Use the helpfile, It´s one of the best exlusive features of Autoit.http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCsScience flies us to the moon. Religion flies us into buildings.http://bit.ly/cAMPZV

#8 BinaryBrother

BinaryBrother

    Resourceful

  • Active Members
  • PipPipPipPipPipPip
  • 727 posts

Posted 23 March 2009 - 01:10 AM

And just to think, I get paranoid over bumping a thread that's over a couple months old... :D

Sorry, had to mention that... lol

Anyway, I can actually use this... I hadn't seen it around before, so I appreciate the bump! :o




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users