Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "LuaInline.au3"
- _Lua_StartUp() ; == Initialisiert Lua, Shutdown automatisch bei AutoIt-Ende
- Global $sLua = _
- " folder = 'C:\\Users\\BugFix\\Downloads\\hosta\\'" & _
- " path1 = folder .. 'hosts'" & _
- " path2 = folder .. 'hosts_1'" & _
- " hFile = io.open(path1)" & _
- " sHosts1 = hFile:read('*a')" & _
- " hFile:close()" & _
- " hFile = io.open(path2)" & _
- " sHosts2 = hFile:read('*a')" & _
- " hFile:close()" & _
- " sAdd, sExists = '', ''" & _
- " for k, v in sHosts2:gmatch('\n(%d+%.%d+%.%d+%.%d+)%s+([^#\n%s]+)') do" & _
- " if not sHosts1:find(v) then" & _
- " sAdd = sAdd..k..' '..v..'\n'" & _
- " end" & _
- " end" & _
- " hFile = io.open('C:\\Users\\BugFix\\Downloads\\hosta\\AddHosts', 'w+')" & _
- " hFile:write(sAdd)" & _
- " hFile:close()"
- _Lua_DoString($sLua)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement