#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@" Docs Patch 2 j, Revolution Documentation Patch U Lucida Grande U Lucida Grande W Lucida Grande Pon preOpenStack set the loc of this stack to the screenloc set the style of this stack to modeless end preOpenStack --------------------------------- on openStack if there is no stack revDocsPath() then -- answer error "Could not find Revolution Documentation." with "Sorry" as sheet disable btn "Apply Patch" exit openStack end if ----- switch case revAppVersion() <> 2.5 answer error "This patch is for Rev 2.5 only." with "Sorry" as sheet disable btn "Apply Patch" break case the script of card id 1002 of stack "revDocs" = the script of btn "NewScript" answer info "This patch has been already applied." as sheet disable btn "Apply Patch" break default enable btn "Apply Patch" end switch end openStack --------------------------------- function revDocsPath local tPath ----- set the itemDel to slash put the filename of stack "revmenubar" into tPath put "help/revdocumentation.rev" into item -2 to -1 of tPath return tPath end revDocsPath , cREVGeneral scriptChecksum GOUy bookmarks handlerList "preOpenStack openStack revDocsPathscriptSelection char 103 to 102prevHandler openStacktempScript script d
on preOpenStack
set the loc of this stack to the screenloc
set the style of this stack to modeless
end preOpenStack
---------------------------------
on openStack
if there is no stack revDocsPath() then --
answer error "Could not find Revolution Documentation." with "Sorry" as sheet
disable btn "Apply Patch"
exit openStack
end if
-----
switch
case revAppVersion() <> 2.5
answer error "This patch is for Rev 2.5 only." with "Sorry" as sheet
disable btn "Apply Patch"
break
case the script of card id 1002 of stack "revDocs" = the script of btn "NewScript"
answer info "This patch has been already applied." as sheet
disable btn "Apply Patch"
break
default
enable btn "Apply Patch"
end switch
end openStack
---------------------------------
function revDocsPath
local tPath
-----
set the itemDel to slash
put the filename of stack "revmenubar" into tPath
put "help/revdocumentation.rev" into item -2 to -1 of tPath
return tPath
end revDocsPath
NewScript Ep ;on preOpenStack local tFolder if the cRevDocsRect of stack "revPreferences" <> "" then set the rect of this stack to the cRevDocsRect of stack "revPreferences" end if put "" into fld "status" if the platform = "MacOS" and char 1 of the systemVersion = "1" then set the decorations of this stack to "metal,title,minimize,maximize,close" else set the decorations of this stack to "default" end if repeat with X=1 to the number of btns of group "toolbar" if the platform = "MacOS" then set the style of btn X of group "toolbar" to "rectangle" else set the style of btn X of group "toolbar" to "standard" end if set the textAlign of btn X of group "toolbar" to "center" set the showBorder of btn X of group "toolbar" to false end repeat set the uBackList of this stack to the cRevDocs["uBackList"] of stack "revPreferences" set the uForwardList of this stack to the cRevDocs["uForwardList"] of stack "revPreferences" set the enabled of btn "back" to the uBackList of this stack <> empty set the enabled of btn "forward" to the uForwardList of this stack <> empty set the itemDel to "," repeat for each item tBtn in "Dictionary,Objects,FAQ,Topics,Bookmarks" if the textStyle of btn tBtn is "bold" then goIndex tBtn end repeat if the enabled of btn "Back" and the textStyle of btn "Dictionary" is "bold" then send "mouseUp" to btn "Back" end preOpenStack ------------------------------------- on arrowKey pDirection switch pDirection case "up" case "down" if the short name of the target = "List" then send "mouseUp" to fld "List" in 1 tick pass arrowKey end if break case "left" click at the loc of btn "Back" break case "right" click at the loc of btn "Forward" break end switch end arrowKey ------------------------------------- on openStack global gRevHelpHiliteColor put the cRevHelpHiliteColor of stack "revPreferences" into gRevHelpHiliteColor pass openStack end openStack on closeStack set the cRevDocsRect of stack "revPreferences" to the rect of this stack set the cRevDocs["uBackList"] of stack "revPreferences" to line 1 to 10 of the uBackList of this stack set the cRevDocs["uForwardList"] of stack "revPreferences" to line 1 to 10 the uForwardList of this stack put "" into fld "find" end closeStack ^ R cREVGeneral scriptChecksum j ȱp bookmarks revUniqueID 1109925894429handlerList *preOpenStack arrowKey openStack closeStackscriptSelection char 1827 to 1826prevHandler tempScript script #on preOpenStack
local tFolder
if the cRevDocsRect of stack "revPreferences" <> "" then
set the rect of this stack to the cRevDocsRect of stack "revPreferences"
end if
put "" into fld "status"
if the platform = "MacOS" and char 1 of the systemVersion = "1" then
set the decorations of this stack to "metal,title,minimize,maximize,close"
else
set the decorations of this stack to "default"
end if
repeat with X=1 to the number of btns of group "toolbar"
if the platform = "MacOS" then
set the style of btn X of group "toolbar" to "rectangle"
else
set the style of btn X of group "toolbar" to "standard"
end if
set the textAlign of btn X of group "toolbar" to "center"
set the showBorder of btn X of group "toolbar" to false
end repeat
set the uBackList of this stack to the cRevDocs["uBackList"] of stack "revPreferences"
set the uForwardList of this stack to the cRevDocs["uForwardList"] of stack "revPreferences"
set the enabled of btn "back" to the uBackList of this stack <> empty
set the enabled of btn "forward" to the uForwardList of this stack <> empty
set the itemDel to ","
repeat for each item tBtn in "Dictionary,Objects,FAQ,Topics,Bookmarks"
if the textStyle of btn tBtn is "bold" then goIndex tBtn
end repeat
if the enabled of btn "Back" and the textStyle of btn "Dictionary" is "bold" then send "mouseUp" to btn "Back"
end preOpenStack
-------------------------------------
on arrowKey pDirection
switch pDirection
case "up"
case "down"
if the short name of the target = "List" then
send "mouseUp" to fld "List" in 1 tick
pass arrowKey
end if
break
case "left"
click at the loc of btn "Back"
break
case "right"
click at the loc of btn "Forward"
break
end switch
end arrowKey
-------------------------------------
on openStack
global gRevHelpHiliteColor
put the cRevHelpHiliteColor of stack "revPreferences" into gRevHelpHiliteColor
pass openStack
end openStack
on closeStack
set the cRevDocsRect of stack "revPreferences" to the rect of this stack
set the cRevDocs["uBackList"] of stack "revPreferences" to line 1 to 10 of the uBackList of this stack
set the cRevDocs["uForwardList"] of stack "revPreferences" to line 1 to 10 the uForwardList of this stack
put "" into fld "find"
end closeStack
Apply Patch Epon mouseUp local tCurPath,tSavePath,tFileType ----- put revDocsPath() into tCurPath -- C put tCurPath into tSavePath set the itemDel to slash put "revdocumentation old.rev" into item -1 of tSavePath ----- if the platform = "MacOS" then put the fileType into tFileType set the fileType to "revoRSTK" end if put url("binfile:" & tCurPath) into url("binfile:" & tSavePath) if the platform = "MacOS" then set the fileType to tFileType ------ set the script of cd ID 1002 of stack tCurPath to the script of btn "NewScript" save stack tCurPath disable me answer info "The patch has been applied." & cr & "A copy of your previous Revolution Documentation was saved as" & cr & tSavePath end mouseUp d cREVGeneral scriptChecksum 5j'A@s{revUniqueID 1109926194716 bookmarks handlerList mouseUptempScript prevHandler arrowKeyscriptSelection char 593 to 592script 0on mouseUp
local tCurPath,tSavePath,tFileType
-----
put revDocsPath() into tCurPath -- C
put tCurPath into tSavePath
set the itemDel to slash
put "revdocumentation old.rev" into item -1 of tSavePath
-----
if the platform = "MacOS" then
put the fileType into tFileType
set the fileType to "revoRSTK"
end if
put url("binfile:" & tCurPath) into url("binfile:" & tSavePath)
if the platform = "MacOS" then set the fileType to tFileType
------
set the script of cd ID 1002 of stack tCurPath to the script of btn "NewScript"
save stack tCurPath
disable me
answer info "The patch has been applied." & cr & "A copy of your previous Revolution Documentation was saved as" & cr & tSavePath
end mouseUp
Info ` (| cREVGeneral bookmarks revUniqueID 1109926471772handlerList prevHandler tempScript script $This patch is for version 2.5 only. # This patch modifies the Revolution Documentation stack in order to remember the last 10 visited topics (even between 2 sessions) and allows the docs to display the last visited topic when opening again. C C $ g 1 Note that all cosmetic updates are not done (as selecting the right line in the dictionary list) since it appeared not quite as simple and does not matter anyway :-) As usual, the use of this software acknowledges that you hereby release me from any liability for any damages, whether direct or indirect and bla and bla and bla But here it is :-) @ SSS.png Hon mouseDown revGoUrl "http://www.sosmartsoftware.com" end mouseDown " -PNG IHDR " . pHYs .# .#x?v 9iCCPPhotoshop ICC profile xڝwTTϽwz0z.0. Qf Ml@DEHb!(`HPb0dFJ|yyǽgs{. $O./ 'z8WGб x 0Y驾A@$/7z HeOOҬT _lN:K"N3"$F/JPrb[䥟}Qd[Sl1x{#bG\NoX3I[ql2 $8xtr p/8pCfq.Knjm͠{r28?.)ɩL^6 g,qm"[Z[Z~Q7%" 3R `̊j[~ : w! $E}kyhyRm333: }=#vʉe tqX)I)B>== <8Xȉ9