March 11, 200916 yr Newbies Hi, I've written a simple script to copy any active selection to a field, using the following functions: Middle ( Get (ActiveFieldContents); Get (ActiveSelectionStart); Get (ActiveSelectionSize) ) The problem is that for some types of content the script copies only a portion of the selection (whether the field be a text or calculation field). When I try to evaluate the first expression -- Get (ActiveFieldContents) -- in the DataViewer, I get the following message: invalid argument was encountered and then the DataViewer goes blank. In particular, this bug occurs when the source field in question contains text with a lot of unusual characters and diacritics (I work on medieval german and english), e.g. Ni sínt thie ímo ouh derien, in thiu nan Fránkon werien; 104 thie snélli sine irbiten, thaz síe nan umbiriten. 105 Wanta állaz thaz sies thénkent, sie ịz al mit góte wirkent; 106 ni dúent sies wíht in noti ána sin girati Could it be that such characters confuse the Get (ActiveFieldContents)-function? Because when I insert normal text in the same field the function works fine... (Although I see no particular reason why?) Any suggestions? Kind regards Daan Ghent Belgium
March 12, 200916 yr This is kindof a long shot, but if the "ActiveField" is defined as numeric, that could cause your script to return errors. Please tell me if this is the case.
Create an account or sign in to comment