Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1962 lines
53 KiB

4 years ago
  1. 'TB BVT
  2. '
  3. ' WARNING: This is a piece of junk. No warrantee implied.
  4. 'spaghetti, not authored by me, just scribbled by me, (ajohnh, some time in '95)
  5. '
  6. '$DEFINE MSTEST32
  7. '$IFDEF MSTEST32
  8. '$INCLUDE 'd:\mt32\inc\declares.inc'
  9. '$INCLUDE 'd:\mt32\inc\tbpoke.h'
  10. '$ELSE
  11. '$INCLUDE 'D:\msdev\include\RECORDER.INC'
  12. '$include 'D:\msdev\include\winapi.inc'
  13. '$INCLUDE 'D:\MSDEV\INCLUDE\TBPOKE.H'
  14. '$ENDIF
  15. '//////////////////////////////////////////
  16. '////// borrowed from my in-work TBPoke:
  17. 'logging
  18. global sOutLogName as string
  19. global sScriptName as string
  20. global sComment as string
  21. global hwndViewport as long
  22. global lCountSpace as long
  23. global lCountFunc as long
  24. global lCountTab as long
  25. global MAX_BLANK as long
  26. global sFuncString as string
  27. 'end reporting
  28. global sEndingMessage as string
  29. global sEndTitle as string
  30. 'checkbox function
  31. global sCheckbox as string
  32. global lState as long
  33. 'system metrics
  34. global ScreenX as long
  35. global ScreenY as long
  36. 'time value
  37. global MY_TIMEOUT as long
  38. global PACER as long
  39. global PARAMS as long
  40. global NOPARAMS as long
  41. global hwndTapiControl as hwndTAPI_CONTROL
  42. global ScenarioLog as LOGINITSTRUCT
  43. '$IFDEF MSTEST32
  44. global sdwPrivileges(1 to 10) as string
  45. global sdwMediaModes(1 to 30) as string
  46. '$ELSE
  47. global sdwPrivileges as array of string
  48. global sdwMediaModes as array of string
  49. '$ENDIF
  50. global sPrivileges as string
  51. global sMediaModes as string
  52. '$IFDEF MSTEST32
  53. global hLineApp(1 to 10) as string
  54. global hLine(1 to 10) as string
  55. global hCall(1 to 10) as string
  56. '$ELSE
  57. global hLineApp as array of string
  58. global hLine as array of string
  59. global hCall as array of string
  60. '$ENDIF
  61. redim sdwPrivileges(1 to 3) as string
  62. redim sdwMediaModes(1 to 14) as string
  63. global sdwNumRings as string
  64. redim hLineApp(1 to 5) as string 'limit 5 for now
  65. redim hLine(1 to 5) as string
  66. redim hCall(1 to 5) as string
  67. 'redim hCall(5) as string
  68. '$IFDEF MSTEST32
  69. global hLineAppIndex as string*10
  70. '$ELSE
  71. global hLineAppIndex as pointer to string
  72. '$ENDIF
  73. global slpszDestAddress as string
  74. 'counts
  75. global ldwPrivilegesBitFlag as long
  76. global ldwMediaModesBitFlag as long
  77. global ldwPrivilegesBitFlagChaos as long
  78. global ldwMediaModesBitFlagChaos as long
  79. global lLineApp as long
  80. global lLine as long
  81. global lCall as long
  82. global GenCount as long
  83. global lCountLineApp as long
  84. global GenCount2 as long
  85. global OutCount as long 'benchmarker
  86. 'coverage statistics
  87. 'not yet implemented
  88. global TapiStatistic as TAPI_STATISTIC
  89. global Tracelevel as long 'debug output
  90. global Benchmark as long 'benchmarker
  91. 'duh
  92. hwndTapiControl.TapiHandle = WFndWnd("TAPI32 Browser", FW_DEFAULT) 'find TAPI32 BROWSER
  93. 'by ID, note VT will probably be using the decimal form throughout:
  94. hwndTapiControl.ParamsCheckbox =&h000003f9
  95. hwndTapiControl.LineAppPlusButton =&h000003ee
  96. hwndTapiControl.LineAppMinusButton =&h000003ef
  97. hwndTapiControl.LinePlusButton =&h000003f0
  98. hwndTapiControl.LineMinusButton =&h000003f1
  99. hwndTapiControl.CallPlusButton =&h000003f2
  100. hwndTapiControl.CallMinusButton =&h000003f3
  101. hwndTapiControl.PhoneAppPlusButton =&h000003f4
  102. hwndTapiControl.PhoneAppMinusButton =&h000003f5
  103. hwndTapiControl.PhoneOpenPlusButton =&h000003f6
  104. hwndTapiControl.PhoneOpenMinusButton =&h000003f7
  105. hwndTapiControl.ClearEditButton =&h000003f8
  106. hwndTapiControl.BlankButton0 =&h000003fa
  107. hwndTapiControl.BlankButton1 =&h000003fb
  108. hwndTapiControl.BlankButton2 =&h000003fc
  109. hwndTapiControl.BlankButton3 =&h000003fd
  110. hwndTapiControl.BlankButton4 =&h000003fe
  111. hwndTapiControl.BlankButton5 =&h000003ff
  112. hwndTapiControl.Listbox0 =&h000003e8 'middle box
  113. hwndTapiControl.Listbox1 =&h000003e9 'left box
  114. hwndTapiControl.Editbox =&h000003eb 'right box
  115. '// assign
  116. sOutLogName=curdir$ + "\tapibvt.log"
  117. lCountSpace=0
  118. lCountFunc=0
  119. lCountTab=1
  120. MAX_BLANK=20 'static
  121. 'const MY_TIMOUT=2*Benchmark '//THIS IS DEFINED AFTER BENCHMARK//
  122. PACER = 1
  123. PARAMS=1
  124. NOPARAMS=0
  125. const BUSYLINE="9,5569440" 'ISDN, switch will report busy
  126. const ANSWERLINE="9,9366991" 'ITG dial-up modem pool
  127. const NOLINE=" "
  128. const sOutBenchName="benchmrk.txt" 'benchmarker
  129. '$IFDEF MSTEST32
  130. const LogTypeFile=1 '1 is for log to file
  131. '$ENDIF
  132. 'debug; 0=no debug; 3 low, 2 med, 1 high --I know it is backward
  133. Tracelevel=0
  134. ScreenX=GetSystemMetrics(SM_CXSCREEN)
  135. ScreenY=GetSystemMetrics (SM_CYSCREEN)
  136. ScenarioLog.LogOutputType = LogTypeFile
  137. ScenarioLog.MinDetailLevel = 3
  138. ScenarioLog.ProductVersion = "4"
  139. ScenarioLog.MachineName = "Undefined"
  140. ScenarioLog.LogLocation = "tapibvt.log"
  141. ScenarioLog.Language = "US English"
  142. 'WATCH IT
  143. 'dwPrivileges string in the form of sdwPrivileges
  144. 'change these to pointers ASAP
  145. global NONE as long, MONITOR as long, OWNER as long
  146. sdwPrivileges(1)="NONE"
  147. NONE=1
  148. sdwPrivileges(2)="MONITOR"
  149. MONITOR=2
  150. sdwPrivileges(3)="OWNER"
  151. OWNER=3
  152. 'dwMediaModes string in the form of sdwMediaModes
  153. 'edit this, this is bulky & hacked:
  154. global UNKNOWN as long, INTERACTIVEVOICE as long, AUTOMATEDVOICE as long
  155. global DATAMODEM as long, G3FAX as long, TDD as long, G4FAX as long
  156. global DIGITALDATA as long, TELETEX as long, VIDEOTEX as long
  157. global TELEX as long, MIXED as long, ADSI as long, VOICEVIEW as long
  158. sdwMediaModes(1)="UNKNOWN"
  159. UNKNOWN=1
  160. sdwMediaModes(2)="INTERACTIVEVOICE"
  161. INTERACTIVEVOICE=2
  162. sdwMediaModes(3)="AUTOMATEDVOICE"
  163. AUTOMATEDVOICE=3
  164. sdwMediaModes(4)="DATAMODEM"
  165. DATAMODEM=4
  166. sdwMediaModes(5)="G3FAX"
  167. G3FAX=5
  168. sdwMediaModes(6)="TDD"
  169. TDD=6
  170. sdwMediaModes(7)="G4FAX"
  171. G4FAX=7
  172. sdwMediaModes(8)="DIGITALDATA"
  173. DIGITALDATA=8
  174. sdwMediaModes(9)="TELETEX"
  175. TELETEX=9
  176. sdwMediaModes(10)="VIDEOTEX"
  177. VIDEOTEX=10
  178. sdwMediaModes(11)="TELEX"
  179. TELEX=11
  180. sdwMediaModes(12)="MIXED"
  181. MIXED=12
  182. sdwMediaModes(13)="ADSI"
  183. ADSI=13
  184. sdwMediaModes(14)="VOICEVIEW"
  185. VOICEVIEW=14
  186. dim StartTime as long 'for benchmarker
  187. dim EndTime as long
  188. '$IFDEF MSTEST32
  189. declare function GenTimeOut(OutCount as string) 'generate/generic file-i/o
  190. declare function PerfBox(OutCount as string)
  191. declare function GenOut(sFuncString as string) 'generate/generic file-i/o
  192. declare function GenOutFunc(sFuncString as string) 'generate file-i/o of current declare function
  193. declare function GetFunc (sFuncString as string)
  194. declare function IsRunaway(sFuncString as string) as string
  195. declare function IsComment(sFuncString as string) as string
  196. declare function SetCheckboxControl(sCheckbox as string, lState as long) as long
  197. declare function HitOK() 'hits the OK button
  198. declare function CallAPI(sFuncString as string, lState as long)
  199. declare function SelectParam(sFuncString as string)
  200. declare function SetParamValue(sFuncString as string)
  201. 'declare function SetParamValue(sFuncString as string,ParamValue as string)
  202. declare function SelectBitFlag(sFuncString as string)
  203. declare function EndMsg()
  204. declare function CaptureEdit()
  205. declare function MiddleSelect() 'not yet: sFuncString as string 'selects last item in .Listbox0
  206. declare function lineGetProviderList()
  207. declare function lineGetTranslateCaps()
  208. declare function Box(sFuncString as string)
  209. 'declare function SelectLineApp(lLineApp as long) 'machine
  210. declare function StartApps()
  211. declare function StopApps()
  212. declare function GenChaos() 'all globals
  213. declare function lineInitialize(lLineApp as long) 'all globals; stipulate lLineApp for ease of array; for ex: lineInitialize(lLineApp); lLineApp being long
  214. declare function LineShutdown(lLineApp as long) 'all globals
  215. declare function SelectLineApp(lLineApp as long) 'all globals
  216. declare function SelectLine(lLine as long) 'all globals; prep for lineMakeCall
  217. declare function lineOpen(lLineApp as long, lLine as long, sPrivileges as string, sMediaModes as string)
  218. declare function lineMakeCall(lLine as long, lCall as long, slpszDestAddress as string)
  219. declare function lineDrop(lCall as long)
  220. declare function lineDeallocateCall(lCall as long)
  221. declare function lineAddToConference(lLine as long)
  222. declare function lineAnswer()
  223. declare function Abort()
  224. declare function CheckErr(TAPIErr as string)
  225. declare function lineClose(lLine)
  226. declare function lineGetNewCalls(lLine as long)
  227. declare function lineGetAddressStatus(lLine as long)
  228. declare function lineGetCallInfo(lCall as long)
  229. declare function lineGetCallStatus(lCall as long)
  230. declare function lineSetAppSpecific(lCall as long)
  231. declare function lineDial(lCall as long, slpszDestAddress as string)
  232. declare function lineGetAddressCaps(lLineApp as long)
  233. declare function lineGetAddressID(lLine as long)
  234. declare function lineGetDevConfig()
  235. declare function lineGetDevCaps(lLineApp as long)
  236. declare function lineGetID(lLine as long) 'consider parameter Bit flags here
  237. declare function lineGetLineDevStatus(lLine as long)
  238. declare function lineGetNumRings(lLine as long)
  239. declare function lineGetStatusMessages(lLine as long)
  240. declare function lineHold(lCall as long)
  241. declare function lineSetNumRings(lLine as long, sdwNumRings as string)
  242. declare function lineSetStatusMessages(lLine as long)
  243. declare sub play(text as string)
  244. '$ENDIF
  245. '/////////////////////////////////
  246. '/////// END HEADER /////////////
  247. '/////////////////////////////////
  248. 'prototypes
  249. 'lineInitialze()
  250. 'lineShutdown(hLineApp)
  251. 'lineOpen(hLineApp, dwDeviceID, lphLine, APIVersion, dwExtVersion, dwCallbackInstance, dwPrivileges, dwMediaModes, lpCallParams)
  252. '
  253. 'BENCHMARKER 'hack hack hack
  254. 'delete benchmark file
  255. if exists(sOutLogName) then
  256. kill sOutLogName
  257. end if
  258. 'timer is double precision
  259. if exists(sOutBenchName) then
  260. kill sOutBenchName
  261. end if
  262. StartTime=timer
  263. for OutCount=1 to 100
  264. ' PerfBox(str$(OutCount))
  265. GenTimeOut(str$(OutCount))
  266. next OutCount
  267. EndTime=timer
  268. Benchmark=Endtime-StartTime
  269. GenTimeOut("Benchmark: " + str$(Benchmark))
  270. StatusBox Close
  271. if Benchmark > 3 then
  272. msgbox "YOUR SYSTEM REALLY SUCKS." + chr$(010) + chr$(010) + "Please use a faster system.", MB_OK OR MB_ICONEXCLAMATION, "Slow Bench Warning"
  273. end if
  274. function GenTimeOut(OutCount as string) 'generate/generic file-i/o
  275. Open sOutBenchName for append as #1
  276. print #1, OutCount + chr$(009) ' + time
  277. Close #1
  278. end function
  279. function PerfBox(OutCount as string)
  280. StatusBox "Profiling System Performance..." + chr$(010) + OutCount,0,0,300,100,TRUE,TRUE,"Courier",8,400
  281. end function
  282. '// set timout, now that we have benched
  283. MY_TIMEOUT = 2 + (2 * Benchmark)
  284. '//END BENCHMARKER
  285. viewport on
  286. viewport clear
  287. '#if
  288. '$IFDEF MSTEST32
  289. 'SET UP TRAP ROUTINE
  290. TRAP KeyTrap FROM "T3Trap32.DLL" ALIAS "KeyTrap" 'or T3Trap16.DLL
  291. Beep
  292. STATUSBOX "HOT KEY PRESSED, ABORTING SCRIPT " + Time$
  293. SLEEP 4
  294. END 'ABORT SCRIPT
  295. END TRAP
  296. 'MAIN SCRIPT
  297. SetHotKey ASC("C"), 1 'TRAP Ctrl+c
  298. Beep
  299. STATUSBOX "Press CTRL+C to see this script ABORT"
  300. Sleep 5'SLEEP FOREVER
  301. STATUSBOX "This won't display, unless you BREAK and single step"
  302. '$ELSE
  303. on KeyPress (27,FSHIFT) call KeyPressHandler
  304. sub KeyPressHandler (notification_data AS VARIANT)
  305. statusbox close
  306. 'idyes:6 & idno:7
  307. msgbox "Stop tests?", MB_YESNO OR MB_ICONQUESTION OR MB_DEFBUTTON2, "Interruption"
  308. if idyes then
  309. statusbox close
  310. EndMsg()
  311. End
  312. end if
  313. end sub
  314. '$ENDIF
  315. ' // Run things
  316. StartApps
  317. 'do these after apps are running, duh
  318. hwndViewport = WFndWnd("Visual Test Viewport",FW_DEFAULT)
  319. GenOut("Getting Some")
  320. hwndTapiControl.TapiHandle= WFndWnd("TAPI32 Browser", FW_DEFAULT) 'find TAPI32 BROWSER
  321. 'by ID, note VT will probably be using the decimal form throughout:
  322. WSetActWnd (hwndTapiControl.TapiHandle)
  323. 'maximize window so button clicks work
  324. 'WMaxWnd (hwndTapiControl.TapiHandle)
  325. GenOut("Logfile= " + chr$(009) + curdir$+sOutLogName)
  326. if Tracelevel > 2 then
  327. GenOut("TAPI Browser handle= " + hex$(hwndTapiControl.TapiHandle))
  328. GenOut("GetProcessHeap(): " + hex$(GetProcessHeap()))
  329. GenOut("GetCurrentProcess(): " + hex$(GetCurrentProcess()))
  330. GenOut("GetCurrentProcessID(): " + hex$(GetCurrentProcessID()))
  331. GenOut("GetThread(): " + chr$(009) + hex$(GetCurrentThread()))
  332. GenOut("GetCurrentThreadID(): " + hex$(GetCurrentThreadID()))
  333. end if
  334. GenOut(chr$(010)+chr$(010)+chr$(010))
  335. WSetActWnd (hwndTapiControl.TapiHandle)
  336. 'ensure edit box is clean
  337. '$IFDEF MSTEST32
  338. WButtonClick _id(hwndTapiControl.ClearEditButton), MY_TIMEOUT 'do not uncheck this
  339. '$ELSE
  340. WButtonClick( _id(hwndTapiControl.ClearEditButton), MY_TIMEOUT ) 'do not uncheck this
  341. '$ENDIF
  342. '********************
  343. 'START YOUR ENGINES
  344. 'lineGetProviderList()
  345. WSetActWnd (hwndTapiControl.TapiHandle) 'scatter a few of these since ESP steals focus
  346. 'End Scenario
  347. '********************
  348. '********************
  349. FUNKY:
  350. '$IFDEF MSTEST32
  351. '$ELSE
  352. Scenario "lineMakeCall (stuff)"
  353. '$ENDIF
  354. Box("lineMakeCall (verify busy)")
  355. GenOut("Scenario:" + chr$(009) + "lineMakeCall (verify busy)")
  356. lLineApp=1
  357. lLine=1
  358. lCall=1
  359. lineInitialize(lLineApp)
  360. lineOpen lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM) 'doing this stranglely for now
  361. lineMakeCall lLine, lCall, BUSYLINE 'doing this stranglely for now
  362. lineDrop(lCall)
  363. lineDeallocateCall(lCall)
  364. 'lineClose(lLine)
  365. 'lineShutdown(lLineApp)
  366. Box("lineMakeCall, (status)")
  367. GenOut ("Scenario:" + chr$(009) + "lineMakeCall, (status)")
  368. 'line should be open from earlier routine
  369. 'lineInitialize(lLineApp)
  370. 'lineOpen(lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM)) 'doing this stranglely for now
  371. lineMakeCall lLine, lCall, ANSWERLINE 'doing this stranglely for now
  372. lineGetNewCalls(lLine)
  373. lineGetAddressStatus(lLine)
  374. lineGetCallInfo(lCall)
  375. lineGetCallStatus(lCall)
  376. lineSetAppSpecific(lCall)
  377. lineDrop(lCall)
  378. lineGetCallInfo(lCall)
  379. lineGetCallStatus(lCall)
  380. lineDeallocateCall(lCall)
  381. Box("lineMakeCall, (lineGetAppSpecific)")
  382. GenOut ("Scenario:" + chr$(009) + "lineMakeCall, (lineGetAppSpecific)")
  383. lineMakeCall lLine, lCall, ANSWERLINE
  384. lineDrop(lCall)
  385. lineDeallocateCall(lCall)
  386. Box("lineMakeCall, (Null lpszDestAddress)")
  387. GenOut ("Scenario:" + chr$(009) + "lineMakeCall, (Null lpszDestAddress)")
  388. lineMakeCall lLine, lCall, NOLINE
  389. lineDial lCall, ANSWERLINE
  390. lineDrop(lCall)
  391. lineDeallocateCall(lCall)
  392. lineClose(lLine)
  393. lineShutdown(lLineApp)
  394. '$IFDEF MSTEST32
  395. '$ELSE
  396. End Scenario
  397. '$ENDIF
  398. '********************
  399. '********************
  400. '$IFDEF MSTEST32
  401. '$ELSE
  402. Scenario "lineGetAddressCaps (default)"
  403. '$ENDIF
  404. Box("lineGetAddressCaps (default)")
  405. GenOut("Scenario:" + chr$(009) + "lineGetAddressCaps (default)")
  406. lLineApp=1
  407. lLine=1
  408. lCall=1
  409. lineInitialize(lLineApp)
  410. lineGetAddressCaps(lLineApp)
  411. lineShutdown(lLineApp)
  412. '$IFDEF MSTEST32
  413. '$ELSE
  414. End Scenario
  415. '$ENDIF
  416. '********************
  417. '********************
  418. '$IFDEF MSTEST32
  419. '$ELSE
  420. Scenario "lineGetAddressID (default)"
  421. '$ENDIF
  422. Box("lineGetAddressID (default)")
  423. GenOut("Scenario:" + chr$(009) + "lineGetAddressID (default)")
  424. lLineApp=1
  425. lLine=1
  426. lCall=1
  427. lineInitialize(lLineApp)
  428. lineOpen lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM) 'doing this stranglely for now
  429. lineGetAddressID(lLine)
  430. lineClose(lLine)
  431. lineShutdown(lLineApp)
  432. '$IFDEF MSTEST32
  433. '$ELSE
  434. End Scenario
  435. '$ENDIF
  436. '********************
  437. '********************
  438. '$IFDEF MSTEST32
  439. '$ELSE
  440. Scenario "lineGetAddressStatus (default)"
  441. '$ENDIF
  442. Box("lineGetAddressStatus (default)")
  443. GenOut("Scenario:" + chr$(009) + "lineGetAddressStatus (default)")
  444. lLineApp=1
  445. lLine=1
  446. lCall=1
  447. lineInitialize(lLineApp)
  448. lineOpen lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM) 'doing this stranglely for now
  449. lineGetAddressStatus(lLine)
  450. lineClose(lLine)
  451. lineShutdown(lLineApp)
  452. '$IFDEF MSTEST32
  453. '$ELSE
  454. End Scenario
  455. '$ENDIF
  456. '********************
  457. '********************
  458. '$IFDEF MSTEST32
  459. '$ELSE
  460. Scenario "lineGetDevConfig (default)"
  461. '$ENDIF
  462. Box("lineGetDevConfig (default)")
  463. GenOut("Scenario:" + chr$(009) + "lineGetDevConfig (default)")
  464. lLineApp=1
  465. lLine=1
  466. lCall=1
  467. lineInitialize(lLineApp)
  468. lineGetDevConfig 'no arguments, yet
  469. lineShutdown(lLineApp)
  470. '$IFDEF MSTEST32
  471. '$ELSE
  472. End Scenario
  473. '$ENDIF
  474. '********************
  475. '********************
  476. '$IFDEF MSTEST32
  477. '$ELSE
  478. Scenario "lineGetDevCaps (default)"
  479. '$ENDIF
  480. Box("lineGetDevCaps (default)")
  481. GenOut("Scenario:" + chr$(009) + "lineGetDevCaps (default)")
  482. lLineApp=1
  483. lLine=1
  484. lCall=1
  485. lineInitialize(lLineApp)
  486. lineGetDevCaps(lLineApp)
  487. lineShutdown(lLineApp)
  488. '$IFDEF MSTEST32
  489. '$ELSE
  490. End Scenario
  491. '$ENDIF
  492. '********************
  493. '********************
  494. '$IFDEF MSTEST32
  495. '$ELSE
  496. Scenario "lineGetID (default)"
  497. '$ENDIF
  498. Box("lineGetID (default)")
  499. GenOut("Scenario:" + chr$(009) + "lineGetID (default)")
  500. lLineApp=1
  501. lLine=1
  502. lCall=1
  503. lineInitialize(lLineApp)
  504. lineOpen lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM) 'doing this stranglely for now
  505. lineGetID(lLine)
  506. lineShutdown(lLineApp) 'will close too
  507. '$IFDEF MSTEST32
  508. '$ELSE
  509. End Scenario
  510. '$ENDIF
  511. '********************
  512. '********************
  513. '$IFDEF MSTEST32
  514. '$ELSE
  515. Scenario "lineGetLineDevStatus (default)"
  516. '$ENDIF
  517. Box("lineGetLineDevStatus (default)")
  518. GenOut("Scenario:" + chr$(009) + "lineGetLineDevStatus (default)")
  519. lLineApp=1
  520. lLine=1
  521. lCall=1
  522. lineInitialize(lLineApp)
  523. lineOpen lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM) 'doing this stranglely for now
  524. lineGetLineDevStatus(lLine)
  525. lineShutdown(lLineApp) 'will close too
  526. '$IFDEF MSTEST32
  527. '$ELSE
  528. End Scenario
  529. '$ENDIF
  530. '********************
  531. '********************
  532. '$IFDEF MSTEST32
  533. '$ELSE
  534. Scenario "lineGetNewCalls (default)"
  535. '$ENDIF
  536. Box("lineGetNewCalls (default)")
  537. GenOut("Scenario:" + chr$(009) + "lineGetNewCalls (default)")
  538. lLineApp=1
  539. lLine=1
  540. lCall=1
  541. lineInitialize(lLineApp)
  542. lineOpen lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM) 'doing this stranglely for now
  543. lineGetNewCalls(lLine)
  544. lineShutdown(lLineApp) 'will close too
  545. '$IFDEF MSTEST32
  546. '$ELSE
  547. End Scenario
  548. '$ENDIF
  549. '********************
  550. '********************
  551. '$IFDEF MSTEST32
  552. '$ELSE
  553. Scenario "lineGetNumRings (default)"
  554. '$ENDIF
  555. Box("lineGetNumRings (default)")
  556. GenOut("Scenario:" + chr$(009) + "lineGetNumRings (default)")
  557. lLineApp=1
  558. lLine=1
  559. lCall=1
  560. lineInitialize(lLineApp)
  561. lineOpen lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM) 'doing this stranglely for now
  562. lineGetNumRings(lLine)
  563. lineShutdown(lLineApp) 'will close too
  564. '$IFDEF MSTEST32
  565. '$ELSE
  566. End Scenario
  567. '$ENDIF
  568. '********************
  569. '********************
  570. '$IFDEF MSTEST32
  571. '$ELSE
  572. Scenario "lineGetStatusMessages (default)"
  573. '$ENDIF
  574. Box("lineGetStatusMessages (default)")
  575. GenOut("Scenario:" + chr$(009) + "lineGetStatusMessages (default)")
  576. lLineApp=1
  577. lLine=1
  578. lCall=1
  579. lineInitialize(lLineApp)
  580. lineOpen lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM) 'doing this stranglely for now
  581. lineGetStatusMessages(lLine)
  582. lineShutdown(lLineApp) 'will close too
  583. '$IFDEF MSTEST32
  584. '$ELSE
  585. End Scenario
  586. '$ENDIF
  587. '********************
  588. '********************
  589. '$IFDEF MSTEST32
  590. '$ELSE
  591. Scenario "lineHold (default)"
  592. '$ENDIF
  593. Box("lineHold (default)")
  594. GenOut("Scenario:" + chr$(009) + "lineHold (default)")
  595. lLineApp=1
  596. lLine=1
  597. lCall=1
  598. lineInitialize(lLineApp)
  599. lineOpen lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM) 'doing this stranglely for now
  600. lineMakeCall lLine, lCall, ANSWERLINE 'doing this stranglely for now
  601. lineHold(lCall)
  602. lineDrop(lCall)
  603. lineDeallocateCall(lCall)
  604. lineClose(lLine)
  605. lineShutdown(lLineApp)
  606. '$IFDEF MSTEST32
  607. '$ELSE
  608. End Scenario
  609. '$ENDIF
  610. '********************
  611. '********************
  612. '$IFDEF MSTEST32
  613. '$ELSE
  614. Scenario "lineSetNumRings (default)"
  615. '$ENDIF
  616. Box("lineSetNumRings (default)")
  617. GenOut("Scenario:" + chr$(009) + "lineSetNumRings (default)")
  618. lLineApp=1
  619. lLine=1
  620. lCall=1
  621. sdwNumRings="9"
  622. lineInitialize(lLineApp)
  623. lineOpen lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM) 'doing this stranglely for now
  624. lineSetNumRings lLine, sdwNumRings
  625. lineShutdown(lLineApp) 'will close too
  626. '$IFDEF MSTEST32
  627. '$ELSE
  628. End Scenario
  629. '$ENDIF
  630. '********************
  631. '********************
  632. '********************
  633. '********************
  634. '********************
  635. '********************
  636. ENDME:
  637. 'END 'END 'END
  638. '********************
  639. '********************
  640. 'lineInitialize with one good pass, then individual null params
  641. '$IFDEF MSTEST32
  642. '$ELSE
  643. Scenario "lineInitialize (many)"
  644. '$ENDIF
  645. Box("lineInitialize (many)")
  646. WSetActWnd (hwndTapiControl.TapiHandle) 'freshen
  647. for lLineApp= 0 to 4
  648. CallAPI "lineInitialize",0
  649. next lLineApp
  650. '$IFDEF MSTEST32
  651. '$ELSE
  652. End Scenario
  653. '$ENDIF
  654. '********************
  655. '********************
  656. 'Scenario "lineGetTranslateCaps"
  657. 'Box("lineGetTranslate")
  658. ' lineGetTranslateCaps()
  659. 'End Scenario
  660. '********************
  661. '********************
  662. '$IFDEF MSTEST32
  663. '$ELSE
  664. Scenario "lineShutdown (many)"
  665. '$ENDIF
  666. Box("lineShutdown (many)")
  667. for lLineApp= 0 to 4 'note # of lineInitializes, I was too lazy to set a constant for limit
  668. MiddleSelect
  669. CallAPI "lineShutdown",0
  670. next lLineApp
  671. '$IFDEF MSTEST32
  672. '$ELSE
  673. End Scenario
  674. '$ENDIF
  675. '********************
  676. '********************
  677. '$IFDEF MSTEST32
  678. '$ELSE
  679. Scenario "lineNegotiateAPIVersion (valid)"
  680. '$ENDIF
  681. Box("lineNegotiateAPIVersion (valid)")
  682. '*** disable params, lineInitialize, lineNegotiateAPIVersion with valids, lineShutdown
  683. 'disable params child
  684. CallAPI "lineInitialize",0
  685. MiddleSelect
  686. CallAPI "lineNegotiateAPIVersion",0
  687. MiddleSelect
  688. CallAPI "lineShutdown",0
  689. '$IFDEF MSTEST32
  690. '$ELSE
  691. End Scenario
  692. '$ENDIF
  693. '********************
  694. '********************
  695. '$IFDEF MSTEST32
  696. '$ELSE
  697. Scenario "lineNegotiateAPIVersion (invallow_valhi)"
  698. '$ENDIF
  699. Box("lineNegotiateAPIVersion (invallow_valhi)")
  700. '*** disable params, lineInitialize
  701. '*** enable params, lineNegotiateAPIVersion with invallow and valhi
  702. '*** disable params, lineShutdown
  703. 'no params
  704. CallAPI "lineInitialize",0
  705. CallAPI "lineNegotiateAPIVersion",1
  706. SelectParam("dwAPILowVersion")
  707. SetParamValue("Invalid")
  708. SelectParam("dwAPIHighVersion")
  709. SetParamValue("Valid")
  710. HitOK
  711. MiddleSelect
  712. CallAPI "lineShutdown",0
  713. '$IFDEF MSTEST32
  714. '$ELSE
  715. End Scenario
  716. '$ENDIF
  717. '********************
  718. '$IFDEF MSTEST32
  719. '$ELSE
  720. Scenario "lineNegotiateAPIVersion (vallow_invalhi)"
  721. '$ENDIF
  722. Box("lineNegotiateAPIVersion (vallow_invalhi)")
  723. '*** disable params, lineInitialize
  724. '*** enable params, lineNegotiateAPIVersion with vallow and invalhi
  725. '*** disable params, lineShutdown
  726. 'need params
  727. CallAPI "lineInitialize",0
  728. CallAPI "lineNegotiateAPIVersion",1
  729. SelectParam("dwAPILowVersion")
  730. SetParamValue("Invalid")
  731. SelectParam("dwAPIHighVersion")
  732. SetParamValue("Valid")
  733. HitOK
  734. MiddleSelect
  735. CallAPI "lineShutdown",0
  736. '$IFDEF MSTEST32
  737. '$ELSE
  738. End Scenario
  739. '$ENDIF
  740. '********************
  741. '********************
  742. '$IFDEF MSTEST32
  743. '$ELSE
  744. Scenario "lineNegotiateAPIVersion (invallow_invalhi)"
  745. '$ENDIF
  746. Box("lineNegotiateAPIVersion (invallow_invalhi)")
  747. '*** disable params, lineInitialize
  748. '*** enable params, lineNegotiateAPIVersion with invallow and invalhi
  749. '*** disable params, lineShutdown
  750. 'no params
  751. CallAPI "lineInitialize",0
  752. CallAPI "lineNegotiateAPIVersion",1
  753. SelectParam("dwAPILowVersion")
  754. SetParamValue("Invalid")
  755. SelectParam("dwAPIHighVersion")
  756. SetParamValue("Invalid")
  757. HitOK
  758. MiddleSelect
  759. CallAPI "lineShutdown",0
  760. '$IFDEF MSTEST32
  761. '$ELSE
  762. End Scenario
  763. '$ENDIF
  764. '********************
  765. '********************
  766. '$IFDEF MSTEST32
  767. '$ELSE
  768. Scenario "lineNegotiateAPIVersion_invaldev"
  769. '$ENDIF
  770. Box("lineNegotiateAPIVersion (invaldev)")
  771. '*** disable params, lineInitialize
  772. '*** enable params, lineNegotiateAPIVersion with invalid device
  773. '*** disable params, lineShutdown
  774. CallAPI "lineInitialize",0
  775. CallAPI "lineNegotiateAPIVersion",1
  776. SelectParam("dwDeviceID")
  777. SetParamValue("Invalid")
  778. HitOK
  779. MiddleSelect
  780. CallAPI "lineShutdown",0
  781. '$IFDEF MSTEST32
  782. '$ELSE
  783. End Scenario
  784. '$ENDIF
  785. '********************
  786. '********************
  787. '$IFDEF MSTEST32
  788. '$ELSE
  789. Scenario "lineNegotiateExtVersion"
  790. '$ENDIF
  791. Box("lineNegotiateExtVersion")
  792. '*** disable params, lineInitialize
  793. '*** enable params, lineNegotiateExtVersion
  794. '*** disable params, lineShutdown
  795. 'no params
  796. CallAPI "lineInitialize",0
  797. CallAPI "lineNegotiateExtVersion",0
  798. MiddleSelect
  799. CallAPI "lineShutdown",0
  800. '$IFDEF MSTEST32
  801. '$ELSE
  802. End Scenario
  803. '$ENDIF
  804. '********************
  805. '********************
  806. '*** disable params, lineInitialize
  807. '*** enable params, lineOpen with privilege
  808. '*** disable params, lineShutdown
  809. '$IFDEF MSTEST32
  810. '$ELSE
  811. Scenario "linOpen_privileges (none)"
  812. '$ENDIF
  813. Box("linOpen_privileges (none)")
  814. CallAPI "lineInitialize",0
  815. CallAPI "lineOpen",1
  816. SelectParam("dwPrivileges")
  817. SelectBitFlag("None")
  818. HitOK
  819. MiddleSelect
  820. CallAPI "lineShutdown",0
  821. '$IFDEF MSTEST32
  822. '$ELSE
  823. End Scenario
  824. '$ENDIF
  825. '********************
  826. '********************
  827. '*** disable params, lineInitialize
  828. '*** enable params, lineOpen with privilege
  829. '*** disable params, lineShutdown
  830. '$IFDEF MSTEST32
  831. '$ELSE
  832. Scenario "linOpen_privileges (monitor)"
  833. '$ENDIF
  834. Box("linOpen_privileges (monitor)")
  835. CallAPI "lineInitialize",0
  836. CallAPI "lineOpen",1
  837. SelectParam("dwPrivileges")
  838. SelectBitFlag("Monitor")
  839. HitOK
  840. MiddleSelect
  841. CallAPI "lineShutdown",0
  842. '$IFDEF MSTEST32
  843. '$ELSE
  844. End Scenario
  845. '$ENDIF
  846. '********************
  847. '********************
  848. '*** disable params, lineInitialize
  849. '*** enable params, lineOpen with privilege
  850. '*** disable params, lineShutdown
  851. '$IFDEF MSTEST32
  852. '$ELSE
  853. Scenario "linOpen_privileges (owner)"
  854. '$ENDIF
  855. Box("linOpen_privileges (owner)")
  856. CallAPI "lineInitialize",0
  857. CallAPI "lineOpen",1
  858. SelectParam("dwPrivileges")
  859. SelectBitFlag("Owner")
  860. HitOK
  861. MiddleSelect
  862. CallAPI "lineShutdown",0
  863. '$IFDEF MSTEST32
  864. '$ELSE
  865. End Scenario
  866. '$ENDIF
  867. '********************
  868. '********************
  869. '$IFDEF MSTEST32
  870. '$ELSE
  871. Scenario "linOpen_privileges (multi)"
  872. '$ENDIF
  873. Box("linOpen_privileges (multi)")
  874. CallAPI "lineInitialize",0
  875. CallAPI "lineOpen",1
  876. SelectParam("dwPrivileges")
  877. SelectBitFlag("None")
  878. HitOK
  879. CallAPI "lineOpen",1
  880. SelectParam("dwPrivileges")
  881. SelectBitFlag("Monitor")
  882. HitOK
  883. CallAPI "lineOpen",1
  884. SelectParam("dwPrivileges")
  885. SelectBitFlag("Owner")
  886. HitOK
  887. MiddleSelect
  888. CallAPI "lineShutdown",0
  889. '$IFDEF MSTEST32
  890. '$ELSE
  891. End Scenario
  892. '$ENDIF
  893. '********************
  894. '********************
  895. '*** BEGIN dwPrivileges, dwMediaModes strobing
  896. '*** WATCH THIS: LOOP
  897. '********************
  898. '********************
  899. '*** disable params, lineInitialize
  900. '*** enable params, lineOpen with defaults
  901. '*** disable params, lineShutdown
  902. 'five times
  903. for lLineApp = 0 to 4
  904. '$IFDEF MSTEST32
  905. '$ELSE
  906. Scenario "lineOpen_MediaModes, sdwPrivileges, dwMediaModes.DATAMODEM (TB default)"
  907. '$ENDIF
  908. Box("lineOpen_MediaModes, dwPrivileges.NONE, dwMediaModes.DATAMODEM (TB default)")
  909. CallAPI "lineInitialize",0
  910. CallAPI "lineOpen",0 'defaults are dwPrivileges.NONE, dwMediaModes.DATAMODEM
  911. CallAPI "lineShutdown",0
  912. '$IFDEF MSTEST32
  913. '$ELSE
  914. End Scenario
  915. '$ENDIF
  916. next lLineApp
  917. '********************
  918. '********************
  919. '*** matrix privileges and MediaModes (STRAIGHT THROUGH)
  920. '*** dwMediaModes strobing
  921. '*** [attemts most combos]
  922. for ldwPrivilegesBitFlag = 1 to 3
  923. 'dwPrivileges string in the form of sdwPrivileges
  924. for ldwMediaModesBitFlag = 1 to 14
  925. 'one day, change this to a cleaner array
  926. '********************
  927. '$IFDEF MSTEST32
  928. '$ELSE
  929. Scenario "lineOpen_MediaModes, (STRAIGHT THROUGH) " + sdwPrivileges(ldwPrivilegesBitFlag) + ", " + sdwMediaModes(ldwMediaModesBitFlag)
  930. '$ENDIF
  931. Box("lineOpen_MediaModes, (STRAIGHT THROUGH) " + sdwPrivileges(ldwPrivilegesBitFlag) + ", " + sdwMediaModes(ldwMediaModesBitFlag))
  932. CallAPI "lineInitialize",0
  933. CallAPI "lineOpen",1
  934. SelectParam("dwPrivileges")
  935. SelectBitFlag(sdwPrivileges(1)) 'clear default NONE (1)
  936. SelectBitFlag(sdwPrivileges(ldwPrivilegesBitFlag)) 'set Bit flag
  937. SelectParam("dwMediaModes")
  938. SelectBitFlag(sdwMediaModes(4)) 'clear default DATAMODEM (4)
  939. SelectBitFlag(sdwMediaModes(ldwMediaModesBitFlag))
  940. HitOK
  941. MiddleSelect 'just select anything in the list box
  942. CallAPI "lineShutdown",0
  943. '$IFDEF MSTEST32
  944. '$ELSE
  945. End Scenario
  946. '$ENDIF
  947. next ldwMediaModesBitFlag
  948. next ldwPrivilegesBitFlag
  949. '********************
  950. '********************
  951. '*** END dwMediaModes (STRAIGHT THROUGH)
  952. '********************
  953. '********************
  954. '********************
  955. '********************
  956. goto SKIPCHAOS
  957. '********************
  958. '********************
  959. '*** matrix privileges and MediaModes (CHAOTIC)
  960. '*** dwMediaModes strobing
  961. '*** [try simultaneous operations]
  962. CHAOS:
  963. for GenCount=1 to 200
  964. 'not used: randomize TIMER 'for "bound-ed" chaos
  965. '********************
  966. '$IFDEF MSTEST32
  967. '$ELSE
  968. Scenario ("lineOpen_MediaModes, (CHAOTIC)")
  969. '$ENDIF
  970. Box("lineOpen_MediaModes, (CHAOTIC)")
  971. 'do 5
  972. for lLineApp= 0 to 4
  973. LineInitialize(lLineApp) 'returns hLineApp(lLineApp)
  974. next lLineApp
  975. 'begin Chaos translation here so I may retain my pretty matrix blocks & to increase hits
  976. for lLineApp=0 to 4
  977. GenChaos 'all globals
  978. SelectLineApp(lLineApp)
  979. CallAPI "lineOpen",1
  980. SelectParam("dwPrivileges")
  981. SelectBitFlag(sdwPrivileges(1)) 'clear default NONE (1)
  982. SelectBitFlag(sdwPrivileges(ldwPrivilegesBitFlagChaos)) 'set Bit flag
  983. SelectParam("dwMediaModes")
  984. SelectBitFlag(sdwMediaModes(4)) 'clear default DATAMODEM (4)
  985. SelectBitFlag(sdwMediaModes(ldwMediaModesBitFlagChaos))
  986. HitOK
  987. next lLineApp
  988. 'cleanup, do 5
  989. 'WILL NOT WORK WITHOUT HANDLES
  990. for lLineApp= 0 to 4
  991. LineShutdown(lLineApp)
  992. next lLineApp
  993. '$IFDEF MSTEST32
  994. '$ELSE
  995. End Scenario
  996. '$ENDIF
  997. next GenCount
  998. '********************
  999. '********************
  1000. '*** END dwMediaModes (CHAOTIC)
  1001. '********************
  1002. '********************
  1003. '********************
  1004. '********************
  1005. SKIPCHAOS:
  1006. '********************
  1007. '********************
  1008. '********************
  1009. '********************
  1010. '********************
  1011. '********************
  1012. '*** disable params, lineInitialize
  1013. '*** enable params, lineOpen with privilege
  1014. '*** disable params, lineShutdown
  1015. '$IFDEF MSTEST32
  1016. '$ELSE
  1017. Scenario "linOpen_MediaModes (privileges_multi)"
  1018. '$ENDIF
  1019. Box("linOpen_MediaModes (privileges_multi)")
  1020. CallAPI "lineInitialize",0
  1021. 'as owner
  1022. CallAPI "lineOpen",1
  1023. SelectParam("dwPrivileges")
  1024. SelectBitFlag("Owner")
  1025. SelectParam("dwMediaModes")
  1026. SelectBitFlag("DATAMODEM")
  1027. HitOK
  1028. CallAPI "lineOpen",1
  1029. SelectParam("dwPrivileges")
  1030. SelectBitFlag("Owner")
  1031. SelectParam("dwMediaModes")
  1032. SelectBitFlag("TELETEX")
  1033. HitOK
  1034. CallAPI "lineOpen",1
  1035. SelectParam("dwPrivileges")
  1036. SelectBitFlag("Owner")
  1037. SelectParam("dwMediaModes")
  1038. SelectBitFlag("TELEX")
  1039. HitOK
  1040. CallAPI "lineOpen",1
  1041. SelectParam("dwPrivileges")
  1042. SelectBitFlag("Owner")
  1043. SelectParam("dwMediaModes")
  1044. SelectBitFlag("INTERACTIVEVOICE")
  1045. HitOK
  1046. MiddleSelect
  1047. CallAPI "lineShutdown",0
  1048. '$IFDEF MSTEST32
  1049. '$ELSE
  1050. End Scenario
  1051. '$ENDIF
  1052. '///////////////
  1053. ' *************************
  1054. ' ***** END TEST CASE *****
  1055. ' *************************
  1056. '///////
  1057. '///////
  1058. '///////
  1059. '***** END END END END END END *****
  1060. StatusBox Close
  1061. EndMsg
  1062. End
  1063. '********************
  1064. '********************
  1065. JUNKY:
  1066. '$IFDEF MSTEST32
  1067. '$ELSE
  1068. Scenario "Call Unimplemented APIs"
  1069. '$ENDIF
  1070. Box("Call Unimplemented APIs")
  1071. GenOut("Scenario:" + chr$(009) + "Call Unimplemented APIs")
  1072. 'CallAPI "lineAddToConference",0 'requires two calls on one line
  1073. lLineApp=1
  1074. lLine=1
  1075. lCall=1
  1076. lineInitialize(lLineApp)
  1077. lineOpen lLineApp, lLine, sdwPrivileges(OWNER), sdwMediaModes(DATAMODEM) 'doing this stranglely for now
  1078. lineMakeCall lLine, lCall, BUSYLINE 'doing this stranglely for now
  1079. CallAPI "lineBlindTransfer",0 'requires call
  1080. CallAPI "lineCompleteCall",0 'requires call
  1081. 'CallAPI "lineCompleteTransfer",0 'requires two calls on one line
  1082. CallAPI "lineDevSpecific",0 'requires line
  1083. CallAPI "lineDevSpecificFeature",0 'requires line
  1084. CallAPI "lineForward",0 'requires line
  1085. CallAPI "lineGatherDigits",0 'requires call
  1086. CallAPI "lineGenerateDigits",0 'requires call
  1087. CallAPI "lineGenerateTone",0 'requires call
  1088. lineDrop(lCall)
  1089. lineDeallocateCall(lCall)
  1090. CallAPI "lineGetConfRelatedCalls",0
  1091. CallAPI "lineGetRequest",0
  1092. CallAPI "lineMonitorDigits",0
  1093. CallAPI "lineMonitorMedia",0
  1094. CallAPI "lineMonitorTones",0
  1095. CallAPI "lineNegotiateExtVersion",0
  1096. CallAPI "linePark",0
  1097. CallAPI "linePickup",0
  1098. CallAPI "linePrepareAddToConference",0
  1099. CallAPI "lineRedirect",0
  1100. CallAPI "lineRegisterRequestRecipient",0
  1101. CallAPI "lineRemoveFromConference",0
  1102. CallAPI "lineSecureCall",0
  1103. CallAPI "lineSendUserUserInfo",0
  1104. CallAPI "lineSetAppSpecific",0
  1105. CallAPI "lineSetTerminal",0
  1106. CallAPI "lineSetTollList",0
  1107. CallAPI "lineSetupConference",0
  1108. CallAPI "lineSetupTransfer",0
  1109. CallAPI "lineSwapHold",0
  1110. CallAPI "lineUncompleteCall",0
  1111. CallAPI "lineUnhold",0
  1112. CallAPI "lineUnpark",0
  1113. '$IFDEF MSTEST32
  1114. '$ELSE
  1115. End Scenario
  1116. '$ENDIF
  1117. '********************
  1118. '********************
  1119. '********************
  1120. '********************
  1121. '********************
  1122. '********************
  1123. '********************
  1124. '********************
  1125. '********************
  1126. '********************
  1127. 'Scenario "lineClose"
  1128. '
  1129. 'do not need params
  1130. 'SetCheckboxControl(_id(hwndTapiControl.ParamsCheckbox),0
  1131. 'MiddleSelect
  1132. 'SelectParam("lineClose")
  1133. 'play "{ENTER}"
  1134. '
  1135. 'CaptureEdit
  1136. '
  1137. 'End Scenario
  1138. '
  1139. '/**************************************************/
  1140. 'FUNCTIONS
  1141. 'Outputs, identical until global architecture change
  1142. function GenOut(sFuncString as string) 'generate/generic file-i/o
  1143. ' // open logging file
  1144. box("Calling: " + sFuncString)
  1145. Open sOutLogName for append as #1
  1146. print #1, sFuncString + chr$(009) ' + time
  1147. print hwndViewport, sFuncString + chr$(009) '+ time
  1148. Close #1
  1149. end function
  1150. function GenOutFunc(sFuncString as string) 'generate file-i/o of current function
  1151. ' // open logging file
  1152. box ("Calling: " + sFuncString)
  1153. Open sOutLogName for append as #1
  1154. print #1, sFuncString + chr$(009) + time$
  1155. print hwndViewport, sFuncString + chr$(009) + time$
  1156. Close #1
  1157. end function
  1158. 'for TBPoke only: GetFunc runs the state core, remember to trim tabs
  1159. ' this was from TBPoke, but it has been modified not to look for script file
  1160. function GetFunc (sFuncString as string)
  1161. sFuncString=""
  1162. 'count the entries
  1163. lCountFunc=lCountFunc+1
  1164. sFuncString=trim$(sFuncString,009) 'trim tabs
  1165. sFuncString=trim$(sFuncString," ") 'whatever MST calls a space
  1166. sFuncString=trim$(sFuncString,255) 'trim truespace
  1167. if sFuncString=chr$(000) then sFuncString="COMMENT" 'ASCII null
  1168. end function
  1169. 'Check for runaway file i/o read; consider it "IsCarriageReturn"
  1170. function IsRunaway(sFuncString as string) as string
  1171. if sFuncString="" then
  1172. lCountSpace=lCountSpace+1 'begin counting blank entries
  1173. if lCountSpace=MAX_BLANK then sFuncString="END"
  1174. else
  1175. lCountSpace=0
  1176. end if
  1177. end function
  1178. 'Find comments
  1179. function IsComment(sFuncString as string) as string
  1180. select case(ucase$(left$(sFuncString,1)))
  1181. case ";"
  1182. sFuncString="COMMENT"
  1183. case "#"
  1184. sFuncString="COMMENT"
  1185. case "'"
  1186. sFuncString="COMMENT"
  1187. case ""
  1188. sFuncString="COMMENT"
  1189. 'IsRunaway(sFuncString) 'count blanks to prevent infinite loop
  1190. 'GenOut(sFuncString, hwndViewport)
  1191. end select
  1192. 'find other comments
  1193. select case(left$(sFuncString,2))
  1194. case "//"
  1195. sFuncString="COMMENT"
  1196. end select
  1197. 'find more comments, I know it is not model code, shut up
  1198. select case(left$(sFuncString,4))
  1199. case "REM " 'with space
  1200. sFuncString="COMMENT"
  1201. end select
  1202. end function 'IsComment
  1203. 'toggle checkbox state, will leave focus on sCheckbox
  1204. function SetCheckboxControl(sCheckbox as string, lState as long) as long
  1205. select case(lState)
  1206. case 0
  1207. If WCheckState(sCheckbox) = CHECKED then
  1208. WCheckUnCheck sCheckbox,MY_TIMEOUT
  1209. if Tracelevel>=3 then GenOut ("Unchecking checkbox "+sCheckbox)
  1210. else
  1211. if Tracelevel>=2 then GenOut ("Error: Attempt to WCheckUnCheck unchecked checkbox "+sCheckbox)
  1212. end if
  1213. case 1
  1214. If WCheckState(sCheckbox) = UNCHECKED then
  1215. WCheckCheck sCheckbox,MY_TIMEOUT
  1216. if Tracelevel>=3 then GenOut ("Checking checkbox "+sCheckbox)
  1217. else
  1218. if Tracelevel>=2 then GenOut ("Error: Attempt to WCheckCheck checked checkbox "+sCheckbox)
  1219. end if
  1220. end select
  1221. end function
  1222. function HitOK 'hits the OK button
  1223. WButtonClick "OK", MY_TIMEOUT
  1224. CaptureEdit
  1225. end function
  1226. function CallAPI(sFuncString as string, lState as long)
  1227. if lState > 1 then GenOut("Error: lState is exceeds value of 1.")
  1228. GenOut("API:" + chr$(009) + sFuncString)
  1229. SetCheckboxControl _id(hwndTapiControl.ParamsCheckbox),lState
  1230. WListItemDblClk _id(hwndTapiControl.Listbox1), sFuncString, MY_TIMEOUT
  1231. if lState=0 then CaptureEdit 'so calling the API w/ default params gens output & HitOK gens output (see HitOK)
  1232. end function
  1233. function SelectParam(sFuncString as string)
  1234. GenOut("Parameter:" + chr$(009) + sFuncString)
  1235. WListFind "Parameters:", MY_TIMEOUT
  1236. WListItemDblClk "Parameters:", sFuncString, MY_TIMEOUT
  1237. end function
  1238. function SetParamValue(sFuncString as string)
  1239. GenOut("Parameter Value:" + chr$(009) + sFuncString)
  1240. WEditSetFocus "Value:", MY_TIMEOUT
  1241. select case(ucase$(sFuncString))
  1242. case ucase$("Null")
  1243. play "00000000"
  1244. case ucase$("Valid") 'WATCH THIS: dankn often displays English here
  1245. 'leave it alone, default is VALID or valid value
  1246. 'play "{DOWN}"
  1247. 'play "{DOWN}"
  1248. case ucase$("Invalid")
  1249. play "ffffffff"
  1250. case else
  1251. GenOut("Error: Bad SetParamValue parameter: " + sFuncstring)
  1252. end select
  1253. end function
  1254. 'global ParamValue as string 'put this at front
  1255. 'function SetParamValue(sFuncString as string,ParamValue as string)
  1256. ' SelectParam(sFuncString as string)
  1257. function SelectBitFlag(sFuncString as string)
  1258. GenOut("Select Bit Flag: " + sFuncString)
  1259. 'lineOpen has defaults: dwPrivileges.NONE, dwMediaModes.DATAMODEM
  1260. WListFind "Bit flags:", MY_TIMEOUT
  1261. WListItemDblClk "Bit flags:", sFuncString, MY_TIMEOUT
  1262. 'BitFlag[] sFuncString ;;;; soon add cleanup structure
  1263. end function
  1264. function EndMsg
  1265. sEndingMessage="TB BVT ended."
  1266. sEndTitle="Completed"
  1267. msgbox sEndingMessage, MB_OK, sEndTitle
  1268. end function
  1269. function CaptureEdit
  1270. 'play "{ENTER}" 'assuming child window is in focus and OK button is selected
  1271. 'GenOut("******************** TAPI Report ********************")
  1272. 'GenOut(ListText(_id(hwndTapiControl.Listbox0, MY_TIMEOUT))
  1273. sleep 0.1 'take an i/o break
  1274. GenOut("TAPI Browser reports: ")
  1275. GenOut(EditText(_id(hwndTapiControl.Editbox) + chr$(010), MY_TIMEOUT))
  1276. 'GenOut("******************** END REPORT *********************" + chr$(010 + chr$(010)
  1277. WButtonClick _id(hwndTapiControl.ClearEditButton), MY_TIMEOUT
  1278. end function
  1279. '>>++++
  1280. function MiddleSelect 'not yet: sFuncString as string 'selects last item in .Listbox0
  1281. WListSetFocus _id(hwndTapiControl.Listbox0), MY_TIMEOUT
  1282. 'not yet: WListItemDblClk(_id(hwndTapiControl.Listbox0, sFuncString, MY_TIMEOUT)
  1283. play "{PGDN}"
  1284. end function
  1285. function lineGetProviderList
  1286. CallAPI "lineGetProviderList",0
  1287. end function
  1288. function lineGetTranslateCaps
  1289. CallAPI "lineGetTranslateCaps",0
  1290. Box("Dumping buffer")
  1291. sleep 1
  1292. Box("Dumping buffer")
  1293. sleep 1
  1294. end function
  1295. function Box(sFuncString as string)
  1296. 'disabled, bug in statusbox is stealing focus
  1297. 'StatusBox sFuncString + chr$(009),ScreenX-300,ScreenY-75,300,75,FALSE,FALSE,"Courier",8,400
  1298. end function
  1299. 'function SelectLineApp(lLineApp as long) 'machine
  1300. ' 'later revise to allow real-time monitor of handles
  1301. ' 'select valid lineApp lLineApp, searching top to bottom, exit out having made selection
  1302. ' 'It does look bad. If dankn's conventions stray too far, this will fail
  1303. ' MiddleSelect
  1304. ' if lLineApp > WListCount(_id(hwndTapiControl.Listbox0, MY_TIMEOUT) then
  1305. ' GenOut("Error: BAD ONE, lLineApp of " + str$(lLineApp) + " exceeding WListCount of " + str$(WListCount(_id(hwndTapiControl.Listbox0, MY_TIMEOUT)))
  1306. ' beep
  1307. ' beep
  1308. ' beep
  1309. ' goto SKIPSelectLineApp
  1310. ' end if
  1311. ' play "{PGUP}"
  1312. ' lCountLineApp=WListCount(_id(hwndTapiControl.Listbox0, MY_TIMEOUT)
  1313. ' for GenCount = 1 to lCountLineApp
  1314. ' 'do not down-arrow yet since first item is selected
  1315. ' sLineApp=ListItemText(_id(hwndTapiControl.Listbox0, WListIndex(_id(hwndTapiControl.Listbox0,MY_TIMEOUT),MY_TIMEOUT)
  1316. ' select case (left$(ucase$(sLineApp),9))
  1317. ' case ucase$("LineApp=x") 'first half matches (this may happen with invalids too, so look on
  1318. ' select case (val(right$(sLineApp,8)))
  1319. ' case 0 'is an invalid, so index
  1320. ' play "{DOWN}"
  1321. ' case else 'hex value is non-zero, let us use it
  1322. ' select case (WListIndex(_id(hwndTapiControl.Listbox0,MY_TIMEOUT))
  1323. ' case (lLineApp) 'is this the index requested?
  1324. ' GenCount=lCountLineApp 'return 'get out, leaving it focused
  1325. ' case else 'is not lLineApp, so index
  1326. ' play "{DOWN}"
  1327. ' end select
  1328. ' end select
  1329. ' case else 'is not "LineApp=x", so index
  1330. ' play "{DOWN}"
  1331. ' end select 'THIS MESS DONE SINCE this shitty beta has horrible if-then nesting errors (not me!)
  1332. ' next GenCount
  1333. ' SKIPSelectLineApp: 'skip if lLineApp is bogus value
  1334. 'end function
  1335. function StartApps
  1336. run "MTVIEW.EXE", nowait, SW_NORMAL
  1337. hwndViewport = WFndWnd("Visual Test Viewport",FW_DEFAULT,5) 'find Visual Test Viewport
  1338. if hwndViewport = 0 then
  1339. '$IFDEF MSTEST32
  1340. GenOut("MTVIEW.EXE application failed to start")
  1341. '$ELSE
  1342. fail "MTVIEW.EXE application failed to start"
  1343. '$ENDIF
  1344. end if
  1345. run "TB14.EXE" , nowait , SW_MAXIMIZE 'NOWAIT SW_NORMAL
  1346. sleep 2
  1347. hwndTapiControl.TapiHandle= WFndWnd("TAPI32 Browser", FW_DEFAULT,5) 'find TAPI32 BROWSER
  1348. if hwndTapiControl.TapiHandle= 0 then
  1349. '$IFDEF MSTEST32
  1350. GenOut("TB14.EXE TAPI Brower failed to start")
  1351. '$ELSE
  1352. fail "TB14.EXE TAPI Brower failed to start"
  1353. '$ENDIF
  1354. end if
  1355. end function
  1356. 'not used:
  1357. function StopApps
  1358. hwndViewport = WFndWnd("Visual Test Viewport", FW_DEFAULT or FW_FOCUS)
  1359. if hwndViewport <> 0 then
  1360. Play "%{F4}" 'alt f4
  1361. end if
  1362. hwndTapiControl.TapiHandle = WFndWnd("TAPI32 Browser", FW_DEFAULT or FW_FOCUS)
  1363. if hwndTapiControl.TapiHandle <> 0 then
  1364. Play "%{F4}" 'alt f4
  1365. end if
  1366. end function
  1367. function GenChaos 'all globals
  1368. ldwPrivilegesBitFlagChaos=(int(rnd*3)+1)
  1369. ldwMediaModesBitFlagChaos=(int(rnd*14)+1)
  1370. Box("lineOpen_MediaModes, (CHAOS) LineApp " + str$(lLineApp) + ", " + sdwPrivileges(ldwPrivilegesBitFlagChaos) + ", " + sdwMediaModes(ldwMediaModesBitFlagChaos))
  1371. GenOut("lineOpen_MediaModes, (CHAOS)" + str$(ldwPrivilegesBitFlagChaos) +","+ str$(ldwMediaModesBitFlagChaos) + " LineApp " + str$(lLineApp) + ", " + sdwPrivileges(ldwPrivilegesBitFlagChaos) + ", " + sdwMediaModes(ldwMediaModesBitFlagChaos))
  1372. end function
  1373. function lineInitialize(lLineApp as long) 'all globals; stipulate lLineApp for ease of array; for ex: lineInitialize(lLineApp); lLineApp being long
  1374. CallAPI "lineInitialize",0 'create a LineApp
  1375. 'lineApp is now open...
  1376. CallAPI "lineOpen",1 'cheat, use TB to provide clean handle
  1377. SelectParam("hLineApp") 'select the hLineApp of Params:
  1378. WEditSetFocus "Value:", MY_TIMEOUT 'set focus, no real reason
  1379. hLineApp(lLineApp)=EditText("Value:", MY_TIMEOUT) 'get pointer/handle string
  1380. if Tracelevel >= 1 then GenOut("New hLineApp=" + chr$(009) + hLineApp(lLineApp))
  1381. Abort
  1382. end function
  1383. function LineShutdown(lLineApp as long) 'all globals
  1384. CallAPI "lineShutdown",1
  1385. SelectParam("hLineApp")
  1386. WEditSetFocus "Value:", MY_TIMEOUT 'ready to enter handle
  1387. play hLineApp(lLineApp)
  1388. HitOK
  1389. end function
  1390. function SelectLineApp(lLineApp as long) 'all globals
  1391. MiddleSelect
  1392. WListItemClk _id(hwndTapiControl.Listbox0), "LineApp=x" + (hLineApp(lLineApp)), MY_TIMEOUT
  1393. end function
  1394. 'not implemented
  1395. function SelectLine(lLine as long) 'all globals; prep for lineMakeCall
  1396. MiddleSelect
  1397. ' (_id(hwndTapiControl.Listbox0, "Line=x" + (hLineApp(lLineApp)), MY_TIMEOUT)
  1398. end function
  1399. function lineOpen(lLineApp as long, lLine as long, sPrivileges as string, sMediaModes as string)
  1400. CallAPI "lineOpen",1 'child window is open and focused
  1401. SelectParam("hLineApp")
  1402. WEditSetFocus "Value:", MY_TIMEOUT
  1403. play hLineApp(lLineApp) 'handle of LineApp
  1404. SelectParam("dwPrivileges")
  1405. GenOut("Clearing default on following line:")
  1406. SelectBitFlag(sdwPrivileges(1)) 'clear default NONE (1)
  1407. SelectBitFlag(sPrivileges) 'set Bit flag
  1408. SelectParam("dwMediaModes")
  1409. GenOut("Clearing default on following line:")
  1410. SelectBitFlag(sdwMediaModes(4)) 'clear default DATAMODEM (4)
  1411. SelectBitFlag(sMediaModes)
  1412. HitOK
  1413. CallAPI "lineMakeCall",1 'cheat, use to get hLine value
  1414. SelectParam("hLine")
  1415. WEditSetFocus "Value:", MY_TIMEOUT 'set focus, no real reason
  1416. hLine(lLine)=EditText("Value:", MY_TIMEOUT) 'get pointer/handle string
  1417. if Tracelevel >= 1 then GenOut("New hLine=" + chr$(009) + hLine(lLine))
  1418. Abort 'abort child
  1419. end function
  1420. function lineMakeCall(lLine as long, lCall as long, slpszDestAddress as string)
  1421. CallAPI "lineMakeCall",1 'child window is open and focused
  1422. SelectParam("hLine")
  1423. WEditSetFocus "Value:", MY_TIMEOUT 'set focus, no real reason
  1424. play hLine(lLine) 'specify the handle
  1425. SelectParam("lpszDestAddress")
  1426. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1427. play slpszDestAddress
  1428. WButtonClick "OK", MY_TIMEOUT
  1429. sleep 5
  1430. 'hide dialog
  1431. if slpszDestAddress <> " " then
  1432. WButtonFind "&Talk", 15 'use a way to wait for dialog
  1433. WSetActWnd (hwndTapiControl.TapiHandle) 'refocus TB
  1434. sleep 1
  1435. end if
  1436. 'if slpszDestAddress <> " " then
  1437. ' WSetWndPos ( WFndWnd("Call Status", FW_DEFAULT), ScreenX, ScreenY) 'find Call Status window
  1438. ' sleep 15
  1439. 'end if
  1440. 'if slpszDestAddress <> " " then 'being caution of Talk/Hangup dialog
  1441. ' sleep 12
  1442. ' WButtonClick( "&Talk", MY_TIMEOUT + 10
  1443. 'end if
  1444. '
  1445. CallAPI "lineDrop",1 'cheat, use to get hCall value
  1446. SelectParam("hCall")
  1447. WEditSetFocus "Value:", MY_TIMEOUT
  1448. hCall(lCall)=EditText("Value:", MY_TIMEOUT) 'get pointer/handle string
  1449. if Tracelevel >= 1 then GenOut("New hCall=" + chr$(009) + hCall(lCall))
  1450. Abort
  1451. end function
  1452. function lineDrop(lCall as long)
  1453. CallAPI "lineDrop",1
  1454. SelectParam("hCall")
  1455. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1456. play hCall(lCall) 'specify the handle
  1457. HitOK
  1458. end function
  1459. function lineDeallocateCall(lCall as long)
  1460. CallAPI "lineDeallocateCall",1
  1461. Selectparam("hCall")
  1462. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1463. play hCall(lCall) 'specify handle
  1464. HitOK
  1465. end function
  1466. 'not implemented; in-work
  1467. function lineAddToConference(lLine as long)
  1468. CallAPI "lineAddToConference",1
  1469. Selectparam("hLine")
  1470. 'blah
  1471. end function
  1472. function lineAnswer
  1473. end function
  1474. function Abort
  1475. play "{ESC}" 'abort child
  1476. GenOut("Aborted child window: OK, probably getting handle here." + chr$(010))
  1477. end function
  1478. 'not implemented
  1479. function CheckErr(TAPIErr as string)
  1480. 'lineAddProvider returned LINEERR_INVALPOINTER
  1481. end function
  1482. function lineClose(lLine)
  1483. CallAPI "lineClose",1
  1484. SelectParam("hLine")
  1485. WEditSetFocus "Value:", MY_TIMEOUT 'set focus, no real reason
  1486. play hLine(lLine) 'specify the handle
  1487. HitOK
  1488. end function
  1489. function lineGetNewCalls(lLine as long)
  1490. CallAPI "lineGetNewCalls",1
  1491. SelectParam("hLine")
  1492. WEditSetFocus "Value:", MY_TIMEOUT 'set focus, no real reason
  1493. play hLine(lLine) 'specify the handle
  1494. HitOK
  1495. end function
  1496. function lineGetAddressStatus(lLine as long)
  1497. CallAPI "lineGetAddressStatus",1
  1498. SelectParam("hLine")
  1499. WEditSetFocus "Value:", MY_TIMEOUT 'set focus, no real reason
  1500. play hLine(lLine) 'specify the handle
  1501. HitOK
  1502. end function
  1503. function lineGetCallInfo(lCall as long)
  1504. CallAPI "lineGetCallInfo", 1
  1505. SelectParam("hCall")
  1506. WEditSetFocus "Value:", MY_TIMEOUT 'set focus, no real reason
  1507. play hCall(lCall) 'specify the handle
  1508. HitOK
  1509. end function
  1510. function lineGetCallStatus(lCall as long)
  1511. CallAPI "lineGetCallStatus", 1
  1512. SelectParam("hCall")
  1513. WEditSetFocus "Value:", MY_TIMEOUT 'set focus, no real reason
  1514. play hCall(lCall) 'specify the handle
  1515. HitOK
  1516. end function
  1517. function lineSetAppSpecific(lCall as long)
  1518. CallAPI "lineSetAppSpecific", 1
  1519. SelectParam("hCall")
  1520. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1521. play hCall(lCall) 'specify the handle
  1522. HitOK
  1523. end function
  1524. function lineDial(lCall as long, slpszDestAddress as string)
  1525. CallAPI "lineDial", 1
  1526. SelectParam("hCall")
  1527. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1528. play hCall(lCall) 'specify the handle
  1529. SelectParam("lpszDestAddress")
  1530. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1531. play slpszDestAddress
  1532. WButtonClick "OK", MY_TIMEOUT
  1533. sleep 5
  1534. 'hide dialog
  1535. WButtonFind "&Talk", 15 'use a way to wait for &Talk dialog
  1536. WSetActWnd (hwndTapiControl.TapiHandle) 'refocus TB
  1537. sleep 1
  1538. 'WButtonClick( "&Talk", MY_TIMEOUT + 10
  1539. end function
  1540. function lineGetAddressCaps(lLineApp as long)
  1541. CallAPI "lineGetAddressCaps", 1
  1542. SelectParam("hLineApp")
  1543. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1544. play hLineApp(lLineApp)
  1545. HitOK
  1546. end function
  1547. function lineGetAddressID(lLine as long)
  1548. CallAPI "lineGetAddressID", 1
  1549. SelectParam("hLine")
  1550. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1551. play hLine(lLine)
  1552. HitOK
  1553. end function
  1554. function lineGetDevConfig
  1555. 'ensure a LineApp is open when calling lineGetDevConfig
  1556. CallAPI "lineGetDevConfig", 0
  1557. end function
  1558. function lineGetDevCaps(lLineApp as long)
  1559. Box("Dumping buffer")
  1560. CallAPI "lineGetDevCaps", 1
  1561. SelectParam("hLineApp")
  1562. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1563. play hLineApp(lLineApp)
  1564. HitOK
  1565. end function
  1566. function lineGetID(lLine as long) 'consider parameter Bit flags here
  1567. CallAPI "lineGetID", 1
  1568. SelectParam("hLine")
  1569. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1570. play hLine(lLine)
  1571. HitOK
  1572. end function
  1573. function lineGetLineDevStatus(lLine as long)
  1574. CallAPI "lineGetLineDevStatus", 1
  1575. SelectParam("hLine")
  1576. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1577. play hLine(lLine)
  1578. HitOK
  1579. end function
  1580. function lineGetNumRings(lLine as long)
  1581. CallAPI "lineGetNumRings", 1
  1582. SelectParam("hLine")
  1583. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1584. play hLine(lLine)
  1585. HitOK
  1586. end function
  1587. function lineGetStatusMessages(lLine as long)
  1588. CallAPI "lineGetStatusMessages", 1
  1589. SelectParam("hLine")
  1590. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1591. play hLine(lLine)
  1592. HitOK
  1593. end function
  1594. function lineHold(lCall as long)
  1595. CallAPI "lineHold", 1
  1596. SelectParam("hCall")
  1597. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1598. play hCall(lCall)
  1599. HitOK
  1600. end function
  1601. function lineSetNumRings(lLine as long, sdwNumRings as string)
  1602. CallAPI "lineSetNumRings", 1
  1603. SelectParam("hLine")
  1604. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1605. play hLine(lLine)
  1606. SelectParam("dwNumRings")
  1607. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1608. play sdwNumRings
  1609. HitOK
  1610. end function
  1611. function lineSetStatusMessages(lLine as long)
  1612. CallAPI "lineSetStatusMessages", 1
  1613. SelectParam("hLine")
  1614. WEditSetFocus "Value:", MY_TIMEOUT 'set focus
  1615. play hLine(lLine)
  1616. HitOK
  1617. end function
  1618. sub play(text as string)
  1619. dokeys text
  1620. end sub
  1621. 'truly the end