首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >是否可以将epsilon或UltraEdit宏转换为exe?

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

Stack Overflow用户
提问于 2015-10-23 08:26:10
回答 1查看 212关注 0票数 0

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

你能帮我吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-10-24 13:51:19

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

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

下面是这样一个批处理文件的注释示例:

代码语言:javascript
复制
@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 /?
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33297885

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档