Mat Posted March 3, 2009 Share Posted March 3, 2009 For the this script, lets just say i want to make a script that goes in the right click menu for all files - and can be run so the file fills a variable in the script: $file.$file = _________________________________________________________________ FileCopy ( "$file", "c:\Program files\", 1 )there are two factors in this - help in either will be great!!this site might just solve my context menu problemsHow-to-geekbut how can i get it to work with the variables?thanks Mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
Varian Posted March 3, 2009 Share Posted March 3, 2009 Example to add the registry entries: ;next line is not essential, but adds custom description, otherwise Context will be say "YourProgram" RegWrite("HKCR\*\shell\YourProgram", "", 'REG_SZ', 'Your Program Desciption') RegWrite("HKCR\*\shell\YourProgram\Command", "", 'REG_SZ', '"Your Proagram Path\YourProgram.exe" "%1"')oÝ÷ ØLZ^¡ûay.¬ú趦IÊâ¦Ö®¶sdbb33c´6ÖDÆæU³ÒÒFVâW@¢b33c¶fÆRÒb33c´6ÖDÆæU³Ð·VæV66W76'Â'WBW6ær÷W"W×ÆP¤bfÆT6÷gV÷C²b33c¶fÆRgV÷C²ÂgV÷C¶3¢b3#µ&öw&ÒfÆW2b3#²gV÷C²ÂFVà ´fÆV6÷7V66VVFVBæB&WGW&æVBÂ÷"G'VP ×6t&÷3"Âb33µ7V66W72b33²Âb33c´fÆRfײgV÷C²v27V66W76gVÆÇgV÷C²fײ5$ÄbfײgV÷C²6÷VBFògV÷C²fײ&öw&ÔfÆW4F"Â2¤VÇ6P ´fÆV6÷fÆVBæB&WGW&æVBÂ÷"fÇ6P ×6t&÷3"Âb33´fÇW&Rb33²Âb33c´fÆRfײgV÷C²6÷VÆBæ÷B&RgV÷C²fײ5$ÄbfײgV÷C²6÷VBFògV÷C²fײ&öw&ÔfÆW4F"Â2¤VæD` Link to comment Share on other sites More sharing options...
Mat Posted March 3, 2009 Author Share Posted March 3, 2009 Thanks alot that works great - any chance of an explanation into how it works? how does the CMD fit in? also ;uneccessary, but using your example so i could simply write If FileCopy ("$cmdline[1]", "c:\Program files\", 1) Then etc. Mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
Varian Posted March 3, 2009 Share Posted March 3, 2009 Sorry for the delay. Yes, $CmdLine[1] holds the full path of the item being clicked. But You do not want to to put in in any kind of quotes within AutoIT..unless you are trying to pass the literal string to the command. Your Line should read: If FileCopy ($CmdLine[1], "c:\Program files\", 1) Then Link to comment Share on other sites More sharing options...
Mat Posted March 3, 2009 Author Share Posted March 3, 2009 No worries, i was eating dinner I understand that now, thanks alot AutoIt Project Listing 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