n9mfk9 Posted December 23, 2005 Share Posted December 23, 2005 hi I have a program I went autoit to run I have made a shortcut to the program in the target type an target it shows {BA126ADB-21166-11D1-B1D0-00805FC1270E} is there any way i can us that in a script or can somone them me the commands so i can use it thanks Link to comment Share on other sites More sharing options...
themax90 Posted December 23, 2005 Share Posted December 23, 2005 Check RUN in the helpfile. Local $Shortcut = "{BA126ADB-21166-11D1-B1D0-00805FC1270E}" Run($Shortcut) Run -------------------------------------------------------------------------------- Runs an external program. Run ( "filename" [, "workingdir" [, flag]] ) Parameters filename The full name of the executable (EXE, BAT, COM, or PIF) to run. workingdir [optional] The working directory. flag [optional] The "show" flag of the executed program: @SW_HIDE = Hidden window @SW_MINIMIZE = Minimized window @SW_MAXIMIZE = Maximized window Return Value Success: The PID of the process that was launched. Failure: Depends on RunErrorsFatal; see Remarks. Remarks To run DOS (console) commands, try RunWait(@ComSpec & " /c " & 'commandName', "", @SW_HIDE) WorkingDir is NOT the same as the path to the executable! For example, running a file from a floppy disk: Bad: Run("myProg.exe", "A:") ; Wrong! This will most likely fail! Good: Run("A:\myProg.exe") ; Correct because FULL path to executable was given After running the requested program the script continues. To pause execution of the script until the spawned program has finished use the RunWait function instead. By default the script will terminate with a fatal error if the Run function fails. To set @error to 1 as an indication of failure, see AutoItSetOption. Related RunAsSet, RunErrorsFatal (Option), RunWait Example Run("Notepad.exe", "", @SW_MAXIMIZE) Please ALWAYS consult the help file! AutoIt Smith Link to comment Share on other sites More sharing options...
LxP Posted December 24, 2005 Share Posted December 24, 2005 As {BA126ADB-21166-11D1-B1D0-00805FC1270E} is not an executable file (and probably not even a file at all) I doubt that Run() will work. If it doesn't then I would suggest grabbing SlimShady's _ShellExecute UDF and using it instead of Run():; Paste the code from that post into your script and then: _ShellExecute('{BA126ADB-21166-11D1-B1D0-00805FC1270E}') 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