Uploaded August 2024 | Updated December 2026, 3 hours ago
How to use sqlite3 in Windows command line to create a new database, execute sql commands from file, view database structure and other basics.
.open FILEPATH
.read FILEPATH
.shell cls
.mode column
.tables
.schema TABLE
PRAGMA table_info(TABLE);
last_insert_rowid();
.exit
.database
.shell cd
systempropertiesadvanced
#sqlite
How to use sqlite3 in Windows command line to create a new database, execute sql commands from file, view database structure and other basics.
.open FILEPATH
.read FILEPATH
.shell cls
.mode column
.tables
.schema TABLE
PRAGMA table_info(TABLE);
last_insert_rowid();
.exit
.database
.shell cd
systempropertiesadvanced
#sqlite







![C# - Wait for active window title
Using win32 dll to wait for an external active window such as Notepad in C#. This supports my automation of desktop apps. #csharp
[DllImport(user32.dll)]
static extern IntPtr GetForegroundWindow();
[DllImport(user32.dll)]
static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count);
public static string GetActiveWindowTitle()
{
const int nChars = 256;
StringBuilder buff = new StringBuilder(nChars);
IntPtr handle = GetForegroundWindow();
if (GetWindowText(handle, buff, nChars) 0) //greater than here
{
return buff.ToString();
}
return ;
}
public static int WaitForActiveWindow(string title, int seconds)
{
DateTime startTime;
string activeTitle = ;
startTime = DateTime.Now;
activeTitle = GetActiveWindowTitle();
while (!activeTitle.ToLower().Contains(title.ToLower()))
{
//Check for timeout
if ((DateTime.Now - startTime).TotalSeconds seconds) //greater than here
return 1;
//Check every 0.2 seconds
Thread.Sleep(200);
activeTitle = GetActiveWindowTitle();
}
return 0;
} C# - Wait for active window title](https://i.ytimg.com/vi/6RkFFoFeLUA/mqdefault.jpg)


