rank1
Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору cpp.lua Код: function cpp_exe() local ABSRoot = "C:/NewAbs/Scripts/" local itt = 0; local progText = ""; local incText = ""; while itt < editor.LineCount do --iterate through each line local line = editor:GetLine(itt); if line then local x = string.gfind(line,'#include%s*"([%w%p]*)"')() if x then x = string.gsub(x,'\\','/') file = io.open(ABSRoot..x, "r") if file ~= nil then incTxt = ""; incText = file:read("*all") progText = progText .. incText; file:close(); print ("Included: " ..x); else os.msgbox("Не удалось открыть '"..ABSRoot..x.."'","Ошибка!",48); print ("*** Skipped: " ..x); progText = progText ..[[ '============================================================================= '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ' MISSING FILE ]]..ABSRoot..x.."\n"..[[ '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! '============================================================================= ]] end else progText = progText .. line; end end itt = itt + 1; end scite.Open(""); editor:SetText(progText) end cpp_exe(); | Данный код внедрен в форум с помощью скрипта vladvro | Всего записей: 18 | Зарегистр. 06-01-2008 | Отправлено: 15:51 16-05-2008 | Исправлено: rank1, 15:56 16-05-2008 |
|