Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- AUTO_RUN SECTION — TOP OF SCRIPT
- */
- SetWorkingDir %A_ScriptDir% ; to make a script unconditionally use its own folder as its working directory
- #Include %A_ScriptDir% ; changes the working directory for subsequent #Includes and FileInstalls
- /*
- CHECK FILES AND INSTALLATION BEFORE LAUNCHING APP
- */
- ; CREATE MISSING FOLDERS
- IfNotExist, resources\img\
- {
- FileCreateDir, resources\img\
- }
- ; CREATE MISSING FILES
- if (!FileExist("resources\img\myimg.png"))
- {
- FileInstall, resources\img\myimg.png, resources\img\myimg.png, 1
- }
- if (!FileExist("resources\font\segoeui.ttf"))
- {
- FileInstall, resources\font\segoeui.ttf, resources\font\segoeui.ttf, 1
- }
- ; LOAD FONT
- DllCall("GDI32.DLL\AddFontResourceEx", Str,"resources\font\segoeui.ttf",UInt,(FR_PRIVATE:=0x10), Int,0)
- /*
- INSERT REST OF SCRIPT BELOW
- */
- /*
- USE THE FOLLOWING TO UNLOAD FONT WHEN YOU EXITAPP :
- ; Example
- DllCall("GDI32.DLL\RemoveFontResourceEx",Str,"res\fnt\segoeui.ttf",UInt,(FR_PRIVATE:=0x10),Int,0)
- ExitApp
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement