The Aborted Plunge (Metacard to Revolution)
Tariel Gogoberidze
tariel at mac.com
Fri Jun 1 03:31:27 CDT 2007
On Thu, 31 May 2007 15:20:55 -0400 Shari wrote:
> So that means any MC solution cannot take you from script to script to=20=
> edit?
Shari,
If you really want HyperCard style "ss" search, try the solution I=20
posted 2 days ago on this list.
It's a hack but if you would not open and close stacks while handler=20
takes you from script to script, it would work. When you close the=20
script window the handler would take you to the script of next object=20
that contains the search string.
If something goes wrong or you want to stop handler taking you from=20
script to script, just press command + shift key simultaneously.
Below is modified HyperCard "ss" handler.
You can include substacks in search by "put the substacks of this=20
stack" and loop through resulting list as well.
on mouseUp
ss
end mouseUp
on ss tSearchWhat,stackName
global ScriptFindString -- HyperTalk global variable
set lockRecent to true
push card -- remember where we are
if tSearchWhat is empty then
ask "Search for what string?" with ScriptFindString -- =C6
if (it is empty) or (the result is "Cancel") then exit searchScript
put it into tSearchWhat -- otherwise use it as the search=20
tSearchWhat
end if
put tSearchWhat into ScriptFindString
set lockMessages to true -- avoid open messages
if stackName is not empty then
go to stack stackName
end if
set lockMessages to false
if the script of this stack contains tSearchWhatthen then
edit script of this stack
HoldTheExecution
end if
repeat with curCard =3D 1 to the number of cards
if the script of card curCard contains tSearchWhat then
edit the script of card curCard
HoldTheExecution
end if
repeat with curControl =3D 1 to the number of controls
if the script of control curControl contains tSearchWhat then
edit the script of control curControl of card curCard
HoldTheExecution
end if
end repeat
end repeat
end ss
on HoldTheExecution
set the cursor to iBeam
put number of lines of the OpenStacks into N
repeat until number of lines of the OpenStacks < N
if the commandkey is down and the shiftkey is down then exit to top
wait for messages
end repeat
end HoldTheExecution
best regards
Tariel=
More information about the metacard
mailing list