Saturday, April 2, 2022

逆向

【逆向】(改編自網路笑話)

老帥哥白天開車上高速公路的時候,才發現,眼前所看得到的全部汽車,都跟他朝相反的方向行駛。

老帥哥拿起手機,隨手將眼前的「亂象」拍攝下來,直接上傳到Facebook,文字還抱怨寫著:「這年頭啊,年輕人都亂開車,連續這麼多輛汽車,竟然都公然逆向行駛,還對著我一直按喇叭,真是沒有禮貌。想當年,我們的臉皮,才不會這麼厚。」

同一時間,警察廣播電臺,裡面的主持人正在插播緊急的路況:「高速公路有輛車逆向行駛,按喇叭也不理會,一路逆向往前開。請所有駕駛人都要注意」。

Friday, March 18, 2022

A simple 'Type for me' Powershell script

Here is a listing for easier copy/paste.
#
# Powershell script for Windows: TypeForMe.ps1
# MAR. 18, 2022, by Li-Ji Hong (洪李吉, hongliji@gmail.com)
# 
# After starting this script, it will go to next active window, and type for me, according to selected typing command text file.
#
# Typing command text file format's definition:
#
# Any line begin with '#' is a short pause (default 200ms)
# Windows special key strokes, refer to
# https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-powershell-1.0/ff731008(v=technet.10)?redirectedfrom=MSDN
# Others: type each printed characters.
#

param([string]$Filename=".\typing-commands.txt")

add-type -AssemblyName System.Windows.Forms

[System.Windows.Forms.SendKeys]::SendWait("%{TAB}")
Start-Sleep -milliseconds 100

$contents=Get-Content -encoding UTF8 $Filename

foreach ($line in $contents){

    if ($line -match '^#') {
        Start-Sleep -milliseconds 200
        continue
    }

    [System.Windows.Forms.SendKeys]::SendWait($line)
    [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
}

Wednesday, March 16, 2022

跑進台南,跑回高雄

上一次進行類似的慢跑「走進東莞,走回深圳」,已經是近五年前的事情了!

時間過得真快!


台南市南區:


Thursday, February 3, 2022

泰安休息站的「炮仗花」

【泰安休息站的「炮仗花」】
2022.1.28