textfield of what? the result of each line is an integer, if you need text, you must
coerce it to text or a string, like “get bytes sent of status as string”
Model: G5 dual 2,5 GHz
Browser: Safari 419.3
Operating System: Mac OS X (10.4)
tell application "Internet Connect"
set bytes_rec to bytes received of status as string
set bytes_sent to bytes sent of status as string
end tell
display dialog "bytes received: " & bytes_rec & return & "bytes sent: " & bytes_sent
Model: G5 dual 2,5 GHz
Browser: Safari 419.3
Operating System: Mac OS X (10.4)
Since you wrote your app is a ‘GUI Application’ I guess you posted in the wrong forum part? Is it an AppleScript Studio/Xcode Application? Then you write something like this:
tell application "Internet Connect"
set bytes_rec to bytes received of status as string
set bytes_sent to bytes sent of status as string
end tell
set contents of text field "tf" of window "main" to ("bytes received: " & bytes_rec & return & "bytes sent: " & bytes_sent)
(Asuming you have a text field named “tf” on a window named “main”)
thanks for your assistance and for your help - this works great - the ammount
received and sended will now be displayed in the window - not there where I
want it to be displayed, but I will find out why soon…