-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMacroHandler.bat
39 lines (38 loc) · 1.46 KB
/
MacroHandler.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@echo off
cls
title Macro Handler V.0.0.02
::Macro Handler, this one may require some coding knowledge, sorry about that.
:main
cls
set txtmcount=0
set prgmcount=0
echo Create macros by going to SEAL.
::If you're reading this for whatever reason, have a nice day :)
for %%x in (*.txt) do set /a txtmcount+=1
for %%x in (*.smac) do set /a prgmcount+=1
echo Text Macros Available: %txtmcount%
echo Program Macros Available: %prgmcount%
::This program is meant to be as streamlined as possible, thus most macro creation will be up to the seal.bat file and/or this programs config.
set /p macroID= MacroID=
if exist %macroID%.txt goto textMacro
if exist %macroID%.smac goto prgMacro
cls
goto main
:textMacro
::textMacro acts as a sort of large scale clipboard. Once you excecute the command, it puts whatever it needs to into your clipboard, so you can paste. (paste with CTRL V)
::this bit sets the next variable with the text in the file.
set /p txtmcro=<C:\SEAL\%macroID%.txt
::this bit copies it
echo "%txtmcro%" successfully copied! (use CTRL - V to paste anywhere)
echo|set /p=%txtmcro%|clip
cls
set macroID " "
exit
::I'll be working on the program opening macros next, but the user input is going to be a huge pain because I don't want you to have to type
::an entire directory just to use it.
:prgMacro
::now THIS is going to be a huge pain on seal.bat code. This part is easy.
set /p pgrmcro=<C:\SEAL\%macroID%.smcr
Start "" "%pgrmcro%"
cls
exit