Open website and after close that
I need a program what open the website, wait a sec and after close that (just the website fe:www.google.com)
@echo off Title Start and Kill Website Mode con cols=75 lines=5 & color 0a echo( echo Launching Internet Explorer ... Start "" "%ProgramFiles%\Internet Explorer\iexplore.exe" "www.google.com" :: Sleep for 5 seconds Timeout /T 5 /NoBreak>NUL echo( echo Hit any Key to kill all instances of Website Pause>nul Cls & Color 7c echo( echo Killing Website Please wait for a while ... rem Taskkil /IM https://google.com /F Taskkill /IM "inexplore.exe" /F pause
See also questions close to this topic
JAVA SERVLET HTML include and forward
hey i have a java web project. and when i deploy the war in the server starting some problems to appear. http://shifter.co.il/ShiftWeb/ username:yair password:1234 when loggin the servlet include to the suitable servelt.
and the AdminServlet forward to a HTML page:
RequestDispatcher dispatcher = request.getRequestDispatcher("/templates/admin.html"); dispatcher.include(request, response);
the problem is: instead of reading the html in include it in the web its just showing the html code. here is what supposed to happen when loggin in (when i deploy the war from my computer): http://prntscr.com/k8yqyx here is what happening now (when i deloy the war from the server): http://prntscr.com/k8yrd9
any idea why its happening?
I'm looking for similar functionality as creating apps folders on iOS and Android (Drag an element onto another element to create a group).
Flask cached files, no new changes applied (still loads old .css and .js files)
I have simple flask application running on flask development server on Debian9. Everything worked fine until today. Now, when I change any of the files in static directory, the browser loads the old file and no change is displayed. 2 browsers tried: Chrome and IE.
I've tried this:
- Clear all browser cache, refresh page = no effect
- Install 2 brand new browsers (Vivaldi and Opera) = On the first time the URL was entered, old .css files were loaded
- When I rename the .css file and accordingly modify the html, the changes are applied and everything looks fine until I make another change, then I have to rename it again.
I run flask app with flask run --host='0.0.0.0' --port='80'
I found many similar posts, everytime they were solved by clearing browser cache, or adding @app.after_request decorator, but it did'nt help in this case. I don't think this is browser cache related. Thank you for any advices.
Python resize CommandLine while keeping Scrolling bar
TL;DR : How can I resize a commandline while keeping a scroll bar/function?
Hey guys! I'm working on a bot, I made a script and I wanted to make it into an user-oriented usuable app so that people don't need to learn how to edit and run .py files to use it. (I'm probably going to use py2exe or something)
And so I wanted to make so that the text is kind of centered and all of that, so I tried to use
str.centerat first like this:
x = ''' ╔═════════════════════════════════════════════════════════╗ ║ ║ ║ TITLE OF THE COOL BOT BY X ||v1.0|| ║ ║ ║ ╚═════════════════════════════════════════════════════════╝''' print(x.center(20))
But sadly that doesn't seem to do anything, so I just decided to add some spaces and make it like that myself.
However now I have a problem, I've tried this to make the commandline more aesthetic:
os.system("mode con cols=93 lines=45")
Which gives me this result:
And here's what it looks like not resized:
So you know, look pretty good resized. But here's my main issue: The problem with
os.system("mode con lines=45)is that it resizes the commandline to 45 but it also sets the buffer to 45, so there's no way to scroll, at all, making the app unusable (as there's sometimes rather large chunks of text to read and scrolling is necessary).
So I'm stuck between aestethic commandline but unusable unless I implement like constant
time.sleep(x)to let the user read (which I don't really want) or a functional un-aesthetic commandline. (or I could do this: os.system("mode con cols=93") which sets the width and keeps the scrolling bar, however the height is set at maximum of whatever the screen is, so not that great either).
So is there anyway to resize the commandline while keeping a scroll function or to do something similar without having to re-write the whole code?
Hold output of batch command until a specific time
I am making a batch script to send numbers through the serial port to an Arduino with 1 second delays.
@echo off mode COM3: baud=9600 data=8 >nul for /l %%n in () do ( for /f "usebackq" %%a in (`wmic /namespace:\\root\openhardwaremonitor path sensor where "Identifier='/intelcpu/0/temperature/0'" get value^|findstr [0-9]`) do <nul set /p ="%%a">COM3 timeout /t 1 /nobreak >nul for /f "usebackq" %%a in (`wmic /namespace:\\root\openhardwaremonitor path sensor where "Identifier='/nvidiagpu/0/temperature/0'" get value^|findstr [0-9]`) do <nul set /p ="%%a">COM3 timeout /t 1 /nobreak >nul )
It mainly works but it gets out of sync when running intensive tasks like gaming because the wmic commands are taking longer. I tried to squeeze every bit of performance by using the
<nul set /pcommands and setting to a higher priority but it didn't work. I was looking into commands like
ATwhere it schedules a command at a time but it seems that it just runs the command then which is not what I want.
Is there a way to use a command similar to timeout but it processes the command during the alloted time, so it can immidiately output when the time is over?
Run a specific jar by command line
The line which contains the command is :
Executing : Command => C:\Program Files (x86)\Java\jdk1.8.0_121\bin\java -Dlog4j.configuration= file:///C:\Users\BTX65617\Desktop\LoRaDeviceBenchmark-v5.05\test_compilation\conf/log4j.xml -Dtest_server_host=127.0.0.1 -Dtest_server_port=1234 -Djava.library.path=./lib -jar 06_DevStatusReq.jar
I tried to use the command on the shell on the same directory of '06_DevStatusReq.jar' but I can't run the program as the software I am using.
It seems that the parameters are incorrect.
Thanks for you help.