記錄每次錄製都會再查一下的指令集
List 操作
insert testScript after failTestScripts
http://docs.eggplantsoftware.com/ePF/SenseTalk/stk-lists.htm#contents
數字運算
//對變數+1
add 1 to buyCount
日期運算
天數相加//取得今天
put the date into currentDateObj
Log "目前要選擇的今天:"&& currentDateObj && ",欲加天數:"&&addDays
//天數加減 =>changeDateObj
put currentDateObj + (addDays) days into changeDateObj
//找到變動的天數
put day(changeDateObj) into newDay
時間相減並轉換分
put time(depatureTime) into conv2Time
Log "轉換的時間:"&&conv2Time
put the time into nowTime
Log "當前的時間:"&&nowTime
put (conv2Time - nowTime) into secondsElapsed
Log "相差的秒數:"&&secondsElapsed
//這樣除單位會錯誤
//put (secondsElapsed/60) into minsElapsed
put minute(secondsElapsed) into minsElapsed
Log "相差的幾分:"&&minsElapsed
return minsElapsed
字串處理
split fulldate by "/"
put item 1 of fulldate into year
put item 2 of fulldate into month
put item 3 of fulldate into day
取代
//TWD 700 => 700
replace "TWD " by "" in subTotalOfEditTicket
Put the first character in getValidCode into replaceString
Repeat 迴圈
//以下指令可跳出repeat
exit repeat
沒有留言:
張貼留言
留個話吧:)