FireFox Posted December 27, 2008 Share Posted December 27, 2008 (edited) Hi, Ive done contextmenu and script for get path of selected file Opt("TrayMenuMode", 1) If $CmdLine[0] <> 0 Then TrayTip("GetPath <d3montools>", "Path : " & $CmdLine[1] & @CRLF & "Copied to Cliboard !", 1, 4) ClipPut($CmdLine[1]) Sleep(1500) Exit EndIf I tried to get all files selected : Opt("TrayMenuMode", 1) If $CmdLine[0] <> 0 Then Local $Path2 For $Path = $CmdLine[0] To $CmdLine[$CmdLine[0]] $Path2 = $Path2 & $Path & @CRLF Next TrayTip("GetPath <d3montools>", "Path : " & $Path2 & @CRLF & "Copied to Cliboard !", 1, 4) ClipPut($Path2) Sleep(1500) Exit EndIf Edit : Script for add GetPath to contextmenu or delete GetPath to contextmenu $choice = InputBox("GetPath", "1 = Add GetPath to ContextMenu" & @CRLF & "2 = Delete GetPath to ContextMenu", "1", "", 250, 125) _GetPath($choice) Func _GetPath($param = 1) If $param = 1 Then $file = FileOpenDialog("Browse for GetPath.au3", @ScriptDir, "AutoIt Script (*.au3)", 1 + 2, "GetPath.au3") If Not @error Then RegWrite("HKEY_CLASSES_ROOT\*\shell") RegWrite("HKEY_CLASSES_ROOT\*\shell\GetPath") RegWrite("HKEY_CLASSES_ROOT\*\shell\GetPath\command") RegWrite("HKEY_CLASSES_ROOT\*\shell\GetPath\command", "", "REG_SZ", $file & " %1") Return 1 EndIf ElseIf $param = 2 Then RegDelete("HKEY_CLASSES_ROOT\*\shell\GetPath") If Not @error Then MsgBox(64, "Context Menu", "Context menu successfully deleted !") Return 1 Else MsgBox(16, "Context Menu", "Error while deleting context menu !") Return 0 EndIf EndIf Return 0 EndFunc ;==>_GetPath But that doesn't work... Thanks for anyhelp Cheers, FireFox. Edited December 27, 2008 by FireFox Link to comment Share on other sites More sharing options...
TurionAltec Posted December 27, 2008 Share Posted December 27, 2008 Are you trying to make a context item that copies the path of a selected file in explorer to the clipboard?Have you looked into the toolbar StExBar? Link to comment Share on other sites More sharing options...
FireFox Posted December 27, 2008 Author Share Posted December 27, 2008 @TurionAltec AutoIt please... Cheers, FireFox. Link to comment Share on other sites More sharing options...
MrCreatoR Posted December 27, 2008 Share Posted December 27, 2008 (edited) For $Path = $CmdLine[0] To $CmdLine[$CmdLine[0]] $Path2 = $Path2 & $Path & @CRLF NextDo you know how loops like this one really working? Read about it in the help file... If $CmdLine[0] <> 0 Then Local $sPathes For $i = 1 To $CmdLine[0] ;From first to the last, since [0] is the total count of command lines passed $sPathes &= $CmdLine[$i] & @CRLF Next TrayTip("GetPath <d3montools>", "Path : " & $sPathes & @CRLF & "Copied to Cliboard !", 1, 4) ClipPut($sPathes) Sleep(1500) Exit EndIf Edited December 27, 2008 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...
ProgAndy Posted December 27, 2008 Share Posted December 27, 2008 (edited) Explorer opens multiple instances of your app when selectiong muktiple files. So the loop won't help to put multiple paths to clip. Edited December 27, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
FireFox Posted December 27, 2008 Author Share Posted December 27, 2008 @MrCreatoR Yeah sure I know how to do this, done it too fast... @ProgAndy Right, this doesn't work... Anyway its not very usefull to get more than one path Cheers, FireFox. Link to comment Share on other sites More sharing options...
MrCreatoR Posted December 27, 2008 Share Posted December 27, 2008 Explorer opens multiple instances of your app when selectiong muktiple files. So the loop won't help to put multiple paths to clip.Sorry, i can't confirm this behaviour. My system is WinXP SP2 with FAT32 File System - And it's working for me, the clipboard contains all file pathes that was dropped on the exe ... 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 December 27, 2008 Share Posted December 27, 2008 Oh i see, it's the problem when you select few files and call menu item... but the application does not executed at all, i puted only MsgBox, but it's not showing So how then other apps, like Audio players handle this issue? I can select more than one file and add it to the playlist, and it's working... 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...
FireFox Posted December 27, 2008 Author Share Posted December 27, 2008 (edited) @MrCreator Have you tested my script to create simple contextmenu ? Working for selected one file... Cheers, FireFox. Edited December 27, 2008 by FireFox Link to comment Share on other sites More sharing options...
MrCreatoR Posted December 28, 2008 Share Posted December 28, 2008 Have you tested my script to create simple contextmenu ?No, we can create it from «Folder Settings» Working for selected one fileI know. I wondering how other apps can recieve more than one file... 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...
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