ITTS:ITTS Scrip:Smart Format

出自ITTS
於 2020年3月23日 (一) 15:29 由 Vincentcheng2116討論 | 貢獻 所做的修訂 (Vincentcheng2116 已移動頁面 ITTS:Smart FormatITTS:ITTS Scrip:Smart Format 並覆蓋原有重新導向)
跳至導覽 跳至搜尋

Smart Format Smart Format:

String process , Min/Max , parameter value could be a smart format,

for Example:

Input = ["aaa " + 'field_A':V10([13][14][16][17])-9900 +" bbb!"] if test result field A:= "1B 24 43 02 99 05" then Output = "aaa 5 bbb!"


please refer Change format to check the means of "V10"

["aaa " + 'field_A':V10([13][14][16][17])-9900 +" bbb!"] ="aaa " +9905 - 9900 +"bbb!" =aaa 5 bbb!

if there is brance "{}" inside the process string please refer to Brance process

More IN/Out example:

Input Output ["aaa " + 'field_A':V10([13][14][16][17])-9900 +" bbb!"] aaa 5 bbb! [ 'Field_A' ] 1B 24 43 02 99 05 12345 12345 ['field_A':S([1][2])] 1B


V10([13][14][16][17]) : Decimal of those character ( only allow number ) S([1][2]) : Get String's 1st & 2nd character ( see more detail)

Remark:

'field_A' Could be another option:

'&Today+10' if Today = '2003/1/14' ==>Today+10 = 2003/1/24' this will return String: '20030124'

'&Time+20' if Today = '11:20:30' ==>Time+20 = '11:40:30' this will return String: '11:40:30'

'&VAR:A1' if varable A1 = 20 this will return String: '20'

'&F:n' n could be 1~99 This key word let got the current test item's result. if test result ="11;22;33;44;55" '&F:1' = 11 '&F:2' = 22 '&F:3' = 33 '&F:5' = 55

'&ANS' This key word let got the latest test result. with one specific answer see more help in Expression Process

'&STR_VAR:A1' if varable A1 = ABCDEFG this will return String: ' ABCDEFG'

'&UTSPATH' if test ITTS path = c:\Program Files\Logitech\ITTS\ this will return String: 'c:\Program Files\ITTS\'

'&ITTSPATH' if test ITTS path = c:\Program Files\Logitech\ITTS\ this will return String: 'c:\Program Files\ITTS\'

'&TESTPLANPATH' if Scrip File = c:\aaa\bbb\NAME.tpe this will return String: 'c:\aaa\bbb\'

'&TESTPLANNAME' if Scrip File = c:\aaa\bbb\NAME.tpe this will return String: 'c:\aaa\bbb\NAME.tpe'

'&YIELD_RATE' return test result yield rate

'&EXPIREDATE' return Scrip File EXPIRE DATE example: 2008/03/17 10:12:08

'&CREATEDATE' return Scrip File create date "YYYY/MM/DD hh:nn:ss" '&PC_NAME' return test PC name

'&CSVLOGFILENAME' CSV (log) file name ( including full path) example: "c:\aaa\MARIGOT_030701_02_A.CSV"

'&PRODUCTIONLINEID' with hex code Return Production Line ID if PIS.ini [Mass Production Config] Production Line#=15 will take PCNAME as PRODUCTIONLINEID since ITTS version 2.8.x.x

&PRODUCTIONLINEID will return 0F

'&MACHINEID' with hex code Return machine ID: A==>01 B==>02 . . Z==>1A

1 ==>01 15==>0F will take PCNAME as PRODUCTIONLINEID ITTS version 2.8.x.x

'&IMAGE_POS_X' Return MainForm Image area's position of X

'&IMAGE_POS_Y' Return MainForm Image area's position of Y

'&IMAGE_WIDTH' Return MainForm Image width

'&IMAGE_HEIGHT' Return MainForm Image Height

'&SCREEN_WIDTH' Return current screen width

'&SCREEN_HEIGHT' Return current screen height

