Shell icon indicating copy to clipboard operation
Shell copied to clipboard

context Menu feature not working

Open Sag7030 opened this issue 8 months ago • 6 comments

Screenshot 2023-10-29 201454 Screenshot 2023-10-29 201606 Screenshot 2023-10-29 201822

Send to feature is not working properly, i tested on different types items like on desktop shortcuts & folders. also from other drives not visible

on desktop "create new shortcut" is missing

plz fix this error i like your work

Sag7030 avatar Oct 29 '23 15:10 Sag7030

there is no solution for now: https://github.com/moudey/Shell/issues/319

image i am trying to recreate the entire "Send To" menu so that the system one can be replaced

  • system shortcuts like "Compressed (zipped) folder" and "Mail recipient" I can't find a system command that does the same
  • all shortcuts that point to the exe are recognized automatically and they work
  • shortcuts of a driver, folder, and all other files (with extensions .exe files) I still haven't found a simple solution to make them work when I'm done with most of the menu I'll let you know

RubicBG avatar Oct 30 '23 11:10 RubicBG

there is no solution for now: #319

image i am trying to recreate the entire "Send To" menu so that the system one can be replaced

* system shortcuts like "Compressed (zipped) folder" and "Mail recipient" I can't find a system command that does the same

* all shortcuts that point to the exe are recognized automatically and they work

* shortcuts of a driver, folder, and all other files (with extensions .exe files) I still haven't found a simple solution to make them work
  when I'm done with most of the menu I'll let you know

Hi @RubicBG, Can you share your progress config with us so we can use it while waiting complete solution ?

thexmeta avatar Jan 15 '24 02:01 thexmeta

Shell v1.9.10 on Microsoft Windows 11 Pro, v10.0.22621, build 22621

In addition to #319 and #392 , I'm also experiencing weird results depending on the extension of the file name I'm right clicking on.

Below is what is shown correctly if I right click on an .mp3 file. 46 targets starting with "0file-smart-rename-only (bat) _" and ending with "file-today-mvtoday":

Screenshot - 1_15_2024 , 3_57_07 PM - 887x1027

If I right click on a .log file, only the first of the 46 targets is shown: Screenshot - 1_15_2024 , 4_04_23 PM - 887x1027

UNIVAC-Colonel-Panic avatar Jan 16 '24 00:01 UNIVAC-Colonel-Panic

image

  • only recognizes shortcuts in the SendTo folder (max number: 12)
  • only shows commands that represent executables and paths, all other formats are omitted (the path.type(path) function does not work properly to recognize other cases)
  • "Fax recipient" and "Bluetooth device" commands do not accept arguments for some unknown reason
  • "Compressed (zipped) folder" I can't find a system command that does the same
  • "Mail recipient" can make a mail without an attach file - it may work for a certain mail client, but it doesn't work with mine
