forked from 7plus/7plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FolderButtonManager.ahk
33 lines (33 loc) · 1.18 KB
/
FolderButtonManager.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include %A_ScriptDir%\FastFolders.ahk
;Some stuff here to use those functions separately to add custom buttons, might have to be expanded a bit later on
if(A_OSVersion!="WIN_VISTA" && A_OSVersion!="WIN_7")
{
MsgBox This program is only used for Windows Vista and Windows 7.
return
}
MsgBox, 4,, This program allows you to add buttons to the explorer bar.`nWould you like to add a button(yes) or remove one(no)?
IfMsgBox Yes
{
path:=COMObjCreate("Shell.Application").BrowseForFolder(0, "Enter Path to add as button", 0).Self.Path
SplitPath, path , foldername
if(foldername="")
foldername:=path
InputBox, foldername , Enter the title for the button, Enter the title for the button, , , , , , , , %foldername%
if Errorlevel
return
AddButton("",path,,foldername)
}
IfMsgBox No
{
MsgBox, 4,, Would you like to remove one button (yes) or remove all buttons(no) made by this script ?
IfMsgBox Yes
{
path:=COMObjCreate("Shell.Application").BrowseForFolder(0, "Enter Path which should be removed", 0).Self.Path
RemoveButton(path)
}
IfMsgBox No
{
RemoveAllExplorerButtons()
}
}
return