'&DESKTOP_WIDTH' Return desktop width //different with "screen width" when desktop was two or more monitor.

'&DESKTOP_HEIGHT' Return desktop height //different with "screen height" when desktop was two or more monitor.

'&SNO' Return Serial number with hex code if sno=65535 will return "FFFF"

'&UUID' Return UUID Example

      A7F71887-D1DA-11E7-8364-E82A44FF2F22
      to get last 6bte of UUID  :     ['&UUID':S([-12..-1])] =E82A44FF2F22

'&ITTS_VER' or '&UTS_VER' Return version of ITTS if ITTS version=2.2.0.16 will return "02020016"

'&TOPSTACK' Return Top Stack (Scrip File Index) form Scrip File Editor

'&TICKCOUNT' Return PC system tick count ( resolution = 1 mS)

'&CSVPrimaryDir' Return CSV Primary Drive ( for PIS Log file)

'&CSVSecondaryDir' Return CSV Secondary Drive ( for PIS Log file)

'&TESTRESULT' Return Test result Psss(1) or Fail (0) until now.

'&ERRORLINE' Return Test Error Line. ( if pass, return nothing)

'&WeekOfTheYear' Return the Week(s) of the Year

'&DayOfTheYear' Return the day(s) of The Year

'&FreeMemory' Return free physical memory bytes

'&DLLPATH:dllname.dll' Return DLL full path example: '&DLLPATH:ITTS_Drivers.dll' result probably ='C:\Program Files\Logitech\ITTS\ITTS_Drivers\'

'&MAC_Address' Return MAC address of this PC Example: 00-11-43-9F-CD-F6

'&IP_Address' Return IP_Address of this PC Example: 172.17.123.37

'&PASS' Return 1

'&FAIL' Return 0

'&ITTS_Number' : return the ITTS(n) under run. (Share Memory) '&ITTS_Count': return the total number of ITTS is opening. '&ITTS_n_Handle': return ITTSn's handle number (Share Memory) '&ITTS_n_testplan_name': return ITTSn's Scrip File name (Share Memory) '&ITTS_n_testplan_fullname': return ITTSn's Scrip File name include path (Share Memory)

Please refer Change format for more example.

Example 1 [""""+'&CSVLOGFILENAME'+""""] "C:\AAA\DLLTEST_030702_02_A.CSV"

[""""+'&CSVLOGFILENAME'+""""] "C:\AAA\DLLTEST_030702_02_A.CSV"

list of all smart_format: ['&ANS'] ['&CREATEDATE'] ['&CSVLOGFILENAME'] ['&CSVPRIMARYDIR'] ['&CSVSECONDARYDIR'] ['&DAYOFTHEYEAR'] ['&DESKTOP_HEIGHT'] ['&DESKTOP_WIDTH'] ['&DLLPATH:'] ['&ERRORCODE'] ['&ERRORLINE'] ['&EXPIREDATE'] ['&F:n'] ['&FALSE'] ['&FREEMEMORY'] ['&IMAGE_HEIGHT'] ['&IMAGE_POS_X'] ['&IMAGE_POS_Y'] ['&IMAGE_WIDTH'] ['&IP_ADDRESS'] ['&ITTSPATH'] ['&ITTS_VER'] ['&MACHINEID'] ['&MAC_ADDRESS'] ['&PC_NAME'] ['&PRODUCTIONLINEID'] ['&SCREEN_HEIGHT'] ['&SCREEN_WIDTH'] ['&SNO'] ['&STR_VAR:'] ['&SYNTAX_CHECK'] ['&TESTPLANNAME'] ['&TESTPLANPATH'] ['&TESTRESULT'] ['&TICKCOUNT'] ['&TIME'] ['&TODAY'] ['&TOPSTACK'] ['&TRUE'] ['&UTSPATH'] ['&UTS_VER'] ['&UUID'] ['&VAR:'] ['&WEEKOFTHEYEAR'] ['&YIELD_RATE']