Last active
July 12, 2018 20:47
-
-
Save genius257/3d669eaa01285f221e35e79fc556ad10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#AutoIt3Wrapper_Res_File_Add=C:\Users\me\Desktop\88x31.jpg | |
#AutoIt3Wrapper_Res_Icon_Add=C:\Users\me\Desktop\logo.ico | |
#include <FileConstants.au3> | |
#include <MsgBoxConstants.au3> | |
#include 'WinAPIFiles.au3' | |
#include "File.au3" | |
; Script Start - Add your code below here | |
Local $bFileInstall = False ; Change to True and ammend the file paths accordingly. | |
; This will install the file C:\Test.bmp to the script location. | |
If $bFileInstall Then FileInstall("C:\Test.bmp", @ScriptDir & "\Test.bmp") | |
$sFile = FileRead(@ScriptFullPath) | |
$pattern = '(?(DEFINE) (?<string>(["''''])((?!\2).)*\2))(?:#include ((?&string))|FileInstall\(((?&string))|#AutoIt3Wrapper_Res_[a-zA-Z]+_Add=([^\n]+))' | |
$aResults = StringRegExp($sFile, $pattern, 3) | |
_ArrayDisplay($aResults) | |
Dim $aResult[0] | |
For $i=0 To UBound($aResults)-1 | |
If StringLen($aResults[$i])>0 Then | |
ReDim $aResult[UBound($aResult)+1] | |
$aResult[UBound($aResult)-1] = StringRegExpReplace($aResults[$i], '^(["''''])(.*)\1', "$2") | |
EndIf | |
Next | |
_ArrayDisplay($aResult) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment