SpQueryDlgItemText: Difference between revisions
Appearance
No edit summary |
m Ak120 moved page OS2 API:SPUTILS:spQueryDlgItemText to SpQueryDlgItemText |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 31: | Line 31: | ||
SAY LEFT('',spQueryDlgItemTextLength(hwnd,X2D('3C')),'-') | SAY LEFT('',spQueryDlgItemTextLength(hwnd,X2D('3C')),'-') | ||
[[Category: | [[Category:SpUtils]] |
Latest revision as of 23:46, 26 February 2017
This function queries a text string in a dialog item.
Syntax: text = spQueryDlgItemText ( hwnd , id )
Parameters:
hwnd – The parent window handle. (Handle of the dialog owning the item to be queried. id – Identity of the child window whose text is to be queried.
Returns: The text string that is obtained from the dialog item.
Example Code:
/* findinf1.cmd (spUtils Example Code) */ /* Starts PMSEEK to find all *.INF files on the boot drive containing */ /* the String passed as argument and writes a summery of the results to */ /* stdout. */ CALL RXFUNCADD 'spLoadFuncs','spUtils','spLoadFuncs' CALL spLoadFuncs PARSE ARG searchstr 'START PMSEEK '||spGetBootdrive()||'*.INF '||searchstr CALL spSleep 1000 hwnd=spFindWindowHandle(,,X2D('FA'),,,'PMSEEK.EXE') IF hwnd=0 THEN DO SAY 'PMSeek window not found' RETURN END DO FOREVER text=spQueryDlgItemText(hwnd,X2D('3C')) IF LEFT(text,15)='Search Complete' THEN LEAVE END SAY text SAY LEFT(,spQueryDlgItemTextLength(hwnd,X2D('3C')),'-')