Dynamic This PC drive list creation #582
Replies: 6 comments
-
does this help ypu? menu( mode='multiple' title='This PC' image=\uE1D9)
{
item (title = 'A:' where=path.exists('A:') image=icon.res('imageres.dll', if('A:'== sys.root, 31, 27)) vis=if('A:'== sys.root, 'disable') )
item (title = 'B:' where=path.exists('B:') image=icon.res('imageres.dll', if('B:'== sys.root, 31, 27)) vis=if('B:'== sys.root, 'disable') )
item (title = 'C:' where=path.exists('C:') image=icon.res('imageres.dll', if('C:'== sys.root, 31, 27)) vis=if('C:'== sys.root, 'disable') )
item (title = 'D:' where=path.exists('D:') image=icon.res('imageres.dll', if('D:'== sys.root, 31, 27)) vis=if('D:'== sys.root, 'disable') )
// ...
item (title = 'X:' where=path.exists('X:') image=icon.res('imageres.dll', if('X:'== sys.root, 31, 27)) vis=if('X:'== sys.root, 'disable') )
item (title = 'Y:' where=path.exists('Y:') image=icon.res('imageres.dll', if('Y:'== sys.root, 31, 27)) vis=if('Y:'== sys.root, 'disable') )
item (title = 'Z:' where=path.exists('Z:') image=icon.res('imageres.dll', if('Z:'== sys.root, 31, 27)) vis=if('Z:'== sys.root, 'disable') )
} |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
you didn't explain what you wanted to do with the menu and I didn't add any commands. now
menu(mode='multiple' title='This PC' image=\uE1D9)
{
item (title = 'A:' where=path.exists('A:') image=icon.res('imageres.dll', if('A:'== sys.root, 31, 27)) vis=if('A:'== sys.root, 'disable') cmd=if(window.name=='CabinetWClass' and !keys.shift(), command.navigate('A:'), 'A:'))
item (title = 'B:' where=path.exists('B:') image=icon.res('imageres.dll', if('B:'== sys.root, 31, 27)) vis=if('B:'== sys.root, 'disable') cmd=if(window.name=='CabinetWClass' and !keys.shift(), command.navigate('B:'), 'B:'))
item (title = 'C:' where=path.exists('C:') image=icon.res('imageres.dll', if('C:'== sys.root, 31, 27)) vis=if('C:'== sys.root, 'disable') cmd=if(window.name=='CabinetWClass' and !keys.shift(), command.navigate('C:'), 'C:'))
item (title = 'D:' where=path.exists('D:') image=icon.res('imageres.dll', if('D:'== sys.root, 31, 27)) vis=if('D:'== sys.root, 'disable') cmd=if(window.name=='CabinetWClass' and !keys.shift(), command.navigate('D:'), 'D:'))
// ...
item (title = 'X:' where=path.exists('X:') image=icon.res('imageres.dll', if('X:'== sys.root, 31, 27)) vis=if('X:'== sys.root, 'disable') cmd=if(window.name=='CabinetWClass' and !keys.shift(), command.navigate('X:'), 'X:'))
item (title = 'Y:' where=path.exists('Y:') image=icon.res('imageres.dll', if('Y:'== sys.root, 31, 27)) vis=if('Y:'== sys.root, 'disable') cmd=if(window.name=='CabinetWClass' and !keys.shift(), command.navigate('Y:'), 'Y:'))
item (title = 'Z:' where=path.exists('Z:') image=icon.res('imageres.dll', if('Z:'== sys.root, 31, 27)) vis=if('Z:'== sys.root, 'disable') cmd=if(window.name=='CabinetWClass' and !keys.shift(), command.navigate('Z:'), 'Z:'))
}
|
Beta Was this translation helpful? Give feedback.
-
Ideally, i were trying to create a dynamic item, that cauld display the contents of as a menu. Apologize for the lack of explanation RubicBG LOL. What i was looking for is a line and turn it into a menu without declaring all the drives that my system might or might not have and just hide them if they are not present. I was digging into the documentation dont seem to have a way to turn this line into a main menu and display its contents as a sub-menu. menu(mode='multiple' title='This PC' image=\uE1D9) If i do this, the whole menu crashes and dont launch. { } Thank you. |
Beta Was this translation helpful? Give feedback.
-
there is no way to create items/menus recursively - it has to be done one by one |
Beta Was this translation helpful? Give feedback.
-
I got to the same conclusion :( . It would have been cool. |
Beta Was this translation helpful? Give feedback.
-
How do i go about to create a dynamic drive list menu of This PC? I am on Windows 11 Enterprise LTSC, 26100.2605.
Trying to create menu that lists my drives. So far i have tried,
{
Item (title = 'A: WD120EDBZ' where=!path.exists('A:') image)
Item (title = 'B: WD120EDAZ' where=!path.exists('B:') image)
}
Nothing comes up in the menu also need help to apply the vis= parameter so its only listing the item if its exist.
Thanks.
Would it be even possible or i just poking around in the dark? LOL
Beta Was this translation helpful? Give feedback.
All reactions