--getDir #maxData
--cui.getDir()

macroScript Directories Category:"Niklit Scripts" Tooltip:"Directories"
(
fn maxver_fn = (
vMax=(maxversion())[1]
case of
	(
		(vMax>=10000 and vMax <= 10999): 2008
		(vMax>=11000 and vMax <= 11999): 2009
		(vMax>=12000 and vMax <= 12999): 2010
		(vMax>=13000 and vMax <= 13999): 2011
		(vMax>=14000 and vMax <= 14999): 2012
		(vMax>=15000 and vMax <= 15999): 2013
		(vMax>=16000 and vMax <= 16999): 2014
		(vMax>=17000 and vMax <= 17999): 2015
		(vMax>=18000 and vMax <= 18999): 2016
		(vMax>=19000 and vMax <= 19999): 2017
		(vMax>=20000 and vMax <= 20999): 2018
		(vMax>=21000 and vMax <= 21999): 2019
		(vMax>=22000 and vMax <= 22999): 2020
		(vMax>=23000 and vMax <= 23999): 2021
	)
)

	try DestroyDialog directories catch()
	rollout directories "Directories" width:100 height:247
	(
	button btn_autoback "Autoback"  width:90 height:22 --pos:[5,4]
	button btn_3dmax "3dsMax"  width:90 height:22 --pos:[5,30]
	button btn_Sc "Scripts"  width:90 height:22 --pos:[5,56]
	button btn_Pl "Plugins"  width:90 height:22 --pos:[5,82]
	button btn_um "usermacros"  width:90 height:22 tooltip: "Root UM by rightclick" --pos:[5,134]
	button btn_ViewCanv "ViewportCanvas"  width:90 height:22 --pos:[5,108]
	button btn_yd "YandexDisk"  width:90 height:22 --pos:[5,160]
	button btn_myD "AppData"  width:90 height:22 --pos:[5,186]
	button UI "UI"  width:90 height:22 --pos:[5,212]

	--on btn_autoback pressed do DOSCommand "explorer.exe D:\Users\%username%\Documents\3dsMax\autoback"
	on btn_autoback pressed do shellLaunch "explorer.exe" (getDir #autoback)
	on btn_3dmax pressed do shellLaunch "explorer.exe" (GetDir #maxroot)
	on btn_Sc	 pressed do shellLaunch "explorer.exe" (getDir #Scripts)
	on btn_Pl	 pressed do shellLaunch "explorer.exe" ((GetDir #maxroot)+"stdplugs")
	on btn_um	 pressed 	do	shellLaunch "explorer.exe" ((getDir #maxData)+(if maxver_fn()==2012 then "UI\\usermacros" else "usermacros") )
	on btn_um	 rightclick do	shellLaunch "explorer.exe" ((getDir #maxroot)+"usermacros") 
	on btn_ViewCanv	pressed do 	shellLaunch "explorer.exe" ((getDir #maxData)+(if maxver_fn()==2012 then "plugcfg\\ViewportCanvas" else "plugcfg_ln\\ViewportCanvas")) 
	on btn_yd	pressed do shellLaunch "explorer.exe" "d:\\YandexDisk\\#MaxScript"
	on btn_myD	pressed do DOSCommand "explorer.exe %USERPROFILE%\AppData"
	on UI	pressed do shellLaunch "explorer.exe" (getDir #ui)
	)
	createDialog directories
)
 


