Jump to content



Photo

StringSplit $CmdLineRaw


  • Please log in to reply
12 replies to this topic

#1 guinness

guinness

    guinness

  • MVPs
  • 10,391 posts

Posted 17 October 2010 - 11:43 PM

I found _ParseCMDLine() by Prog@ndy which is great if you are manually adding $CmdLine parameters like -p "FILENAME" but it doesn't work if you are passing a "RAW COMMANDLINE" of files that have been dropped on the EXE file.

So how do I split this data into an Array when blank space and '""' are contained in the string? Thanks for the advice, I have searched the forum with very little discussion on $CmdLineRaw.

$Example = 'C:\Users\Test\Desktop\PROGRAMNAME\settings.ini "C:\Users\Test\Desktop\PROGRAMNAME\PROGRAMNAME TESTING.au3" "C:\Users\Test\Desktop\PROGRAMNAME\PROGRAMNAME V1.0.au3" "C:\Users\Test\Desktop\PROGRAMNAME\Script Changes.txt"'

Edited by guinness, 18 October 2010 - 12:16 AM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013








#2 Ascend4nt

Ascend4nt

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,073 posts

Posted 18 October 2010 - 12:29 AM

This is the PCRE I use for separating parameters.

There is a look-behind and look-ahead assertion to prevent grabbing quotes, while also allowing for cases where there are empty quotes (""):

Local $aParsedArray=StringRegExp($sStringToParse,'((?<=\s"|^")[^"]+(?=")|[^\s"]+)',3)


The only thing I'd do beforehand is expand any environment strings like %windir%. All you'd need for that is to just set the "ExpandEnvStrings" option, assign the string to itself (looks dumb, but accomplishes the needed expansion), then reset the option.

#3 guinness

guinness

    guinness

  • MVPs
  • 10,391 posts

Posted 18 October 2010 - 09:31 AM

Another one to put in the Functions directory ;) Thanks for helping. Plus cheers for the heads up on "ExpandEnvStrings", I tend to use _WinAPI_ExpandEnvironmentStrings() in my programs.

I am trying to make my example of WM_COPYDATA a little more simplistic!

Edited by guinness, 18 October 2010 - 09:36 AM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#4 Juvigy

Juvigy

    Experimental Drugs Abuser

  • Active Members
  • PipPipPipPipPipPip
  • 1,243 posts

Posted 18 October 2010 - 09:33 AM

Shouldnt $CmdLine array contain what you need?

#5 guinness

guinness

    guinness

  • MVPs
  • 10,391 posts

Posted 18 October 2010 - 09:40 AM

Not if you're using WM_COPYDATA, which for some reason can't send Arrays! Before I was doing the following (See Below) in the WM_COPYDATA Function, but not very efficient, as the second process has to do all the work, whereas now the first instance can parse the Commandline data.

If IsArray($CmdLine) Then     Local $TEMPmi_String = ""     For $A = 1 To $CmdLine[0]         $TEMPmi_String &= $CmdLine[$A] & "|"     Next     $CmdLineRaw = StringTrimRight($TEMPmi_String, 1) EndIf

Edited by guinness, 18 October 2010 - 09:41 AM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#6 guinness

guinness

    guinness

  • MVPs
  • 10,391 posts

Posted 18 October 2010 - 09:53 AM

Thanks to Ascend4nt for the StringRegExp() syntax and the Authors of WinAPI.au3 for the "ExpandEnvironmentStringsW" API Function.

Function:
AutoIt         
; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 ; #FUNCTION# ========================================================================================================= ; Name...........: _CmdLineRaw() ; Description ...: Creates an Array of a $CmdLineRaw string. ; Syntax.........: _CmdLineRaw($sString) ; Parameters ....: $cString - $CmdLineRaw string. ; Requirement(s).: v3.2.12.1 or higher ; Return values .: Success - Returns an array, by default the first element ($aArray[0]) contains the number of strings returned, the remaining elements ($aArray[1], $aArray[2], etc.) contain the seperated strings. ;                  Failure -  Return an array with the count as 1 ($aArray[0]) and the full string ($aArray[1]). ; Author ........: guinness with additional from Ascend4nt who designed the SRE. ; Example........; Yes ; Remarks........; Include WinAPI.au3 for _WinAPI_ExpandEnvironmentStrings() ;===================================================================================================================== Func _CmdLineRaw($sString)     Local $aError[2] = [1, $sString]     If StringStripWS($sString, 8) = '' Then         Return SetError(1, 0, $aError)     EndIf     Local $aReturn = StringRegExp('"' & @ScriptFullPath & '"' & ' ' & _WinAPI_ExpandEnvironmentStrings($sString), '((?<=s"|^")[^"]+(?=")|[^s"]+)', 3)     If @error Then         Return SetError(1, 0, $aError)     EndIf     $aReturn[0] = UBound($aReturn, 1) - 1     Return $aReturn EndFunc   ;==>_CmdLineRaw

