是否可以将epsilon或UltraEdit宏转换为exe?

时间:2015-10-23 08:26:11

标签: macros exe ultraedit

如果有人知道如何将epsilon和UltraEdit宏转换为exe。

你能取悦吗?

1 个答案:

答案 0 :(得分:1)

UltraEdit宏无法转换为可执行文件。 UltraEdit宏命令只能由UltraEdit执行。

但是可以使用UltraEdit从批处理文件中运行UltraEdit宏,以使用UE宏自动执行文件重新格式化任务。

以下是此类批处理文件的注释示例:

@echo off
rem Get name of UltraEdit executable with full path from Windows registry.
set "UltraEditEXE="
call :GetFileNameUE "HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\uedit32.exe"
if not "%UltraEditEXE%" == "" goto RunMacro
call :GetFileNameUE "HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\uedit64.exe"
if not "%UltraEditEXE%" == "" goto RunMacro
call :GetFileNameUE "HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\uedit32.exe"
if not "%UltraEditEXE%" == "" goto RunMacro
call :GetFileNameUE "HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\uedit64.exe"
if not "%UltraEditEXE%" == "" goto RunMacro
echo UltraEdit is not installed most likely as no uedit*.exe found.
echo.
pause
goto :EOF

rem Run UltraEdit using Windows command start to run UE minimized with forcing
rem always an new instance of UltraEdit, opening a file and processing this
rem file with an UltraEdit macro. This instance of UltraEdit is automatically
rem exited after macro executed once on the opened file. The macro must save
rem the file before exiting. While UltraEdit is running the batch procssing
rem is continued with deleting the environment variable and then exiting
rem batch processing. See in help of UltraEdit the page with title "Command
rem Line Parameters" for details on the used UE command line parameters.

:RunMacro
start "Run UE macro" /min "%UltraEditEXE%" /fni "Path\Name of file to modify.txt" /M,E,1="Macro file with full path/Macro Name"
set "UltraEditEXE="
goto :EOF

rem This is a subroutine called up to 4 times to determine name of UltraEdit
rem executable with full path from Windows registry if UltraEdit is installed
rem at all. It assigns file name of UltraEdit with full path and with file
rem extension to environment variable UltraEditEXE on success finding the
rem registry value in registry key passed as parameter to this subroutine.

:GetFileNameUE
for /F "skip=2 tokens=3*" %%A in ('%SystemRoot%\System32\reg.exe QUERY %1 /ve 2^>nul') do (
    if "%%A" == "REG_SZ" set "UltraEditEXE=%%B" & goto :EOF
)
goto :EOF

要了解使用的命令及其工作原理,请打开命令提示符窗口,执行以下命令,并完全阅读为每个命令显示的所有帮助页面。

  • call /?
  • echo /?
  • for /?
  • goto /?
  • if /?
  • pause /?
  • reg query /?
  • rem /?
  • set /?
  • start /?