dr_eyeball 16 Posted April 14, 2008 Is there a way to get the idc from a control? I have several uses for it. (If not, there are work-arounds still.) We can already get the control from an idc (and display) using displayCtrl. Edit: Thanks for the replies below. That may suffice for now. Share this post Link to post Share on other sites
General Barron 0 Posted April 14, 2008 You could display the control as text, then trim the first 9 characters off of the string. Then, use the parsenumber command to turn the string back into a number. This would also give you the IDD of a display, if you use a display instead of a control. I'm not sure the easiest way to trim a string though. Haven't played with the new string scripting commands, but I think there are methods for turning it into an array, and then turning an array back into a string. Share this post Link to post Share on other sites
t_d 47 Posted April 14, 2008 You could also try to find unique data with ctrlType, ctrlPosition and so on and then search these with the config commands. General Barrons method sounds better though. EDIT: Yup. works good. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> fGetIDC = { _aCtrl = toArray str _this; _cnt = count _aCtrl - 9; for "_i" from 0 to (_cnt-1)do { _aCtrl set [_i, _aCtrl select (_i + 9)]; }; _aCtrl resize _cnt; parseNumber toString _aCtrl }; Share this post Link to post Share on other sites