$sendto_items=path.files(user.sendto, '*.lnk')
menu(title='Se&nd to' type='file|dir' mode='multiple' where=len(sendto_items)>0 pos=indexof('Send to', 1)  image=icon.send_to){
	item(title='Compressed (zipped) folder'	image='@sys.bin\imageres.dll, 165' vis='disable' )
	item(title='Desktop (create shortcut)'	image='@sys.bin\imageres.dll, 105'
		cmd=for(i=0, i<sel.count) { path.lnk.create(user.desktop+'\'+path.title(sel.get(i))+if(!keys.shift(), ' - Shortcut')+'.lnk', sel.get(i)) } & command.refresh)
	item(title='Documents (create copy)'	image='@sys.bin\imageres.dll, 189' where=!str.contains(sel.path, user.documents)
		cmd=for(i=0, i<sel.count) { io.copy(sel.get(i), '@user.documents'+"\\"+path.name(sel.get(i)), 16 | 4) } & command.refresh)
	item(title='Mail recipient'				image='@sys.bin\sendmail.dll' 
		//cmd='mailto:support@"@"nilesoft.org?subject=Аttachments are via Nilesoft Shell&attach=file:///D:/TEST.txt&body="Test"')
		cmd='mailto:support@"@"nilesoft.org?subject=Attachments are via Nilesoft Shell&body="Test"&attachment=sel(true)')
	separator()
	item(title=path.title(sendto_items[0])					where=len(sendto_items)>0 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[0]))
		image=path.lnk(user.sendto+'\'+sendto_items[0])		cmd=user.sendto+'\'+sendto_items[0]  args=sel(true))
	item(title=path.title(sendto_items[1])					where=len(sendto_items)>1 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[1]))
		image=path.lnk(user.sendto+'\'+sendto_items[1])		cmd=user.sendto+'\'+sendto_items[1]  args=sel(true))
	item(title=path.title(sendto_items[2])					where=len(sendto_items)>2 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[2]))
		image=path.lnk(user.sendto+'\'+sendto_items[2])		cmd=user.sendto+'\'+sendto_items[1]  args=sel(true))
	item(title=path.title(sendto_items[3])					where=len(sendto_items)>3 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[3]))
		image=path.lnk(user.sendto+'\'+sendto_items[3])		cmd=user.sendto+'\'+sendto_items[3]  args=sel(true))
	item(title=path.title(sendto_items[4])					where=len(sendto_items)>4 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[4]))
		image=path.lnk(user.sendto+'\'+sendto_items[4])		cmd=user.sendto+'\'+sendto_items[4]  args=sel(true))
	item(title=path.title(sendto_items[5])					where=len(sendto_items)>5 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[5]))
		image=path.lnk(user.sendto+'\'+sendto_items[5])		cmd=user.sendto+'\'+sendto_items[5]  args=sel(true))
	item(title=path.title(sendto_items[6])					where=len(sendto_items)>6 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[6]))
		image=path.lnk(user.sendto+'\'+sendto_items[6])		cmd=user.sendto+'\'+sendto_items[6]  args=sel(true))
	item(title=path.title(sendto_items[7])					where=len(sendto_items)>7 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[7]))
		image=path.lnk(user.sendto+'\'+sendto_items[7])		cmd=user.sendto+'\'+sendto_items[7]  args=sel(true))
	item(title=path.title(sendto_items[8])					where=len(sendto_items)>8 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[8]))
		image=path.lnk(user.sendto+'\'+sendto_items[8])		cmd=user.sendto+'\'+sendto_items[8]  args=sel(true))
	item(title=path.title(sendto_items[9])					where=len(sendto_items)>9 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[9]))
		image=path.lnk(user.sendto+'\'+sendto_items[9])		cmd=user.sendto+'\'+sendto_items[9]  args=sel(true))
	item(title=path.title(sendto_items[10])					where=len(sendto_items)>10 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[10]))
		image=path.lnk(user.sendto+'\'+sendto_items[10])	cmd=user.sendto+'\'+sendto_items[10] args=sel(true))
	item(title=path.title(sendto_items[11])					where=len(sendto_items)>11 and path.isexe(path.lnk(user.sendto+'\'+sendto_items[11]))
		image=path.lnk(user.sendto+'\'+sendto_items[11])	cmd=user.sendto+'\'+sendto_items[11] args=sel(true))
	separator()
	item(title=path.title(sendto_items[0])					where=len(sendto_items)>0 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[0]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[0])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[0]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[0]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
	item(title=path.title(sendto_items[1]) 					where=len(sendto_items)>1 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[1]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[1])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[1]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[1]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
	item(title=path.title(sendto_items[2])					where=len(sendto_items)>2 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[2]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[2])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[2]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[2]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
	item(title=path.title(sendto_items[3])					where=len(sendto_items)>3 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[3]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[3])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[3]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[3]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
	item(title=path.title(sendto_items[4])					where=len(sendto_items)>4 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[4]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[4])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[4]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[4]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
	item(title=path.title(sendto_items[5])					where=len(sendto_items)>5 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[5]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[5])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[5]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[5]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
	item(title=path.title(sendto_items[6])					where=len(sendto_items)>6 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[6]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[6])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[6]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[6]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
	item(title=path.title(sendto_items[7])					where=len(sendto_items)>7 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[7]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[7])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[7]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[7]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
	item(title=path.title(sendto_items[8])					where=len(sendto_items)>8 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[8]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[8])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[8]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[8]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
	item(title=path.title(sendto_items[9])					where=len(sendto_items)>9 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[9]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[9])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[9]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[9]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
	item(title=path.title(sendto_items[10])					where=len(sendto_items)>10 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[10]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[10])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[10]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[10]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
	item(title=path.title(sendto_items[11])					where=len(sendto_items)>11 and path.isdirectory(path.lnk(user.sendto+'\'+sendto_items[11]))
		image='explorer.exe' keys='SHIFT move'				tip=path.lnk(user.sendto+'\'+sendto_items[11])
		cmd=for(i=0, i<sel.count) { if(keys.shift(),
			io.move(sel[i], path.lnk(user.sendto+'\'+sendto_items[11]) + '\' + path.name(sel.get(i))),  
			io.copy(sel[i], path.lnk(user.sendto+'\'+sendto_items[11]) + '\' + path.name(sel.get(i)))) } & command.refresh() & msg('Jobs done!'))
}

RubicBG avatar Jan 19 '24 19:01 RubicBG

* only recognizes shortcuts in the SendTo folder (max number: 12)

Forgive my ignorance as I'm still new to the Nilesoft Shell app: is 12 an imposed limit by the Nilesoft Shell executable, or just a number you picked because your own scripting use case doesn't need more than 12?

UNIVAC-Colonel-Panic avatar Feb 03 '24 19:02 UNIVAC-Colonel-Panic

I don't use the SendTo menu much - and I only have 5 executables in there 😁😇 For testing purposes 12 was more than enough for me

RubicBG avatar Feb 04 '24 05:02 RubicBG