Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
danilvalov committed Dec 10, 2016
0 parents commit 41c47a0
Show file tree
Hide file tree
Showing 36 changed files with 5,435 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## 1.0b1

Добавлено:

- Плагин **LastSMS** для быстрого ответа на последнюю SMS (по-умолчанию, сочетание Alt+T)
- Плагин **UnloadingReport** для быстрого доложить о состоянии склада, на котором вы разгрузились (по-умолчанию, NumPad 7)
- Плагин **Monitoring** для быстрого сбора и вывода в рацию всего Мониторинга (по-умолчанию, NumPad 9)
- Плагин **SOS** для быстрой отправки в рацию сигнала "СОС" с указанием квадарата вашего местонахождения (по-умолчанию, NumPad 8)
129 changes: 129 additions & 0 deletions CarmHelper.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
;;
;; CarmHelper.ahk
;; Author: Danil Valov <[email protected]>
;;

#UseHook
#NoEnv
#SingleInstance force
#Include %A_ScriptDir%
SetWorkingDir %A_ScriptDir%


; VersionChecker

#Include %A_ScriptDir%\scripts\VersionChecker.ahk

#Include %A_ScriptDir%\Updater.ahk

#Include %A_ScriptDir%\scripts\ConfigReader.ahk

If (FileExist(".cache\CarmHelper.ahk")) {
Run .cache\CarmHelper.ahk %1%
ExitApp
Return
}

CarmHelper := {}
CarmHelper["Modules"] := []
CarmHelper["Plugins"] := []

Loop, Files, %A_ScriptDir%\modules\*.*, D
{
CarmHelper["Modules"].Insert(A_LoopFileName)
}

Loop, % Config["EnabledPlugins"].MaxIndex()
{
CarmHelper["Plugins"].Insert(Config["EnabledPlugins"][A_Index])
}


MergedFile =

MergedFile .= "#UseHook`n"
MergedFile .= "#NoEnv`n"
MergedFile .= "#IfWinActive GTA:SA:MP`n"
MergedFile .= "#SingleInstance force`n"
MergedFile .= "#Include " A_ScriptDir "`n"
MergedFile .= "SetWorkingDir " A_ScriptDir "`n"

MergedFile .= "`n`n`;`; Configs`n`n"
MergedFile .= "#Include scripts\ConfigReader.ahk`n"

MergedFile .= "`n`n`;`; Libraries`n`n"

Loop, Files, %A_ScriptDir%\libraries\*.ahk, F
{
MergedFile .= "#Include libraries\" A_LoopFileName "`n"
}

MergedFile .= "`n`n`;`; Modules Funcs`n`n"

Loop, % CarmHelper["Modules"].MaxIndex()
{
ModuleName := CarmHelper["Modules"][A_Index]

If (FileExist(A_ScriptDir "\modules\" ModuleName "\Funcs.ahk")) {
MergedFile .= "#Include modules\" ModuleName "\Funcs.ahk`n"
}
}

MergedFile .= "`n`n`;`; Plugins Funcs`n`n"

Loop, % CarmHelper["Plugins"].MaxIndex()
{
PluginName := CarmHelper["Plugins"][A_Index]

If (FileExist(A_ScriptDir "\plugins\" PluginName "\Funcs.ahk")) {
MergedFile .= "#Include plugins\" PluginName "\Funcs.ahk`n`n"
}
}

MergedFile .= "`n`n`;`; GUI`n`n"
MergedFile .= "#Include GUI.ahk`n"

MergedFile .= "`n`n`;`; Modules Binds`n`n"

Loop, % CarmHelper["Modules"].MaxIndex()
{
ModuleName := CarmHelper["Modules"][A_Index]

If (FileExist(A_ScriptDir "\modules\" ModuleName "\Binds.ahk")) {
MergedFile .= "#Include modules\" ModuleName "\Binds.ahk`n`n"
}
}

MergedFile .= "`n`n`;`; Binds`n`n"

MergedFile .= "#Include *i UserBinds.ahk`n"

MergedFile .= "`n`nReturn`n`n"

MergedFile .= "`n`n`;`; Modules Labels`n`n"

Loop, % CarmHelper["Modules"].MaxIndex()
{
ModuleName := CarmHelper["Modules"][A_Index]

If (FileExist(A_ScriptDir "\modules\" ModuleName "\Labels.ahk")) {
MergedFile .= "#Include modules\" ModuleName "\Labels.ahk`n`n"
}
}

MergedFile .= "`n`n`;`; Plugins Labels`n`n"

Loop, % CarmHelper["Plugins"].MaxIndex()
{
PluginName := CarmHelper["Plugins"][A_Index]

If (FileExist(A_ScriptDir "\plugins\" PluginName "\Labels.ahk")) {
MergedFile .= "#Include plugins\" PluginName "\Labels.ahk`n`n"
}
}

FileAppend, %MergedFile%`n, .cache\CarmHelper.ahk

Sleep 1000

Run .cache\CarmHelper.ahk %1%
30 changes: 30 additions & 0 deletions Cleaner.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
;;
;; Cleaner for CarmHelper.ahk
;; Author: Danil Valov <[email protected]>
;;

#UseHook
#NoEnv
#SingleInstance force
#Include %A_ScriptDir%
SetWorkingDir %A_ScriptDir%

DetectHiddenWindows, On

IsOpened := 0

IfWinExist, % A_ScriptDir "\.cache\CarmHelper.ahk"
{
IsOpened := 1
WinClose, % A_ScriptDir "\.cache\CarmHelper.ahk ahk_class AutoHotkey"
}

FileRemoveDir, .cache, 1

RegDelete, HKEY_CURRENT_USER\Software\CarmHelper

MsgBox, Âñå íàñòðîéêè CarmHelper.ahk áûëè ñáðîøåíû íà íàñòðîéêè ïî-óìîë÷àíèþ.

if (IsOpened) {
Run CarmHelper.ahk
}
Loading

0 comments on commit 41c47a0

Please sign in to comment.