Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Strip functions from an Au3 script file.

$
0
0
I'm working on some additions for SciTE Jump and for some reason I can't seem to remove functions from the script file. Run the code below and you will see functions that only have one set of ( and ) work, otherwise if fails. I tried inverting the "greediness" but to no avail. Thanks.

[ autoit ]      
#include <Constants.au3> Local $sData = FileRead(@ScriptFullPath) $sData = StringRegExpReplace($sData, "([""']).*?\1", "''") ; Strip string literals. By PhoenixXL. MsgBox($MB_SYSTEMMODAL, '', StringRegExpReplace($sData, '\w+\([^)]*\)', ''), 5) ; <<< This shouldn't be here. Nested functions don't work. ClipPut(StringRegExpReplace($sData, '\w+\([^)]*\)', '')) StringLeft(StringInStr(StringMid('', '', 0), 'Blah', 0), 2) ; << This shouldn't be here either. Func Example($iType, _         $iValue = Default)     StringMid('', 10)     Example(10, 100)     Return True EndFunc   ;==>Example

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>