Jump to content

AutoIt v3.3.9.12 Beta


Jon
 Share

Recommended Posts

Well Run returns a PID, which can be useful for some people.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • Developers

Would be a big script-breaker as it is used a lot and ShellExecute doesn't support STDxxx redirection.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Regarding the issue with manifests marked as 'requireAdministrator':  this is not a problem specific to AutoIt scripts.  Run() will of course fail for any process with that in it.

Asking for the capability to use Run() on scripts that need to self-elevate isn't helpful as

1) The PID returned from Run() will not be valid once the script reruns itself as it did in 3.3.8.1 and earlier

2) Redirecting I/O of a script that effectively terminates when it reruns itself isn't useful.  Plus, you can't redirect I/O on an elevated process without being elevated yourself.

Also, ShellExecuteEx does in fact return Process ID #'s in many cases, and this is one of the arguments me and Valik got into - AutoIt could be written to return a Process ID # from ShellExecute, but the fact that it doesn't always return PIDs is why Valik decided not to add it. This 'sometimes PID' situation could be worked around with something like a -1 return when ShellExecute is successful but a PID # wasn't obtained..

Currently you can use ShellExecuteEx examples on the forum to get PIDs, however

Link to comment
Share on other sites

  • Administrators

Also, ShellExecuteEx does in fact return Process ID #'s in many cases, and this is one of the arguments me and Valik got into - AutoIt could be written to return a Process ID # from ShellExecute, but the fact that it doesn't always return PIDs is why Valik decided not to add it. This 'sometimes PID' situation could be worked around with something like a -1 return when ShellExecute is successful but a PID # wasn't obtained..

 

I've added the code to return a PID. I don't quite follow the logic of not adding it as ShellExecuteWait() would also fail for the situation described - but we still have that.

Link to comment
Share on other sites

I've added the code to return a PID. I don't quite follow the logic of not adding it as ShellExecuteWait() would also fail for the situation described - but we still have that.

Sweet!  That might be a script-breaking change as some people might rely on ShellExecute() returning 0 or 1 (it gives that specific value in the help).  You could always just return it in @extended if you care about that..

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...