Jump to content
Sign in to follow this  
Pavel

Another ShellExecute UDF

Recommended Posts

This is my first UDF :D

ShellExecute function syntax :

ShellExecute($hwnd,$lpOperation,$lpFile,$lpParameters,$lpDirectory,$nShowCmd)

Example:

#include "shellexecute.au3"
ShellExecute(0,"open","C:\Windows\Media\ding.wav","","",@SW_SHOWNORMAL)

In this udf defined constants of return codes, like a SE_ERR_NOASSOC

$lpOperation types you can find in include file

shellexecute.au3

Edited by Pavel

Share this post


Link to post
Share on other sites

Hi,

i like it, i was just looking for that kind of script!

thanks and keep it up!

Arjan

Edited by arjan staring

Share this post


Link to post
Share on other sites

Global Const $ERROR_FILE_NOT_FOUND  = '2L'   ;ERROR_FILE_NOT_FOUND The specified file was not found. 
Global Const $ERROR_PATH_NOT_FOUND  = '3L'   ;ERROR_PATH_NOT_FOUND The specified path was not found. 
Global Const $ERROR_BAD_FORMAT      = '11L'  ;ERROR_BAD_FORMAT The .exe file is invalid (non-Microsoft Win32 .exe or error in .exe image).

L just means its a LONG. There is no need for that in autoit.

Also arent the @SW_* the same as your $SW_* ?

Share this post


Link to post
Share on other sites

Global Const $ERROR_FILE_NOT_FOUND  = '2L' ;ERROR_FILE_NOT_FOUND The specified file was not found. 
Global Const $ERROR_PATH_NOT_FOUND  = '3L' ;ERROR_PATH_NOT_FOUND The specified path was not found. 
Global Const $ERROR_BAD_FORMAT      = '11L';ERROR_BAD_FORMAT The .exe file is invalid (non-Microsoft Win32 .exe or error in .exe image).

L just means its a LONG. There is no need for that in autoit.

I don't know it , thanks

Corrected :D

Also arent the @SW_* the same as your $SW_* ?

I know :D Edited by Pavel

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...