Support Requests - CLICK TO READ BEFORE POSTING


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Preview and download images and files with zenity dialog
#1

I've experimented with --text-info, I've discovered it is possible to view and download images and any other files with it with just drag and drop.
Hrere we go, with this it's easy to quick grab images.
This script opens Scot(0)'s image from imgur.com in zenity dialog
Image can be dragged to the Desktop.
It will copy the image to the Desktop.
--checkbox can be removed here Smile
Code:
#!/bin/bash zenity --text-info --title="Forums" --width=1000 --height=800  --html --url="http://i.imgur.com/7izQZgD.jpg" --checkbox="I'm sure I want to remove Windows" if [ "$?" -eq "0" ];then       zenity --info --text="You clicked OK,\nWindows destroyed. :)" else       exit 0 fi

This script opens /github.com/linuxlite/litesoftware
Find a button 'Download ZIP', drag it to the desktop
It will copy master.zip on the Desktop
Code:
#!/bin/bash zenity --text-info --title="Forums" --width=1000 --height=800  --html --url="https://github.com/linuxlite/litesoftware" if [ "$?" -eq "0" ];then       zenity --info --text="You clicked OK" else       exit 0 fi

This oone opens mityer.khdlhfjijfrupr.tk/forums/ and does nothing special Smile
No link can be used or clicked.
Code:
#!/bin/bash zenity --text-info --title="Forums" --width=850 --height=800  --html --url="http://mityer.khdlhfjijfrupr.tk/forums/" if [ "$?" -eq "0" ];then       zenity --info --text="You clicked OK" else       exit 0 fi

The last one opens a local index.html file but doesn't load any images.
Code:
#!/bin/bash zenity --text-info --title="Forums" --width=850 --height=800  --html --filename="/usr/share/doc/litemanual/index.html" if [ "$?" -eq "0" ];then       zenity --info --text="You clicked OK" else       exit 0 fi
Anyway the script can be used instead of --question dialog
Just need to replace  'zenity --info --text="You clicked OK"' with a command.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)