will88 Posted March 17, 2009 Share Posted March 17, 2009 is it possible to be able to right click on a .html file and have it set so you can edit it with an autoit script?Example:under "Edit with notepad++" or in replace of have an option to edit with an autoit script that I made to write in?Thanks Password-Keeper Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 17, 2009 Share Posted March 17, 2009 In short, yes. Search for file associations. Link to comment Share on other sites More sharing options...
will88 Posted March 17, 2009 Author Share Posted March 17, 2009 In short, yes. Search for file associations.thanks, i am able to right click on an .html file -> Edit and it will open the autoit script however still have the problem of detecting what file was right clicked on - any ideas? Password-Keeper Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 18, 2009 Share Posted March 18, 2009 That is passed by command line. Link to comment Share on other sites More sharing options...
martin Posted March 18, 2009 Share Posted March 18, 2009 thanks, i am able to right click on an .html file -> Edit and it will open the autoit script however still have the problem of detecting what file was right clicked on - any ideas? If as well as associating HTML with SciTE you add a new context menu item you could run a little exe which will get the file name as a parameter. The exe can do whatever with the filename and Shellexecute($CmdLine[1]) to edit it with SciTE. This script would add a new context menu item called "Edit with SciTE" but actually would run myprog.exe passing it the filename as a parameter. $KeyName = "AddForHtml" $ContextMenuName = "Edit with SciTE" $ProgramToRun = @SystemDir & "\myprog.exe";or whatever RegWrite("HKEY_CLASSES_ROOT\*\shell\" & $KeyName & "\command", '', 'REG_SZ', '"' & $ProgramToRun & '" "%1"') RegWrite("HKEY_CLASSES_ROOT\*\shell\" & $KeyName, '', 'REG_SZ', $ContextMenuName) MsgBox(0, "Done", $ProgramToRun & " option has been added to the file context menu") and the myprog.exe would be compiled from a script like this if $CmdLine[0] > 0 then ;maybe check that extension is HTML ;Do something with $CmdLine[1] ShellExecute($CmdLine[1]) endif Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
will88 Posted March 18, 2009 Author Share Posted March 18, 2009 If as well as associating HTML with SciTE you add a new context menu item you could run a little exe which will get the file name as a parameter. The exe can do whatever with the filename and Shellexecute($CmdLine[1]) to edit it with SciTE. This script would add a new context menu item called "Edit with SciTE" but actually would run myprog.exe passing it the filename as a parameter. $KeyName = "AddForHtml" $ContextMenuName = "Edit with SciTE" $ProgramToRun = @SystemDir & "\myprog.exe";or whatever RegWrite("HKEY_CLASSES_ROOT\*\shell\" & $KeyName & "\command", '', 'REG_SZ', '"' & $ProgramToRun & '" "%1"') RegWrite("HKEY_CLASSES_ROOT\*\shell\" & $KeyName, '', 'REG_SZ', $ContextMenuName) MsgBox(0, "Done", $ProgramToRun & " option has been added to the file context menu") and the myprog.exe would be compiled from a script like this if $CmdLine[0] > 0 then ;maybe check that extension is HTML ;Do something with $CmdLine[1] ShellExecute($CmdLine[1]) endif Thanks! Password-Keeper 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