Last active
March 26, 2019 13:22
-
-
Save breezhang/7732470 to your computer and use it in GitHub Desktop.
zenity for win7 example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get from | |
http://osspack32.googlecode.com/files/zenity.exe | |
modified src: http://osspack32.googlecode.com/files/zenity-3.6.0_src.7z | |
enjoy cmd script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for /f %i in ('zenity --calendar --title="Select a Date" --text="Click on a date to select that date." --day=1 --month=12 --year=2013 ') do @echo %i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for /f %i in ('zenity --color-selection --show-palette') do echo %i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for /f %i in ('zenity --file-selection --title="Select a File" ') do @echo %i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@for /f "delims=," %%i in ('zenity --forms --title="Add Friend" --text="Enter information about your friend." --separator="," --add-entry="First Name" --add-entry="Family Name" --add-entry="Email" --add-calendar="Birthday"') do @echo %%i | |
if %ERRORLEVEL% ==0 echo "ADD OK" | |
if %ERRORLEVEL% == 1 goto error | |
zenity --info --text="You pressed YES!" | |
goto end | |
:error | |
zenity --error --text="!====!" | |
:end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for /f %i in ('zenity --entry --title="Add new profile" --text="Enter name of | |
new profile:" --entry-text "NewProfile"') do @echo %i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for %f %i in ('zenity --list --title="Choose the Bugs You Wish to View" --column="Bug Number" --column="Severity" --column="Description" 992383 Normal "GtkTreeView crashes on multiple selections" 293823 High "GNOME Dictionary does not handle proxy" 393823 Critical "Menu editing does not work in GNOME 2.0"') do @echo %i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:need admin | |
zenity --notification --window-icon="info" --text="There are system updates necessary!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for /f "tokens=1,2 delims=|" %i in ('zenity --password --username') do @echo %i %j |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmd /c "for /l %i in (10,10,100) do @echo %i && sleep 1" |zenity --progress --percentage=0 --auto-close |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
zenity --question --ok-label="YES" --cancel-label="NO" --text="Did you have a nice day?" | |
if %ERRORLEVEL% == 1 goto error | |
zenity --info --text="You pressed YES!" | |
goto end | |
:error | |
zenity --error --text="You pressed NO!" | |
:end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seem to me, that notification option is not implemented in windows version of Zenity