Quick question

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
grc
Posts: 13
Joined: Thu Apr 23, 2009 9:21 am

Quick question

Post by grc » Mon May 11, 2009 12:08 pm

I was wondering if there was a way to ask with a button and a field.

I'd like to ask a question with a button called "Paste" which pastes the copied text into the area I want the text AND a text field to enter text into the area I want the text (if its possible a scrolling field would be great cause there's a fair bit of text).

In other words both of these put together:

Code: Select all

Ask "Please enter text here:" titled "Text Entry"
Put it into field "Text"
and

Code: Select all

Answer "Please enter text here:" with "Paste" titled "Text Entry"
If it is "Paste" then
focus field "Text"
paste
end if
Thanks :wink:

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Post by WaltBrown » Mon May 11, 2009 10:32 pm

I put this in a field script and it worked by setting the insertion point then right clicking the mouse:

on mouseup
ask "Please enter text here" titled "Text Entry"
set the clipboardData["text"] to it
paste
end mouseup

Is this what you meant?
Walt
Walt Brown
Omnis traductor traditor

Post Reply