Example use of Function:
#include <Array.au3> Local $sCmdLine = '%WINDIR%PROGRAMNAMEsettings.ini "C:UsersTestDesktopPROGRAMNAMEPROGRAMNAME TESTING.au3" "C:UsersTestDesktopPROGRAMNAMEPROGRAMNAME V1.0.au3" "C:UsersTestDesktopPROGRAMNAMEScript Changes.txt"' Local $aArray = _CmdLineRaw($sCmdLine) _ArrayDisplay($aArray, '_CmdLineRaw()')

Edited by guinness, 06 October 2012 - 02:29 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#7 Gigglestick

Gigglestick

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 501 posts

Posted 05 May 2011 - 07:10 PM

When running that last example (compiled and dropping a couple dozen files/folders on it), and adding an _ArrayDisplay($CmdLine) after yours, the only difference I see is that yours is a zero-based array and the built in $CmdLine is 1-based with a count.
My UDFs: ExitCodes

#8 guinness

guinness

    guinness

  • MVPs
  • 10,391 posts

Posted 05 May 2011 - 07:21 PM

The reason why I needed this was because I couldn't send an Array using WM_COPYDATA and therefore used to do it with $CmdLine >> http://www.autoitscript.com/forum/topic/121034-stringsplit-cmdlineraw/page__view__findpost__p__840763 which is of course slow, so sending $CmdLineRaw and then parsing seemed a more logical solution.

Edited by guinness, 05 May 2011 - 07:22 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#9 Gigglestick

Gigglestick

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 501 posts

Posted 05 May 2011 - 10:08 PM

I get that you can't pass an array using WM_COPYDATA, but you've created a function that turns a command-line formatted string into an array. Basically, you've made a function that does the same as the built in $CmdLine, but allows the input to be something other than the actual command line given to the script. That's great if you plan on creating your own list of files in the same format as a command line and then converting it to an array, but doesn't help you at all in the goal of passing a bar ("|") delimited string to WM_COPYDATA. You'll still have to convert the output of your function to a string.
My UDFs: ExitCodes

#10 guinness

guinness

    guinness

  • MVPs
  • 10,391 posts

Posted 05 May 2011 - 10:25 PM

You've lost me sorry! How would you do it when it comes to WM_COPYDATA? Because I just send $CmdLineRaw (which is normally a list of just files) and then use _CmdLineRaw()

If you are talking about the Example I gave ($CmdLineRaw = '%WINDIR%\PROGRAMNAME\settings.ini "C:\Users\Test\Desktop\PROGRAMNAME\PROGRAMNAME TESTING.au3" "C:\Users\Test\Desktop\PROGRAMNAME\PROGRAMNAME V1.0.au3" "C:\Users\Test\Desktop\PROGRAMNAME\Script Changes.txt"') then I just used this as an Example of course for standard use I would use $CmdLine and then use a For...Loop.

I should probably tidy up this post >> WM_COPYDATA

Edited by guinness, 06 May 2011 - 08:56 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#11 Gigglestick

Gigglestick

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 501 posts

Posted 06 May 2011 - 01:43 AM

I'm just saying your _CmdLineRaw() function still spits out an array, which is not what you seem to need for WM_COPYDATA. You've recreated the built-in $CmdLine functionality.

You still have to loop through an array to create whatever you need to pass to WM_COPYDATA, whether it's using the built in $CmdLine or your own array... unless I've completely missed the point, which is not altogether impossible. Don't get me wrong, it's a nice function, and I may someday find a use for it in my own scripts, but I don't think it accomplishes what you're asking in relation to WM_COPYDATA.

Edited by Gigglestick, 06 May 2011 - 01:44 AM.

My UDFs: ExitCodes

#12 guinness

guinness

    guinness

  • MVPs
  • 10,391 posts

Posted 06 May 2011 - 08:54 PM

I have updated the Example >> WM_COPYDATA, you can see I have removed some code. I hope this makes sense now :unsure:

Edited by guinness, 06 May 2011 - 08:55 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_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()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_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()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#13 Gigglestick

Gigglestick

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 501 posts

Posted 09 May 2011 - 10:14 PM

You were trying to recreate the $CmdLine funcionality to process the $CmdLineRaw passed to another instance of the script.

Yep. Got it. Nicely done.
My UDFs: ExitCodes




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users