Re: [問題] 在文字編輯中插入現在時間

看板MAC作者 (←這人是超級笨蛋)時間13年前 (2012/12/10 21:21), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串4/5 (看更多)
※ 引述《bennyaous (fortune | cowsay)》之銘言: : set {year:y, month:m, day:d} to now : set t to time string of now : set m to text -2 through -1 of ("0" & m * 1) : set d to text -2 through -1 of ("0" & d) : set the clipboard to (y & "/" & m & "/" & d as string) & " " & t : delay 0.1 : tell application "System Events" to keystroke "v" using command down : 註2: : 秒數可用 text 1 through -4 去掉,不過牽涉到 12/24 小時的顯示設定, : 有 AM/PM 的話可能要用 set t to text 1 through -7 of time string of now 要做高級格式客制的話用 shell 的 date 比較快 set datetime to do shell script "date +" & quoted form of "%Y-%m-%d %H:%M" set the clipboard to datetime delay 0.1 tell application "System Events" to keystroke "v" using command down 這個會出現 2012-12-10 21:20 (我打文章的時間) http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/ 這裡面有完整的可用格式符 幾乎要什麼格式都行了 -- 作者 Linux (Windows) 看板 C_and_CPP 標題 [問題] 如何確認是否 free 對記憶體 時間 Fri Nov 2 00:14:03 2012

11/02 00:43,
valgrind, 但 windowns 版的沒試過XD
11/02 00:43

11/02 00:44,
linux 上那真的是不二選擇了
11/02 00:44

11/02 00:45,
我是用 Windows ....>"<
11/02 00:45
-- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.32.81.146 ※ 編輯: uranusjr 來自: 114.32.81.146 (12/10 21:22)

12/11 13:28, , 1F
非常感謝!
12/11 13:28, 1F
文章代碼(AID): #1GnU7ZaU (MAC)
討論串 (同標題文章)
文章代碼(AID): #1GnU7ZaU (MAC)