function msgbox(text, title, buttons, icon, out_answer) for /f "usebackq" %%i in (`mshta "javascript:moveTo(-9999,-9999);new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Write(new ActiveXObject('WScript.Shell').Popup('$text',0,'$title',$buttons+$icon));window.close()"`) do set "$out_answer=%%i" end function function open_image(image_file) mshta "about:%~2" end function function play_audio(audio_file, delay) set "pth=%~1" set "pth=file://%pth:\=/%" mshta "about:" end function function choice_gui() set "out_var=%~1" set "str=%~2" for /l %%_ in (0,1,3) do shift /1 set /a i=0 :menu_loop1 set "str=!str!
%~1
" shift /1 set /a i+=1 if not "%~1"=="" goto menu_loop1 set "str=!str!" echo !str!> "%TEMP%\wm.hta" mshta "file://%TEMP%\wm.hta" if not exist "%TEMP%\selection.txt" ( set "!out_var!=0" goto :eof ) for /f %%i in ('type "%TEMP%\selection.txt"') do ( set "%out_var%=%%i" ) del "%TEMP%\wm.hta" del "%TEMP%\selection.txt" end function