[Pythonmac-SIG] Modifying table cell content with python-appscript

has hengist.podd at virgin.net
Mon Nov 24 23:33:25 CET 2008


On 24 Nov 2008, at 22:23, Sven A. Schmidt wrote:

>>>> Any idea where the 'unnamed customer' is coming from? Is the  
>>>> appscript 'set' command setting the text field's value? Can you  
>>>> post both your working AppleScript and non-working Python script  
>>>> for comparison? Also, if you can run your application with  
>>>> AEDebug enabled:
>>>
>>> The 'unnamed customer' is the original field value, sorry for not  
>>> mentioning that. It never changes. I don't have an AppleScript,  
>>> I'm just doing this with appscript.
>>
>>
>> Ah, right. I misunderstood - I thought you had it working in  
>> AppleScript but not appscript. Quick question: is the table field  
>> in question editable? (i.e. Can you click in it and type text  
>> manually?)
>
> Yes, it is. I can even make it editable via code (see original  
> description) by setting the focused property. But I can't make the  
> change stick then.

OK. Can you also try the same commands in AppleScript to check if it  
works there or not. Something like:

tell app "System Events"
	tell process "Hourglass"
		set value of text field 1 of row 1 of table 1 of scroll area 3 ¬
			of splitter group 1 of window "Untitled"  to "<string>"
		return value of text field 1 of row 1 of table 1 of scroll area 3 ¬
			of splitter group 1 of window "Untitled"	
	end
end

Thanks,

has
-- 
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net



More information about the Pythonmac-SIG mailing list