Is there any way to get the number of times a user kills a particular window?
We open a window using window.open() in JavaScript. I need to count the number of time it gets open and store it in a database.
Related
linux terminals display output on a (configurable) scrolling window. User configuration allows control of both the scrolling and the size of the window (in number of rows and columns).
The fact that we can scroll back to areas that went off screen, then select that text for cut+paste, means that there is an accessible buffer where that content can be reached directly and specifically.
Is there a process, using linux/bash built-ins or utilites, which would permit the user to access specific segments of that content buffer (which are otherwise accessible via mouse selection) from within a bash script (preferrably directly ... and, if not, possibly via prompted mouse interraction) ?
If unable to do that selectively, is there a way, again from within a bash script, to get a snapshot of that full 2000-line buffer and save it to a script-defined file, where it could then be manipulated ?
JS has this great feature called console.table. It allows a list of objects to be displayed as a table.
Now I could like to create a simple little program that continously displays the same table just with updated values (individual values change very fast, so a re render only on change isn't an option)
So far I got the best results simply rendering one table after the other, which leaves the most recent table always at the bottom. The problem with this is that it fills the entire terminal extremely fast and as such makes scrolling back up difficult.
Another option would be to clear the terminal and the print the table again. But this leads to excessive "blinking" which makes the table unreadable.
So basically I would need a way to print the console.table, somehow get the terminal cursor back to the start of a table and the overwrite it, similar to how it works in a lot of terminal programms like htop. Is there a way to do this in node js?
I have an XLSM file which contains 2 Web Query connection. When I go to "Connections" in the "Data" tab I am presented with the two connections I have.
For each of these I can edit some properties, one which says "Update every X minutes". I've set this to 1 minute and also ticked "Activate background update".
This, however, won't work as the web query connections aren't run anyway.
Ultimately what I need is to run these connections automatically once every hour. Preferably without any user interaction and without the document being open.
Is this possible?
You can't refresh a connection without the file being open. You can run queries on opening the file or create a VBA routine that opens the file, then uses the RefreshAll and saves over the original file every hour.
You can use VBS too.
The final solution by OP:
I ended up making a little VBS script to handle the open, refresh,
close. Then a batch script wrapper to handle running the VBS script
and logging. Finally Windows Task Scheduler to run the batch script
periodically.
when login using putty autologin script runs and ask for option to select. Is it possible to provide input to that via another batch file / script?
example: when i login to say 1.1.1.10 using batch file it will popup window which is asking for input option number from 1 to 10. i want to input that option automatically.
Since you mentioned putty, I am assuming you are working on a windows workstation. And I am not sure if you are familiar with autohotkey but, you can do this pretty easily using a autohotkey code snippet. Something like this:
^+P:: ; shift-ctrl-P is the hotkey combo to activate this code
send #r ;open windows run dialog box
send \path\to\putty.exe hostname.domain.com{enter} ; stary putty and connect to server
sleep 5000 ; wait 5 seconds for connection to establish
send username{enter} ; types your username and hits enter
sleep 1000 ; wait 1 second for password prompt
send password{enter} ; types your password and hits enter
sleep 5000 ; wait 5 seconds for your autologin script to run and display menu
send 1{enter} ; type your selection and hit enter (assumes your selection is "1" here
return ; ends code snippet
You can change the keystrokes and wait periods according to you particular situation.
autohotkey is a free software (for individual use) and can be obtained from http://www.autohotkey.com
my windows 8 app works in the following way:-I have a background process which sends the data which is stored in indexdb to the database.This background process runs every 5 mins automatically.When I am editing or changing any value saved in my list this background method is conflicting with the same value which I am editing and this shows the list in an incorrect manner.I want a solution where I can stop the data which I am editing from conflicting with the background process.