Page 1 of 1
Copy...duh...
Posted: Mon Sep 21, 2009 8:15 pm
by AlexAdams
It's redicuous how much time we spend in the simple stuff before we ask help.
I cannot get a command to copy the contents of a field to work. This is the code I'm using as per the dictionary:
copy word 1 to -1 of field "fldLabelAddress" of card "crdRecordSummary" of this stack
What am I missing?
Thanks,
Posted: Mon Sep 21, 2009 10:02 pm
by Mark
It is surprising how often people write "it doesn't work" and expect others to know what is going on. Please provide all information you can possibly provide. In cases like these, you really need to provide error messages, the result, and strange unexpected behaviour.
Best,
Mark
What's going on, errors and such
Posted: Mon Sep 21, 2009 11:09 pm
by AlexAdams
button script that initiates the action:
on mouseUp
set blendLevel of me to 0
send copyAddressToClipboard to stack "stkAddressSummary"
end mouseUp
copyAddressToClipboard is a stack script in the same stack:
on copyAddressToClipboard
copy word 1 to -1 of field "fldLabelAddress" of card "crdRecordSummary" of stack "stkAddressSummary"
end copyAddressToClipboard
No syntax error is noted. No error is thrown during execution. It just doesn't put anything into the clipboard.
Posted: Mon Sep 21, 2009 11:15 pm
by Mark
Is the field available on the current card of the stack, AlexAdams?
Mark
Field location
Posted: Mon Sep 21, 2009 11:26 pm
by AlexAdams
The field is on the same card as the button.
Posted: Tue Sep 22, 2009 8:20 am
by Klaus
Hi Laex,
you can set "the clipboarddata["XXX"] by yourself, which is much more reiliable that "copy"!
...
set the clipboarddata["text"] to word 1 to -1 of field "fldLabelAddress" of card "crdRecordSummary" of this stack
...
See "clipboarddata" in the docs (Rev Dictionary)
Best
Klaus
Thanks Karl
Posted: Tue Sep 22, 2009 4:07 pm
by AlexAdams
set the clipboarddata["text"] works great. That is what I started out looking for, but I didn't understand the explanation in the dictionary, so passed over it.
Thanks for the clarification.