Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Здесь вынесены регулярные выражения обработки файлов справки
- Func _AutoIt3_functions_Code(ByRef $sExampleData)
- ; функции UDF
- $sExampleData=StringRegExpReplace($sExampleData, '<span class="S15">([\w]+?)</span>', '<a class="le" href="UDFs3.chm::/html/libfunctions/\1.htm"><span class="S15">\1</span></a>')
- ; функции
- $sExampleData=StringRegExpReplace($sExampleData, '<span class="S4">([\w]+?)</span>', '<a class="le" href="\1.htm"><span class="S4">\1</span></a>')
- $sExampleData=StringReplace($sExampleData, 'href="Opt.htm">', 'href="AutoItSetOption.htm">')
- ; исключение для UDPStartup, UDPShutdown
- $sExampleData=StringReplace($sExampleData, '<a class="le" href="UDPStartup.htm"><span class="S4">UDPStartup</span></a>', '<a class="le" href="TCPStartup.htm"><span class="S4">UDPStartup</span></a>')
- $sExampleData=StringReplace($sExampleData, '<a class="le" href="UDPShutdown.htm"><span class="S4">UDPShutdown</span></a>', '<a class="le" href="TCPShutdown.htm"><span class="S4">UDPShutdown</span></a>')
- ; макросы
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S6">(@[^<]+)</span>', '<a class="le" href="../macros.htm#\1"><span class="S6">\1</span></a>')
- ; операторы
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S8">((?:[+^*/=&-]|>|<)+)</span>', '<a class="le" href="../intro/lang_operators.htm"><span class="S8">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Not|And|Or)</span>', '<a class="le" href="../intro/lang_operators.htm"><span class="S5">\1</span></a>')
- ; замена ключевые слова
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(ContinueCase|ContinueLoop|Default|Dim|Do|Enum|Exit|ExitLoop|For|Func|If|ReDim|Select|Static|Switch|While|With)</span>', '<a class="le" href="../keywords/\1.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Else|Then|ElseIf|EndIf)</span>', '<a class="le" href="../keywords/IfElseEndIf.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Next|To|Step)</span>', '<a class="le" href="../keywords/For.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Case|EndSwitch)</span>', '<a class="le" href="../keywords/Switch.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Global|Local|Const)</span>', '<a class="le" href="../keywords/Dim.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(EndFunc|ByRef|Return)</span>', '<a class="le" href="../keywords/Func.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(True|False)</span>', '<a class="le" href="../keywords/Booleans.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">Until</span>', '<a class="le" href="../keywords/Do.htm"><span class="S5">Until</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">WEnd</span>', '<a class="le" href="../keywords/While.htm"><span class="S5">WEnd</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">EndSelect</span>', '<a class="le" href="../keywords/Select.htm"><span class="S5">EndSelect</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">In</span>', '<a class="le" href="../keywords/ForInNext.htm"><span class="S5">In</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">EndWith</span>', '<a class="le" href="../keywords/With.htm"><span class="S5">EndWith</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#OnAutoItStartRegister</span>', '<a class="le" href="../keywords/OnAutoItStartRegister.htm"><span class="S11">#OnAutoItStartRegister</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#include</span>', '<a class="le" href="../keywords/include.htm"><span class="S11">#include</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#include-once</span>', '<a class="le" href="../keywords/include-once.htm"><span class="S11">#include-once</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#RequireAdmin</span>', '<a class="le" href="../keywords/RequireAdmin.htm"><span class="S11">#RequireAdmin</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#NoTrayIcon</span>', '<a class="le" href="../keywords/NoTrayIcon.htm"><span class="S11">#NoTrayIcon</span></a>')
- EndFunc
- Func _UDF_libfunctions_Code(ByRef $sExampleData)
- $sExampleData=StringRegExpReplace($sExampleData, '<span class="S15">([\w]+?)</span>', '<a class="le" href="\1.htm"><span class="S15">\1</span></a>') ; функции UDF
- $sExampleData=StringRegExpReplace($sExampleData, '<span class="S9">(\$tag\w+?)</span>', '<a class="le" href="\1.htm"><span class="S9">\1</span></a>') ; структуры $tag... в примерах
- ; ссылки на файл AutoIt3.chm
- ; функции
- $sExampleData=StringRegExpReplace($sExampleData, '<span class="S4">([\w]+?)</span>', '<a class="le" href="AutoIt3.chm::/html/functions/\1.htm"><span class="S4">\1</span></a>')
- ; макросы
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S6">(@[^<]+)</span>', '<a class="le" href="AutoIt3.chm::/html/macros.htm#\1"><span class="S6">\1</span></a>')
- ; операторы
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S8">((?:[+^*/=&-]|>|<)+)</span>', '<a class="le" href="AutoIt3.chm::/html/intro/lang_operators.htm"><span class="S8">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Not|And|Or)</span>', '<a class="le" href="AutoIt3.chm::/html/intro/lang_operators.htm"><span class="S5">\1</span></a>')
- ; замена ключевые слова
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(ContinueCase|ContinueLoop|Default|Dim|Do|Enum|Exit|ExitLoop|For|Func|If|ReDim|Select|Static|Switch|While|With)</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/\1.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Else|Then|ElseIf|EndIf)</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/IfElseEndIf.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Next|To|Step)</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/For.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Case|EndSwitch)</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/Switch.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Global|Local|Const)</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/Dim.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(EndFunc|ByRef|Return)</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/Func.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(True|False)</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/Booleans.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">Until</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/Do.htm"><span class="S5">Until</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">WEnd</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/While.htm"><span class="S5">WEnd</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">EndSelect</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/Select.htm"><span class="S5">EndSelect</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">In</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/ForInNext.htm"><span class="S5">In</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">EndWith</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/With.htm"><span class="S5">EndWith</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#OnAutoItStartRegister</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/OnAutoItStartRegister.htm"><span class="S11">#OnAutoItStartRegister</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#include</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/include.htm"><span class="S11">#include</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#include-once</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/include-once.htm"><span class="S11">#include-once</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#RequireAdmin</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/RequireAdmin.htm"><span class="S11">#RequireAdmin</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#NoTrayIcon</span>', '<a class="le" href="AutoIt3.chm::/html/keywords/NoTrayIcon.htm"><span class="S11">#NoTrayIcon</span></a>')
- EndFunc
- Func _AutoIt3_keywords_Code(ByRef $sExampleData)
- ; функции UDF
- $sExampleData=StringRegExpReplace($sExampleData, '<span class="S15">([\w]+?)</span>', '<a class="le" href="UDFs3.chm::/html/libfunctions/\1.htm"><span class="S15">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '<span class="S4">([\w]+?)</span>', '<a class="le" href="../functions/\1.htm"><span class="S4">\1</span></a>')
- $sExampleData=StringReplace($sExampleData, 'href="../functions/Opt.htm">', 'href="../functions/AutoItSetOption.htm">')
- ; операторы
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S8">((?:[+^*/=&-]|>|<)+)</span>', '<a class="le" href="../intro/lang_operators.htm"><span class="S8">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Not|And|Or)</span>', '<a class="le" href="../intro/lang_operators.htm"><span class="S5">\1</span></a>')
- ; макросы
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S6">(@[^<]+)</span>', '<a class="le" href="../macros.htm#\1"><span class="S6">\1</span></a>')
- ; замена ключевые слова
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(ContinueCase|ContinueLoop|Default|Dim|Do|Enum|Exit|ExitLoop|For|Func|If|ReDim|Select|Static|Switch|While|With)</span>', '<a class="le" href="\1.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Else|Then|ElseIf|EndIf)</span>', '<a class="le" href="IfElseEndIf.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Next|To|Step)</span>', '<a class="le" href="For.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Case|EndSwitch)</span>', '<a class="le" href="Switch.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(Global|Local|Const)</span>', '<a class="le" href="Dim.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(EndFunc|ByRef|Return)</span>', '<a class="le" href="Func.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringRegExpReplace($sExampleData, '(?i)<span class="S5">(True|False)</span>', '<a class="le" href="Booleans.htm"><span class="S5">\1</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">Until</span>', '<a class="le" href="Do.htm"><span class="S5">Until</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">WEnd</span>', '<a class="le" href="While.htm"><span class="S5">WEnd</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">EndSelect</span>', '<a class="le" href="Select.htm"><span class="S5">EndSelect</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">In</span>', '<a class="le" href="ForInNext.htm"><span class="S5">In</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S5">EndWith</span>', '<a class="le" href="With.htm"><span class="S5">EndWith</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#OnAutoItStartRegister</span>', '<a class="le" href="OnAutoItStartRegister.htm"><span class="S11">#OnAutoItStartRegister</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#include</span>', '<a class="le" href="include.htm"><span class="S11">#include</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#include-once</span>', '<a class="le" href="include-once.htm"><span class="S11">#include-once</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#RequireAdmin</span>', '<a class="le" href="RequireAdmin.htm"><span class="S11">#RequireAdmin</span></a>')
- $sExampleData=StringReplace($sExampleData, '<span class="S11">#NoTrayIcon</span>', '<a class="le" href="NoTrayIcon.htm"><span class="S11">#NoTrayIcon</span></a>')
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement