BatchHacker

AutoHotKey Drag and Drop compiler shortcut

Sep 23rd, 2014
497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;;Icon used in the script: http://findicons.com/icon/163998/script?id=165382
  2. ;;Script written by BatchHacker
  3. ;;Usage: Insert the Code below in an "compiler.ahk" file, please make sure that you have autohotkey + the compiler installed.
  4. ;;       Drag and drop your *.ahk Script ON the compiler.ahk(This file) it should create an .exe file.
  5. ;;
  6. IfNotExist,%A_AppData%\comp\icon.ico
  7.     goto DLIco
  8. RB:
  9. IfNotExist,C:\Program Files (x86)\AutoHotkey\Compiler\Ahk2Exe.exe
  10. goto CF32
  11. compbinpath=C:\Program Files (x86)\AutoHotkey\Compiler\Ahk2Exe.exe
  12. goto Run
  13. CF32:
  14. IfNotExist,C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe
  15. goto NotInstalled
  16. compbinpath=C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe
  17. Run:
  18. run, %compbinpath% /in "%1%" /icon "%A_AppData%\comp\icon.ico"
  19. Return
  20. NotInstalled:
  21. MsgBox,0,Error,fast2exe,Compiler not found.
  22. ExitApp
  23. DLIco:
  24. FileCreateDir, %A_AppData%\comp
  25. UrlDownloadToFile, http://pastebin.com/raw.php?i=3dpkPJjK, %A_temp%\tmp.ini
  26. IniRead, ICOPath, %A_temp%\tmp.ini, Icons, ICO
  27. FileDelete, %A_temp%\tmp.ini
  28. UrlDownloadToFile, %ICOPath%, %A_AppData%\comp\icon.ico
  29. goto RB
Advertisement
Add Comment
Please, Sign In to add comment