Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Menu, Tray, NoStandard
- Menu, Standard, Standard
- Menu, Tray, Add, Add an App, AddNewApp
- Menu, Tray, Add, Standard Stuff, :Standard
- SetTimer, GTAExistLoop, On
- Return
- GTAExistLoop:
- Process, Wait, gta_sa.exe
- Suspend, On
- Process, WaitClose, gta_sa.exe
- Suspend, Off
- Return
- AddNewApp:
- Gui, Destroy
- Gui, Add, Button, w200 gAddGame, Game
- Gui, Add, Button, w200 gAddSAMPServer, SAMP Server
- Gui, Add, Button, w200 gAddMCServer, MC Server
- Gui, Add, Button, w200 gAddScript, AHK Script
- Gui, Add, Button, w200 gAddApp, App
- Gui, Show
- Return
- AddGame:
- InputBox, GName,, Please enter the name of this game.
- If ErrorLevel
- Return
- FileSelectFile, SelectedFile, 3, %A_Desktop%, Please select a new game to add to the launcher.
- If ErrorLevel
- Return
- SplitPath, SelectedFile, GEXE, GPath
- IniRead, Num, Apps.ini, Numbers, GNum, 0
- Num+=1
- IniWrite, %Num%, Apps.ini, Numbers, GNum
- InIWrite, %GName%, Apps.ini, GNames, %Num%
- InIWrite, %GPath%, Apps.ini, GPaths, %Num%
- InIWrite, %GEXE%, Apps.ini, GEXE, %Num%
- MsgBox, 64, Success!, Done!`n`nName:`n%GName%`n`nPath:`n%GPath%`n`nExecutable:`n%GEXE%
- Return
- AddSAMPServer:
- InputBox, SAMPName,, Please enter the name of this server.
- If ErrorLevel
- Return
- FileSelectFile, SelectedFile, 3, %A_Desktop%, Please select a new server to add to the launcher.
- If ErrorLevel
- Return
- SplitPath, SelectedFile, SAMPEXE, SAMPPath
- IniRead, Num, Apps.ini, Numbers, SAMPNum, 0
- Num+=1
- IniWrite, %Num%, Apps.ini, Numbers, SAMPNum
- InIWrite, %SAMPName%, Apps.ini, SAMPNames, %Num%
- InIWrite, %SAMPPath%, Apps.ini, SAMPPaths, %Num%
- InIWrite, %SAMPEXE%, Apps.ini, SAMPEXE, %Num%
- MsgBox, 64, Success!, Done!`n`nName:`n%SAMPName%`n`nPath:`n%SAMPPath%`n`nExecutable:`n%SAMPEXE%
- Return
- AddMCServer:
- InputBox, MCName,, Please enter the name of this server.
- If ErrorLevel
- Return
- FileSelectFile, SelectedFile, 3, %A_Desktop%, Please select a new server to add to the launcher.
- If ErrorLevel
- Return
- SplitPath, SelectedFile, MCEXE, MCPath
- IniRead, Num, Apps.ini, Numbers, MCNum, 0
- Num+=1
- IniWrite, %Num%, Apps.ini, Numbers, MCNum
- InIWrite, %MCName%, Apps.ini, MCNames, %Num%
- InIWrite, %MCPath%, Apps.ini, MCPaths, %Num%
- InIWrite, %MCEXE%, Apps.ini, MCEXE, %Num%
- MsgBox, 64, Success!, Done!`n`nName:`n%MCName%`n`nPath:`n%MCPath%`n`nExecutable:`n%MCEXE%
- Return
- AddScript:
- InputBox, ScriptName,, Please enter the name of this script.
- If ErrorLevel
- Return
- FileSelectFile, SelectedFile, 3, %A_Desktop%, Please select a new script to add to the launcher.
- If ErrorLevel
- Return
- SplitPath, SelectedFile, ScriptEXE, ScriptPath
- IniRead, Num, Apps.ini, Numbers, ScriptNum, 0
- Num+=1
- IniWrite, %Num%, Apps.ini, Numbers, ScriptNum
- InIWrite, %ScriptName%, Apps.ini, ScriptNames, %Num%
- InIWrite, %ScriptPath%, Apps.ini, ScriptPaths, %Num%
- InIWrite, %ScriptEXE%, Apps.ini, ScriptEXE, %Num%
- MsgBox, 64, Success!, Done!`n`nName:`n%ScriptName%`n`nPath:`n%ScriptPath%`n`nExecutable:`n%ScriptEXE%
- Return
- AddApp:
- InputBox, AppName,, Please enter the name of this app.
- If ErrorLevel
- Return
- FileSelectFile, SelectedFile, 3, %A_Desktop%, Please select a new app to add to the launcher.
- If ErrorLevel
- Return
- SplitPath, SelectedFile, AppEXE, AppPath
- IniRead, Num, Apps.ini, Numbers, AppNum, 0
- Num+=1
- IniWrite, %Num%, Apps.ini, Numbers, AppNum
- InIWrite, %AppName%, Apps.ini, AppNames, %Num%
- InIWrite, %AppPath%, Apps.ini, AppPaths, %Num%
- InIWrite, %AppEXE%, Apps.ini, AppEXE, %Num%
- MsgBox, 64, Success!, Done!`n`nName:`n%AppName%`n`nPath:`n%AppPath%`n`nExecutable:`n%AppEXE%
- Return
- !2:: Suspend
- !1::
- Gui, Destroy
- Gui, Add, Tab2, w825 r20, Games|SAMP Servers|MC Servers|AHK Scripts|Apps
- Gui, Tab, Games
- Gui, Add, ListView, w800 r20 Grid gGSelect, Game|Path|EXE
- IniRead, GNum, Apps.ini, Numbers, GNum, 0
- Loop, %GNum%
- {
- IniRead, GName, Apps.ini, GNames, %A_Index%
- IniRead, GPath, Apps.ini, GPaths, %A_Index%
- IniRead, GEXE, Apps.ini, GEXE, %A_Index%
- LV_Add(, GName, GPath, GEXE)
- }
- LV_ModifyCol()
- Gui, Tab, SAMP Servers
- Gui, Add, ListView, w800 r20 Grid gSAMPSelect, Server|Path|EXE
- IniRead, SAMPNum, Apps.ini, Numbers, SAMPNum, 0
- Loop, %SAMPNum%
- {
- IniRead, SAMPName, Apps.ini, SAMPNames, %A_Index%
- IniRead, SAMPPath, Apps.ini, SAMPPaths, %A_Index%
- IniRead, SAMPEXE, Apps.ini, SAMPEXE, %A_Index%
- LV_Add(, SAMPName, SAMPPath, SAMPEXE)
- }
- LV_ModifyCol()
- Gui, Tab, MC Servers
- Gui, Add, ListView, w800 r20 Grid gMCSelect, Server|Path|EXE
- IniRead, MCNum, Apps.ini, Numbers, MCNum, 0
- Loop, %MCNum%
- {
- IniRead, MCName, Apps.ini, MCNames, %A_Index%
- IniRead, MCPath, Apps.ini, MCPaths, %A_Index%
- IniRead, MCEXE, Apps.ini, MCEXE, %A_Index%
- LV_Add(, MCName, MCPath, MCEXE)
- }
- LV_ModifyCol()
- Gui, Tab, AHK Scripts
- Gui, Add, ListView, w800 r20 Grid gScriptSelect, Script|Path|EXE
- IniRead, ScriptNum, Apps.ini, Numbers, ScriptNum, 0
- Loop, %ScriptNum%
- {
- IniRead, ScriptName, Apps.ini, ScriptNames, %A_Index%
- IniRead, ScriptPath, Apps.ini, ScriptPaths, %A_Index%
- IniRead, ScriptEXE, Apps.ini, ScriptEXE, %A_Index%
- LV_Add(, ScriptName, ScriptPath, ScriptEXE)
- }
- LV_ModifyCol()
- Gui, Tab, Apps
- Gui, Add, ListView, w800 r20 Grid gAppSelect, App|Path|EXE
- IniRead, AppNum, Apps.ini, Numbers, AppNum, 0
- Loop, %AppNum%
- {
- IniRead, AppName, Apps.ini, AppNames, %A_Index%
- IniRead, AppPath, Apps.ini, AppPaths, %A_Index%
- IniRead, AppEXE, Apps.ini, AppEXE, %A_Index%
- LV_Add(, AppName, AppPath, AppEXE)
- }
- LV_ModifyCol()
- Gui, Show
- Return
- GSelect:
- If A_EventInfo is not Number
- {
- Return
- }
- IniRead, Path, Apps.ini, GPaths, %A_EventInfo%
- IniRead, EXE, Apps.ini, GEXE, %A_EventInfo%
- MyDir:=A_WorkingDir
- SetWorkingDir, %Path%
- Run, %EXE%
- SetWorkingDir, %MyDir%
- Return
- SAMPSelect:
- If A_EventInfo is not Number
- {
- Return
- }
- IniRead, Path, Apps.ini, SAMPPaths, %A_EventInfo%
- IniRead, EXE, Apps.ini, SAMPEXE, %A_EventInfo%
- MyDir:=A_WorkingDir
- SetWorkingDir, %Path%
- Run, %EXE%
- SetWorkingDir, %MyDir%
- Return
- MCSelect:
- If A_EventInfo is not Number
- {
- Return
- }
- InIRead, Path, Apps.ini, MCPaths, %A_EventInfo%
- InIRead, EXE, Apps.ini, MCEXE, %A_EventInfo%
- MyDir:=A_WorkingDir
- SetWorkingDir, %Path%
- Run, %EXE%
- SetWorkingDir, %MyDir%
- Return
- ScriptSelect:
- If A_EventInfo is not Number
- {
- Return
- }
- InIRead, Path, Apps.ini, ScriptPaths, %A_EventInfo%
- InIRead, EXE, Apps.ini, ScriptEXE, %A_EventInfo%
- MyDir:=A_WorkingDir
- SetWorkingDir, %Path%
- Run, %EXE%
- SetWorkingDir, %MyDir%
- Return
- AppSelect:
- If A_EventInfo is not Number
- {
- Return
- }
- InIRead, Path, Apps.ini, AppPaths, %A_EventInfo%
- InIRead, EXE, Apps.ini, AppEXE, %A_EventInfo%
- MyDir:=A_WorkingDir
- SetWorkingDir, %Path%
- Run, %EXE%
- SetWorkingDir, %MyDir%
- Return
- GuiClose:
- Gui, Destroy
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement