wraithdu Posted May 12, 2008 Share Posted May 12, 2008 There doesn't seem to be a way in AutoIt to use ShellExecute() with NULL as the verb. This is useful to execute the default verb for a filetype. Behavior is to execute the default verb, if none specified then it executes 'open', and if 'open' does not exist it executes the first verb in the list in the registry. Maybe this is already changed in Beta? If not, it should be an option. Currently you have to use DllCall() if you want to do it this way. Link to comment Share on other sites More sharing options...
martin Posted May 12, 2008 Share Posted May 12, 2008 There doesn't seem to be a way in AutoIt to use ShellExecute() with NULL as the verb. This is useful to execute the default verb for a filetype. Behavior is to execute the default verb, if none specified then it executes 'open', and if 'open' does not exist it executes the first verb in the list in the registry.Maybe this is already changed in Beta? If not, it should be an option. Currently you have to use DllCall() if you want to do it this way.Can you give an example of where you find you need to use a dllCall() because you can't use ShellExecute? 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...
wraithdu Posted May 12, 2008 Author Share Posted May 12, 2008 (edited) I've written an app (in AutoIt of course) that allows a user to create portable file associations. It does so by using relative paths and the HKCU\Software\Classes... filetype registry keys. It creates its own associations based on the user's configuration and uses its own naming scheme to create the shell\command etc. keys. This basically overrides the default filetype associations. Since the app uses its own naming scheme to keep track of everything, the default verbs are missing. So any app that calls a default verb such as 'open' or 'edit' will fail. I realize that for the most part this is just something a user will have to live with, since most apps will specify 'open' or 'edit' for the verb.But if apps/scripts are coded using NULL as the verb, then the filetype will open as long as some association exists in the registry. I just figured since NULL is a valid parameter according to MSDN, that it should be an option in AutoIt.My app is here if you want to look at it - http://portableapps.com/node/13145BTW, a little tangent here, what is the most correct way to pass a NULL parameter to DllCall()? So far I've successfully used"int", ""and"<anything>", Chr(0)I've also seen"int", 0but I don't like that since 0 is a valid int in some functions. Edited May 12, 2008 by wraithdu Link to comment Share on other sites More sharing options...
ProgAndy Posted May 12, 2008 Share Posted May 12, 2008 I would use a null pointer: "ptr","" *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...
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