강좌 / 팁

소프트웨어 오토핫키 스크립트 내에 바이너리 포함시키기

2021.01.07 22:42

지후빠 조회:1162 추천:7

안녕하세요? 점심시간에 짬을내어, (DISM_Onekey_BR 10 버전 가는데 도움이 될까해서 ^^; 청락님 참고해보시길...)

청락님 게시물에 포함된 DISM_PE 폴더내 cmd 파일을 DISM_Onekey.ahk 안에 포함시키는 방법을 찾아보았습니다.

- https://windowsforum.kr/gallery/15050230 

 

일반적인 배치파일이면 쉬운데 암호화되어 있어서 여러가지 시도해봤는데 안되더군요.

퇴근후 결국 검색으로 해결되네요. 오토핫키 스크립트 내에 바이너리를 임배딩시키는 방법으로 훌륭합니다.

 

게시물; Include virtually any file in a script (exe/zip/dll/etc....)

- https://autohotkey.com/board/topic/64481-include-virtually-any-file-in-a-script-exezipdlletc/page-1

- Include file.ahk 버전 2.6 첨부합니다. Include file.ahk


게시물 페이지 설명; 이건 pass 해도 괜찮을 듯 합니다.

I have always wanted a way to pack files into a script for portability but I have never been able to find one.

 

That came to this:

Store virtually any file in a .ahk script (or compiled .exe)

Download: Here Include file.ahk

Current version: 2.6

Compatible with: AHK Basic, AHK L ANSI, AHK L Unicode (X86/X64)

 

File types i've tested and know work: .zip, .exe, .txt, .ahk, ...anything?

The .ahk size of the file is rougly 1.33x the normal filesize(s). The compiled .exe (without compression) is rougly 1-1.05x the included filesize(s).

If you find any bugs or have anything to suggest please feel free to post.

 

How to use!:

1. Download and save the .ahk to a directory of your choosing.

2. Run the script

3. Select a file you want to include with your script(s)

4. Enter a name for the function you call to recreate the file (valid function names only)

5. Wait for it to do its stuff

6. Answer the questions on how you want to save the script

7. Simply include the code via #include or pasting it into your script

8. Call the function with Extract_*name* and the path/name of the file you want it to save as and it will recreate the file


- 실행시키면 파일 파일 선택 창이 나옵니다.

2021-01-07_222121.png

- 파일을 선택후 열기하면 AHK에 생성될 함수이름을 넣습니다.

2021-01-07_222228.png

- 순식간에 변환되었다하고 파일로 저장할 거냐고 묻습니다. 위의 함수 이름으로 파일을 생성합니다.

- include로 쓰거나 스크립트 내 복/붙해서 사용

2021-01-07_222340.png

- 클립보드로도 붙여 넣을거냐 묻습니다.

2021-01-07_222408.png

- 생성된 파일과 메모장에 붙여넣은 형태입니다.

2021-01-07_222535.png

- 사용은 다음처럼 하시면... ㅋ~

SetWorkingDir %A_ScriptDir% 

Onekey_Backup("Onekey_Backup.cmd")

Onekey_Restore("Onekey_Restore.cmd")

return

 

- 눈길 조심하시구요. 좋은 하루 되십시오.^^

번호 제목 글쓴이 조회 추천 등록일
[공지] 강좌 작성간 참고해주세요 gooddew - - -
223 소프트웨어| 토탈커맨더 - 좌우 패널 폭 조정 단축키 [3] shot4u 1210 2 12-06
222 윈 도 우| (수정5) 윈도우 버전구분 배치파일 [4] 메리아 1209 14 03-23
221 소프트웨어| 다중 웹 검색 - Firefox 및 Chrome 부가 기능 [1] VenusGirl 1209 3 05-22
220 소프트웨어| 중국어 프로그램 한글화 팁 [8] 줄리아니 1205 16 08-14
219 모 바 일| *Kinemaster 강좌,키네마스터 영상합성 마스크 기법- 동영... murimgasa 1204 1 12-11
218 윈 도 우| ISO 마운트 - 작업 - 꺼내기, ISO2WIM 추출 [5] 지후빠 1195 20 12-04
217 소프트웨어| Win10XPE - Desktop.INI 삭제 과정 안 보이게 하기. [3] 입니다 1195 8 07-19
216 소프트웨어| 마우스 두개 양손 사용시 왼손 마우스 버튼 스왑 [7] 지후빠 1194 12 12-24
215 윈 도 우| Move over there 우메뉴등록_제거 + 그룹정책 백복 [10] 레마클로 1194 11 03-25
214 소프트웨어| command prompt 에서 메일 보내기 [5] shot4u 1192 4 12-17
213 소프트웨어| 팁: VirtualBox 7의 Windows 10/11에서 NVMe 드라이버 활성... [3] VᴇɴᴜꜱGɪ 1188 9 03-05
212 모 바 일| *Kinemaster강좌. 동영상에서 음악만 추출하는 방법, murimgasa 1188 1 09-16
211 윈 도 우| 가장간단한 ToggleTaskbar(수정) [7] 레마클로 1181 5 02-29
210 모 바 일| 카톡에서 다국어를 쉽게 입력하는 방법 [1] 무림거사 1180 3 03-01
209 소프트웨어| Total commander 에서 검색된 파일들을 폴더 구조와 함께 ... [8] 줄리아니 1177 6 03-22
208 소프트웨어| Adobe Premiere CS6 강좌 유용한 팀Tip 몇가지 -복사단축키... [1] murimgasa 1177 1 08-25
207 소프트웨어| 기상 정보-Forecastfox - Firefox+Google Chrome용 부가 기능 [3] VenusGirl 1175 9 12-31
206 모 바 일| 카톡에서 사진 보내는 자세한 방법에 대한 설명을 요청하신... murimgasa 1174 1 08-13
205 소프트웨어| 영상이름에 자막 매치시키기 오토핫키 [8] 비려막존 1173 8 04-27
204 윈 도 우| PNG_ICO (이미지 아이콘 변환) [7] 슈머슈마 1171 6 11-12
XE1.11.6 Layout1.4.8