Modify

Opened 16 years ago

Closed 14 years ago

#1719 closed Feature Request (Rejected)

Expose the internal function that creates the $CmdLine array?

Reported by: c0deWorm Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: cmdline parsing Cc:

Description

I have several scripts that use Run extensively, and look for processes using specific command line options (such as robocopy processes running against a particular source). While I know checking my command lines with regular expressions is possible, it would be helpful if we had a function we could call that would return an array exactly like $CmdLine from a passed string.

Since the code is already there, presumably you could just expose that code as a function, and use it for actual $CmdLine parsing as well, meaning little or no duplicate code.

Thanks for your time.

Attachments (0)

Change History (3)

comment:1 by J-Paul Mesnage, 16 years ago

Owner: set to Jon
Status: newassigned

comment:2 by guinness, 14 years ago

Your request can be achieved by using the following example.

#include <Array.au3>
#include <WinAPIEx.au3> ; Download from http://www.autoitscript.com/forum/topic/98712-winapiex-udf/

Local $aArray

$aArray = _WinAPI_CommandLineToArgv(_WinAPI_GetProcessCommandLine(@AutoItPID))
_ArrayDisplay($aArray, '$CmdLine Example')

comment:3 by trancexx, 14 years ago

Resolution: Rejected
Status: assignedclosed

Current solution is reckoned to be sufficient.
For "function approach" consult different UDFs, as guinness did.

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.