Need to place cursor after a specific character

Working on making the switch to SuperCard? Many here have done it... ask your questions here.

Need to place cursor after a specific character

Postby Mia » Thu Nov 18, 2010 7:01 pm

How can I script the placement of the cursor between two quote marks?

Thanks, Maria
Mia
 
Posts: 47
Joined: Thu Jan 28, 2010 8:43 pm

Re: Need to place cursor after a specific character

Postby JoeKoomen2011 » Fri Nov 19, 2010 2:13 am

If you know exactly where the quotation marks are (like a given point in a search field) you could do something like:

click at 100,100

or

select after char 1 of bg fld "Search"
Joe Koomen
>> Random! ...Damn near killed 'em! <<
User avatar
JoeKoomen2011
 
Posts: 465
Joined: Thu Mar 12, 2009 1:38 pm

Re: Need to place cursor after a specific character

Postby Mia » Fri Nov 19, 2010 6:36 am

Your first suggestion will not work in my case. Your second worked in hypercard but in Supercard it seems the cursor can only be placed before or after objects.
Mia
 
Posts: 47
Joined: Thu Jan 28, 2010 8:43 pm

Re: Need to place cursor after a specific character

Postby codegreen » Fri Nov 19, 2010 7:44 am

Maria wrote:Your second worked in hypercard but in Supercard it seems the cursor can only be placed before or after objects.

It works here.

:?
-Mark
codegreen
 
Posts: 1518
Joined: Mon Jul 14, 2008 11:03 pm

Re: Need to place cursor after a specific character

Postby Mia » Fri Nov 19, 2010 10:00 am

Yes! It works here too. Then why doesn't this work:?


on mm
put "find " &quote& "" &quote& " in fld " &quote& "Title" &quote into msg
select after char 6 of msg
end mm
Mia
 
Posts: 47
Joined: Thu Jan 28, 2010 8:43 pm

Re: Need to place cursor after a specific character

Postby codegreen » Fri Nov 19, 2010 2:06 pm

Maria wrote:Yes! It works here too. Then why doesn't this work:?

Because the msg box isn't a field.

-Mark
codegreen
 
Posts: 1518
Joined: Mon Jul 14, 2008 11:03 pm

Re: Need to place cursor after a specific character

Postby Mia » Sat Nov 20, 2010 9:04 pm

:x Is there a workaround? The ability to do that in Hypercard saved a lot of time.
Mia
 
Posts: 47
Joined: Thu Jan 28, 2010 8:43 pm

Re: Need to place cursor after a specific character

Postby Didier Gross » Sun Nov 21, 2010 12:29 am

Maria,

What is your real need?

It seems you are trying to achieve something the same way in SC than in HC.

But SC is not HC. You may have to take another way to get things done.

For example, you can easily build your own tool palette, including this kind of search tool and other stuff you use often.
Didier Gross
 
Posts: 47
Joined: Thu Sep 16, 2010 11:32 pm
Location: City of god Lug

Re: Need to place cursor after a specific character

Postby Mia » Sat Nov 27, 2010 11:19 am

I'm just getting back to this question now. Many belated thanks for your reply. My various stacks run somewhat inefficiently in SuperCard but I've not had much time to fix. Once in a while, as in this particular case, I get impatient.

Could you point me to where I can read how to build such a custom Tool Palette?
Mia
 
Posts: 47
Joined: Thu Jan 28, 2010 8:43 pm

Re: Need to place cursor after a specific character

Postby Didier Gross » Sun Nov 28, 2010 2:29 am

Maria,

As the opposite of HC, SC can easily handle multiple windows. That's why SC "applications" are "projects" and no more simple "stacks".

Create a new window in your project, select the palette type, add a field in order to enter the char chain to search, and a search button with the appropriate script.

You may add other little scripts you often use to this window, and when you'll be more familiar with SC, add it to the shared file in order to have it available in any project you are working on.

Reading carefully the SuperCard User Guide will help you a lot and save you a lot of time.
Didier Gross
 
Posts: 47
Joined: Thu Sep 16, 2010 11:32 pm
Location: City of god Lug

Re: Need to place cursor after a specific character

Postby Mia » Wed Dec 01, 2010 7:11 am

Many thanks for this help (and advice). -Maria
Mia
 
Posts: 47
Joined: Thu Jan 28, 2010 8:43 pm


Return to Upgrading From HyperCard

Who is online

Users browsing this forum: No registered users and 1 guest

cron