| Новости | FAQ | Авторы | Документация | В действии | Библиотека |
| Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Александр Петросян (PAF) 02.12.2005 11:26 / 02.12.2005 11:58
друзья, я подумываю о том, чтобы включить нечто подобное в дистрибутив очередной версии parser:@ue_localize[remote][ip2local]
$ip2local[
$.[ip.of.site.developer][c:/local_copy]
]
#^throw[debug;$env:REMOTE_ADDR]
$result[$ip2local.[$env:REMOTE_ADDR]]
^if(def $result){
$result[$result^remote.mid(^request:document-root.length[])]
}{
$result[$remote]
}
@ue_file[info]
<tt><a href="edit://^ue_localize[$info.file]?${info.lineno}:$info.colno">$info.file^(${info.lineno}:$info.colno^)</a></tt>
@unhandled_exception_debug[exception;stack]
^fatal_error[Unhandled Exception^if(def $exception.type){ ($exception.type)};$exception.source;
<pre>^untaint[html]{$exception.comment}</pre>
^if(def $exception.file){
^untaint[html]{^ue_file[$exception]}
}
^if($stack){
<hr/>
<table>
^stack.menu{
<tr><td>$stack.name</td><td>^ue_file[$stack]</td></tr>
}
</table>
}
]2. положить один файлик сюда:'20051202 paf@design.ru
Set objArgs = WScript.Arguments
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
'errReturn = objProcess.Create("Notepad.exe")
' objArgs(0) = edit://c:/path/to/docroot/path/to/file?line:column
s = Mid( objArgs(0), 8 )
' s = c:/path/to/docroot/path/to/file?line:column
Dim parts
parts = Split(s, "?", 2)
file = parts(0) ' c:/path/to/docroot/path/to/file
lineCol = parts(1) ' line:column
Dim coords
coords = Split(lineCol, ":")
line = coords(0)
col = coords(1)
cmd = "far.exe /e"&line&":"&col&" """&file&""""
'MsgBox cmd
errReturn = objProcess.Create(cmd)
'MsgBox errReturn3. один раз запустить такой файлик:Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\edit] @="URL:edit Protocol (edit://file?line:no)" "EditFlags"=dword:00000002 "URL Protocol"="" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\edit\shell] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\edit\shell\open] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\edit\shell\open\command] @="wscript c:\\edit.vbs %l"думаю, на эту тему можно сделать маленький инсталлятор, чтобы не возиться с файлами вручную.