#!/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 "$@" AnswerDialog26Patch2 j, Answer Dialog Patch for Rev 2.6 ULucida Grande ULucida Grande WLucida Grande @ULucida Grande UGeorgiaUGeorgiacREVGeometryCachestackID1016 cREVGeneral bookmarks debugObjects handlerList prevHandler tempScriptscript X/* Answer Dialog 2.6 Patch by Eric Chatonet sosmartsoftware.com June 2005 */ on preOpenStack set the loc of this stack to the screenloc set the style of this stack to modeless end preOpenStack --------------------------------- on openStack switch case the script of cd 1 of stack "Answer Dialog" = the script of btn "NewScript" answer info "This patch has been already applied." as sheet disable btn "Apply Patch" break case the script of cd 1 of stack "Answer Dialog" <> the script of btn "CurScript" answer error "This patch is for Rev 2.6 only." with "Sorry" as sheet disable btn "Apply Patch" break default enable btn "Apply Patch" end switch end openStack --------------------------------- function HomePath local tFilePath ----- put the stacks into tFilePath filter tFilePath with "*revmenubar.rev" if tFilePath = empty then answer error "Could not find the right path." with "Sorry" exit to top else set the itemDel to slash put "license.rev" into item -3 to -1 of tFilePath if there is a file tFilePath then return tFilePath answer error "Could not find License.rev stack." with "Sorry" exit to top end if end HomePath ,cREVGeometryCacheIDs110992619471610051109926471772100711105488078761014111942370952610161110540770416160011194237094941015cREVGeometrycachetotal6order  cREVGeneralscriptChecksumv&Su'u bookmarks breakPoints handlerListpreOpenStack openStack HomePathscriptSelectionchar 1161 to 1160 prevHandler openStack tempScriptscript;

/*

Answer Dialog 2.6 Patch by Eric Chatonet

sosmartsoftware.com

June 2005

*/

on preOpenStack

set the loc of this stack to the screenloc

set the style of this stack to modeless

end preOpenStack

---------------------------------

on openStack

switch

case the script of cd 1 of stack "Answer Dialog" = the script of btn "NewScript"

answer info "This patch has been already applied." as sheet

disable btn "Apply Patch"

break

case the script of cd 1 of stack "Answer Dialog" <> the script of btn "CurScript"

answer error "This patch is for Rev 2.6 only." with "Sorry" as sheet

disable btn "Apply Patch"

break

default

enable btn "Apply Patch"

end switch

end openStack

---------------------------------

function HomePath

local tFilePath

-----

put the stacks into tFilePath

filter tFilePath with "*revmenubar.rev"

if tFilePath = empty then

answer error "Could not find the right path." with "Sorry"

exit to top

else

set the itemDel to slash

put "license.rev" into item -3 to -1 of tFilePath

if there is a file tFilePath then return tFilePath

answer error "Could not find License.rev stack." with "Sorry"

exit to top

end if

end HomePath

@ Apply PatchEpon mouseUp local tCurPath,tSavePath,tFileType,tNewScript,tNewCardScript,tPrompt ----- set the cursor to watch ----- saving current home: put HomePath() into tCurPath -- C put tCurPath into tSavePath set the itemDel to slash put "license 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) put the result into tResult if the platform = "MacOS" then set the fileType to tFileType if tResult <> empty then answer error "An error occured when saving a backup of your current home stack." \ & cr & cr & "Process has been stopped." with "Sorry" as sheet exit mouseUp end if ------ set the script of cd 1 of stack "Answer Dialog" to the script of btn "NewScript" save stack "Home" ----- cleaning up: disable the target put "

Answer Dialog patch has been applied succesfully.

" & cr \ & cr & "

To ensure the security, a copy of your previous Home stack has been saved as

" & tSavePath & ".

" into tPrompt replace cr with cr & "

" & cr in tPrompt answer info tPrompt end mouseUp d cREVGeneral scriptChecksume.{cez_ breakPoints handlerListmouseUpscriptSelectionchar 926 to 925 revUniqueID 1109926194716 bookmarks tempScript prevHandlermouseUpscript`

on mouseUp

local tCurPath,tSavePath,tFileType,tNewScript,tNewCardScript,tPrompt

-----

set the cursor to watch

----- saving current home:

put HomePath() into tCurPath -- C

put tCurPath into tSavePath

set the itemDel to slash

put "license 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)

put the result into tResult

if the platform = "MacOS" then set the fileType to tFileType

if tResult <> empty then

answer error "An error occured when saving a backup of your current home stack." \

& cr & cr & "Process has been stopped." with "Sorry" as sheet

exit mouseUp

end if

------

set the script of cd 1 of stack "Answer Dialog" to the script of btn "NewScript"

save stack "Home"

----- cleaning up:

disable the target

put "<p><b>Answer Dialog patch has been applied succesfully.</b></p>" & cr \

& cr & "<p><i>To ensure the security, a copy of your previous Home stack has been saved as</i></p><p><i>" & tSavePath & ".</i></p>" into tPrompt

replace cr with cr & "<p></p>" & cr in tPrompt

answer info tPrompt

end mouseUp

Info xon linkClicked revmail "feedback@sosmartsoftware.com",,"About Answer Dialog Patch","Thanks for giving me your feedback!" & cr & cr end linkClicked (|  cREVGeneralscriptChecksum:ԝ4u10o bookmarks revUniqueID 1109926471772 handlerList linkClickedscriptSelection char 80 to 79 prevHandler linkClicked tempScriptscript

on linkClicked

revmail "feedback@sosmartsoftware.com",,"About Answer Dialog Patch","Thanks for giving me your feedback!" & cr & cr

end linkClicked

 vThis patch for Revolution/DreamCard 2.6 fixes a bug in Answer dialogs which are not displayed properly in some cases. $ $ 'N ( Just click on the Apply Patch button. @1600    Note that the patch saves first a backup of your license.rev stack as license old.rev : so you will be able to revert to the previous state if you wish it by trashing the license.rev stack and suppressing the old suffix from the backup name. @1600 2 3 > H XU     Enjoy! Eric Chatonet  @ Flche2.png q PNG  IHDR Kpl_ pHYs  gAMA|Q cHRMz%u0`:o_FIDATxb?,Xv$ϯ.?~~e'P#@11 @?~23_k_?V@p /÷>|()%ţ,%-F2\@ *n w JU牓/_ o_ū(II` b`AM]Nk5 _ ,?d+@021~K?@fӬ ~W XXY};w<||| ߿}Kw^W@koǑ74;Gڷo_߿uLL7qe`&Fqϟ_sPuFFfbA8`(10r=zk~ TxNP`=l|,IENDB` cREVGeneral revUniqueID 1110540770416SSS.png  Jon mouseDown revGoUrl "http://www.sosmartsoftware.com/" end mouseDown "-PNG  IHDR". pHYs.#.#x?v 9iCCPPhotoshop ICC profilexڝwTTϽwz0z.0. Qf Ml@DEHb!(`HPb0dFJ|yyǽgs{.$O./ 'z8WGбx0Y驾A@$/7z HeOOҬT_lN:K"N3"$F/JPrb[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110548807876 handlerList mouseDownscriptSelection char 57 to 56 prevHandler tempScriptscript

on mouseDown

revGoUrl "http://www.sosmartsoftware.com/"

end mouseDown

 CurScriptEp&on preOpenStack global gAPKLargeFonts, gREVSmallAppIcon, gREVAppIcon --platform specific font adjustments set the defaultStack to "answer dialog" set the default of button 3 to false set the bottomRight of btn "icon 2" to -100,-100 switch the platform case "MacOS" if char 1 of the systemVersion is 1 then put true into tMacOSX set the loc of this stack to the screenLoc set the top of this stack to round(item 4 of the screenRect/5) repeat with i = 3 to the number of btns set the margins of btn i to 4 set the height of btn i to 23 end repeat if char 1 of the systemVersion is 1 then --OS X set the textFont of this stack to "Lucida Grande" set the textSize of this stack to 13 set the textSize of fld 1 to 13 put "210093 210092 210094 210093" into tIcons else set the textFont of this stack to "usesystemfont" set the textSize of this stack to 12 set the textFont of fld 1 to "Geneva" set the textSize of fld 1 to 10 put "210002 210001 210012 210009" into tIcons end if else set the loc of this stack to the screenLoc set the top of this stack to round(item 4 of the screenRect/5) repeat with i = 3 to the number of btns set the bottomMargin of btn i to 3 set the height of btn i to 20 end repeat if char 1 of the systemVersion is 1 then --OS X set the textFont of this stack to "Lucida Grande" set the textSize of this stack to 13 set the textSize of fld 1 to 13 put "210002 210001 210012 210009" into tIcons else set the textFont of this stack to "usesystemfont" set the textSize of this stack to 12 set the textFont of fld 1 to "Geneva" set the textSize of fld 1 to 10 put "210002 210001 210012 210009" into tIcons end if end if break case "Win32" if gAPKLargeFonts then put 26 into tNumber put 7 into tMargin else put 21 into tNumber put 5 into tMargin end if repeat with i = 3 to the number of btns set the bottomMargin of btn i to tMargin set the height of btn i to tNumber set the traversalOn of btn i to false set the mnemonic of btn i to 0 end repeat set the textFont of this stack to "MS Sans Serif" set the textSize of this stack to 10 set the textFont of fld 1 to empty put "210005 210011 210003 210004" into tIcons break default repeat with i = 3 to the number of btns set the bottomMargin of btn i to 4 set the height of btn i to 22 set the traversalOn of btn i to false set the mnemonic of btn i to 0 end repeat set the textFont of this stack to "Helvetica" if gAPKLargeFonts then set the textSize of this stack to 14 else set the textSize of this stack to 12 set the textFont of fld 1 to empty put "210008 210010 210006 210010" into tIcons break end switch --is there an icon to display or not? set the itemDelimiter to numToChar(0) if word 2 of item 1 of the dialogData is "plain" and (not tMacOSX and gREVAppIcon is not empty) then set the loc of btn 1 to -100,21 put 0 into tIconAllowance else set the loc of btn 1 to 26,33 put wordOffset(word 2 of item 1 of the dialogData, "information error warning question") into tIconWord set the icon of button "icon" to word tIconWord of tIcons if tMacOSX then put 87 into tIconAllowance set the loc of btn "icon" to 52,44 -- top is also set later so this is ignored if tIconWord is 0 then --large app icon set the icon of btn "icon" to gREVAppIcon else --small app icon set the icon of btn "icon 2" to gREVSmallAppIcon set the itemDel to comma set the loc of btn "icon 2" to item 1 of the loc of btn "icon" + 16,item 2 of the loc of btn "icon" + 21 set the itemDel to numToChar(0) end if else put 40 into tIconAllowance end if end if --title if item 2 of the dialogData is empty then set the title of this stack to space else set the title of this stack to item 2 of the dialogData put item 3 of dialogData into tText if "

" is in tText or matchChunk(tText, "<(.+>.+") then set the htmlText of fld 1 to tText --if matchText(char 7 to -1 of line 1 of tText,"<[^P]") then else set the text of fld 1 to tText if the platform is "MacOS" and not tMacOSX then set the textFont of fld 1 to "usesystemfont" set the textSize of fld 1 to 12 end if --buttons put item 4 of dialogData into tButtonNames put the number of lines in tButtonNames into tNoOfButtons if tButtonNames is empty then put "OK" into tButtonNames put 1 into tNoOfButtons end if put 32 into tTotalBtnWidth --truncate more buttons to the maximum allowed (7) if tNoOfButtons > the number of buttons - 2 then put the number of buttons - 2 into tNoOfButtons put empty into tMnemonicString repeat with i = 3 to (tNoOfButtons + 3) -- put "got here 1" && i && tNoOfButtons --set the loc of btn i to the cPrevLoc of btn i --show btn set the name of button i to line tNoOfButtons - (i - 3) of tButtonNames -- put "got here 2" && i if the platform is "Win32" and the short name of btn i is not in "OKCancel" then -- put "got here 3" && i put 0 into tNo --put "got here 4" && i repeat for each char x in the short name of btn i -- put "got here 5" && i add 1 to tNo -- put "got here 6" && i if x is not in tMnemonicString then -- put "got here 7" && i put x after tMnemonicString -- put "got here 8" && i set the mnemonic of btn i to tNo -- put "got here 9" && i exit repeat -- put "got here 10" && i end if -- put "got here 11" && i end repeat -- put "got here 12" && i end if set the width of button i to 82 -- put "got here 13" && i if the width of btn i < the formattedWidth of btn i +28 then set the width of btn i to the formattedWidth of btn i + 28 -- put "got here 14" && i add the width of button i + 12 to tTotalBtnWidth -- put "got here 15" && i end repeat set the dontWrap of field 1 to true if tMacOSX then put 4 into tFieldSubtract else put 0 into tFieldSubtract put max(the formattedWidth of field 1 + tIconAllowance + 16, tTotalBtnWidth)+tFieldSubtract into tWidth if tWidth < 400 then put 400 into tWidth end if if tTotalBtnWidth > 450 then put tTotalBtnWidth into tWidth else if tWidth > 450 then put 450 into twidth set the width of field 1 to twidth - tIconAllowance - 16 set the dontWrap of field 1 to false end if put the width of this stack into oldwidth set the width of this stack to twidth -- set the top of button 1 to the height of field 1 div 2 - 12 if tMacOSX then set the top of btn 1 to 18 else set the top of btn 1 to 6 set the itemDel to comma get the rect of fld 1 put (the width of this stack - 12) into item 3 of it set the rect of fld 1 to it if tMacOSX then put 5 into tAddition else put 0 into tAddition put the width of this stack -12 - tAddition into tStartRight put the formattedHeight of field 1 + 58 into tHeight if tHeight > 400 then set the vScrollbar of field 1 to true put 400 into tHeight else set the vScrollbar of field 1 to false set the height of this stack to tHeight set the height of field 1 to tHeight - 58 set the topLeft of field 1 to tIconAllowance + 8, 12 if the platform is "MacOS" then if tMacOSX then put 6 into tAddition else put 0 into tAddition repeat with i = 3 to tNoOfButtons + 2 set the right of btn i to tStartRight subtract the width of btn i + 10 from tStartRight set the bottom of btn i to the height of this stack - 12 - tAddition if i is 5 and tNoOfButtons is 3 and word 1 of the short name of btn i is "Don't" then --move don't save to the left set the left of btn i to the left of fld 1+5 end if end repeat else repeat with i = (tNoOfButtons + 2) down to 3 set the right of btn i to tStartRight subtract the width of btn i + 12 from tStartRight set the bottom of btn i to the height of this stack - 12 set the traversalOn of btn i to true end repeat end if if the platform is "MacOS" then set the top of this stack to round(item 4 of the screenRect/5) set the default of button 3 to true end preOpenStack on commandKeyDown pKey if pKey is "." then if there is a btn "Cancel" then click at the loc of btn "cancel" exit commandKeyDown end if end if repeat with i = 3 to the number of btns if item 1 of the loc of btn i < 1 then next repeat if char 1 of the short name of btn i is pKey then set the hilite of btn i to true wait 50 milliseconds set the hilite of btn i to false send "mouseUp" to btn i exit repeat end if end repeat end commandKeyDown on escapeKey if there is a btn "cancel" then click at the loc of btn "cancel" end escapeKey on closeStack revCleanUpAnswerDialog end closeStack on revCleanUpAnswerDialog --show invisibles compatible removal of btns repeat with i = 3 to the number of buttons set the cPrevLoc of btn i to the loc of btn i set the loc of btn i to -100,-100 end repeat set the dialogData to empty end revCleanUpAnswerDialog on mouseUp if the name of the target contains "button" then lock messages--prevents user stack getting refocusing messages close this stack revCleanUpAnswerDialog--won't get closeStack unlock messages set the dialogData to the short name of the target end if end mouseUp on returnKey pass returnKey to top end returnKey dR cREVGeneralscriptChecksumkfmm*$l bookmarks revUniqueID 1119423709494 handlerListYpreOpenStack commandKeyDown escapeKey closeStack revCleanUpAnswerDialog mouseUp returnKeyscriptSelectionchar 9753 to 9752 prevHandler tempScriptscript5E

on preOpenStack

global gAPKLargeFonts, gREVSmallAppIcon, gREVAppIcon

--platform specific font adjustments

set the defaultStack to "answer dialog"

set the default of button 3 to false

set the bottomRight of btn "icon 2" to -100,-100

switch the platform

case "MacOS"

if char 1 of the systemVersion is 1 then

put true into tMacOSX

set the loc of this stack to the screenLoc

set the top of this stack to round(item 4 of the screenRect/5)

repeat with i = 3 to the number of btns

set the margins of btn i to 4

set the height of btn i to 23

end repeat

if char 1 of the systemVersion is 1 then

--OS X

set the textFont of this stack to "Lucida Grande"

set the textSize of this stack to 13

set the textSize of fld 1 to 13

put "210093 210092 210094 210093" into tIcons

else

set the textFont of this stack to "usesystemfont"

set the textSize of this stack to 12

set the textFont of fld 1 to "Geneva"

set the textSize of fld 1 to 10

put "210002 210001 210012 210009" into tIcons

end if

else

set the loc of this stack to the screenLoc

set the top of this stack to round(item 4 of the screenRect/5)

repeat with i = 3 to the number of btns

set the bottomMargin of btn i to 3

set the height of btn i to 20

end repeat

if char 1 of the systemVersion is 1 then

--OS X

set the textFont of this stack to "Lucida Grande"

set the textSize of this stack to 13

set the textSize of fld 1 to 13

put "210002 210001 210012 210009" into tIcons

else

set the textFont of this stack to "usesystemfont"

set the textSize of this stack to 12

set the textFont of fld 1 to "Geneva"

set the textSize of fld 1 to 10

put "210002 210001 210012 210009" into tIcons

end if

end if

break

case "Win32"

if gAPKLargeFonts then

put 26 into tNumber

put 7 into tMargin

else

put 21 into tNumber

put 5 into tMargin

end if

repeat with i = 3 to the number of btns

set the bottomMargin of btn i to tMargin

set the height of btn i to tNumber

set the traversalOn of btn i to false

set the mnemonic of btn i to 0

end repeat

set the textFont of this stack to "MS Sans Serif"

set the textSize of this stack to 10

set the textFont of fld 1 to empty

put "210005 210011 210003 210004" into tIcons

break

default

repeat with i = 3 to the number of btns

set the bottomMargin of btn i to 4

set the height of btn i to 22

set the traversalOn of btn i to false

set the mnemonic of btn i to 0

end repeat

set the textFont of this stack to "Helvetica"

if gAPKLargeFonts then set the textSize of this stack to 14

else set the textSize of this stack to 12

set the textFont of fld 1 to empty

put "210008 210010 210006 210010" into tIcons

break

end switch

--is there an icon to display or not?

set the itemDelimiter to numToChar(0)

if word 2 of item 1 of the dialogData is "plain" and (not tMacOSX and gREVAppIcon is not empty) then

set the loc of btn 1 to -100,21

put 0 into tIconAllowance

else

set the loc of btn 1 to 26,33

put wordOffset(word 2 of item 1 of the dialogData, "information error warning question") into tIconWord

set the icon of button "icon" to word tIconWord of tIcons

if tMacOSX then

put 87 into tIconAllowance

set the loc of btn "icon" to 52,44 -- top is also set later so this is ignored

if tIconWord is 0 then --large app icon

set the icon of btn "icon" to gREVAppIcon

else

--small app icon

set the icon of btn "icon 2" to gREVSmallAppIcon

set the itemDel to comma

set the loc of btn "icon 2" to item 1 of the loc of btn "icon" + 16,item 2 of the loc of btn "icon" + 21

set the itemDel to numToChar(0)

end if

else

put 40 into tIconAllowance

end if

end if

--title

if item 2 of the dialogData is empty then set the title of this stack to space

else set the title of this stack to item 2 of the dialogData

put item 3 of dialogData into tText

if "<p>" is in tText or matchChunk(tText, "<(.+>.+</.+)>") then set the htmlText of fld 1 to tText

--if matchText(char 7 to -1 of line 1 of tText,"<[^P]") then

else set the text of fld 1 to tText

if the platform is "MacOS" and not tMacOSX then

set the textFont of fld 1 to "usesystemfont"

set the textSize of fld 1 to 12

end if

--buttons

put item 4 of dialogData into tButtonNames

put the number of lines in tButtonNames into tNoOfButtons

if tButtonNames is empty then

put "OK" into tButtonNames

put 1 into tNoOfButtons

end if

put 32 into tTotalBtnWidth

--truncate more buttons to the maximum allowed (7)

if tNoOfButtons > the number of buttons - 2 then put the number of buttons - 2 into tNoOfButtons

put empty into tMnemonicString

repeat with i = 3 to (tNoOfButtons + 3)

-- put "got here 1" && i && tNoOfButtons

--set the loc of btn i to the cPrevLoc of btn i --show btn

set the name of button i to line tNoOfButtons - (i - 3) of tButtonNames

-- put "got here 2" && i

if the platform is "Win32" and the short name of btn i is not in "OKCancel" then

-- put "got here 3" && i

put 0 into tNo

--put "got here 4" && i

repeat for each char x in the short name of btn i

-- put "got here 5" && i

add 1 to tNo

-- put "got here 6" && i

if x is not in tMnemonicString then

-- put "got here 7" && i

put x after tMnemonicString

-- put "got here 8" && i

set the mnemonic of btn i to tNo

-- put "got here 9" && i

exit repeat

-- put "got here 10" && i

end if

-- put "got here 11" && i

end repeat

-- put "got here 12" && i

end if

set the width of button i to 82

-- put "got here 13" && i

if the width of btn i < the formattedWidth of btn i +28 then set the width of btn i to the formattedWidth of btn i + 28

-- put "got here 14" && i

add the width of button i + 12 to tTotalBtnWidth

-- put "got here 15" && i

end repeat

set the dontWrap of field 1 to true

if tMacOSX then put 4 into tFieldSubtract else put 0 into tFieldSubtract

put max(the formattedWidth of field 1 + tIconAllowance + 16, tTotalBtnWidth)+tFieldSubtract into tWidth

if tWidth < 400 then

put 400 into tWidth

end if

if tTotalBtnWidth > 450 then

put tTotalBtnWidth into tWidth

else if tWidth > 450 then

put 450 into twidth

set the width of field 1 to twidth - tIconAllowance - 16

set the dontWrap of field 1 to false

end if

put the width of this stack into oldwidth

set the width of this stack to twidth

-- set the top of button 1 to the height of field 1 div 2 - 12

if tMacOSX then set the top of btn 1 to 18

else set the top of btn 1 to 6

set the itemDel to comma

get the rect of fld 1

put (the width of this stack - 12) into item 3 of it

set the rect of fld 1 to it

if tMacOSX then put 5 into tAddition else put 0 into tAddition

put the width of this stack -12 - tAddition into tStartRight

put the formattedHeight of field 1 + 58 into tHeight

if tHeight > 400 then

set the vScrollbar of field 1 to true

put 400 into tHeight

else set the vScrollbar of field 1 to false

set the height of this stack to tHeight

set the height of field 1 to tHeight - 58

set the topLeft of field 1 to tIconAllowance + 8, 12

if the platform is "MacOS" then

if tMacOSX then put 6 into tAddition else put 0 into tAddition

repeat with i = 3 to tNoOfButtons + 2

set the right of btn i to tStartRight

subtract the width of btn i + 10 from tStartRight

set the bottom of btn i to the height of this stack - 12 - tAddition

if i is 5 and tNoOfButtons is 3 and word 1 of the short name of btn i is "Don't" then

--move don't save to the left

set the left of btn i to the left of fld 1+5

end if

end repeat

else

repeat with i = (tNoOfButtons + 2) down to 3

set the right of btn i to tStartRight

subtract the width of btn i + 12 from tStartRight

set the bottom of btn i to the height of this stack - 12

set the traversalOn of btn i to true

end repeat

end if

if the platform is "MacOS" then set the top of this stack to round(item 4 of the screenRect/5)

set the default of button 3 to true

end preOpenStack

on commandKeyDown pKey

if pKey is "." then

if there is a btn "Cancel" then

click at the loc of btn "cancel"

exit commandKeyDown

end if

end if

repeat with i = 3 to the number of btns

if item 1 of the loc of btn i < 1 then next repeat

if char 1 of the short name of btn i is pKey then

set the hilite of btn i to true

wait 50 milliseconds

set the hilite of btn i to false

send "mouseUp" to btn i

exit repeat

end if

end repeat

end commandKeyDown

on escapeKey

if there is a btn "cancel" then click at the loc of btn "cancel"

end escapeKey

on closeStack

revCleanUpAnswerDialog

end closeStack

on revCleanUpAnswerDialog

--show invisibles compatible removal of btns

repeat with i = 3 to the number of buttons

set the cPrevLoc of btn i to the loc of btn i

set the loc of btn i to -100,-100

end repeat

set the dialogData to empty

end revCleanUpAnswerDialog

on mouseUp

if the name of the target contains "button" then

lock messages--prevents user stack getting refocusing messages

close this stack

revCleanUpAnswerDialog--won't get closeStack

unlock messages

set the dialogData to the short name of the target

end if

end mouseUp

on returnKey

pass returnKey to top

end returnKey

 NewScriptEp&on preOpenStack global gAPKLargeFonts, gREVSmallAppIcon, gREVAppIcon --platform specific font adjustments set the defaultStack to "answer dialog" set the default of button 3 to false set the bottomRight of btn "icon 2" to -100,-100 switch the platform case "MacOS" if char 1 of the systemVersion is 1 then put true into tMacOSX set the loc of this stack to the screenLoc set the top of this stack to round(item 4 of the screenRect/5) repeat with i = 3 to the number of btns set the margins of btn i to 4 set the height of btn i to 23 end repeat if char 1 of the systemVersion is 1 then --OS X set the textFont of this stack to "Lucida Grande" set the textSize of this stack to 13 set the textSize of fld 1 to 13 put "210093 210092 210094 210093" into tIcons else set the textFont of this stack to "usesystemfont" set the textSize of this stack to 12 set the textFont of fld 1 to "Geneva" set the textSize of fld 1 to 10 put "210002 210001 210012 210009" into tIcons end if else set the loc of this stack to the screenLoc set the top of this stack to round(item 4 of the screenRect/5) repeat with i = 3 to the number of btns set the bottomMargin of btn i to 3 set the height of btn i to 20 end repeat if char 1 of the systemVersion is 1 then --OS X set the textFont of this stack to "Lucida Grande" set the textSize of this stack to 13 set the textSize of fld 1 to 13 put "210002 210001 210012 210009" into tIcons else set the textFont of this stack to "usesystemfont" set the textSize of this stack to 12 set the textFont of fld 1 to "Geneva" set the textSize of fld 1 to 10 put "210002 210001 210012 210009" into tIcons end if end if break case "Win32" if gAPKLargeFonts then put 26 into tNumber put 7 into tMargin else put 21 into tNumber put 5 into tMargin end if repeat with i = 3 to the number of btns set the bottomMargin of btn i to tMargin set the height of btn i to tNumber set the traversalOn of btn i to false set the mnemonic of btn i to 0 end repeat set the textFont of this stack to "MS Sans Serif" set the textSize of this stack to 10 set the textFont of fld 1 to empty put "210005 210011 210003 210004" into tIcons break default repeat with i = 3 to the number of btns set the bottomMargin of btn i to 4 set the height of btn i to 22 set the traversalOn of btn i to false set the mnemonic of btn i to 0 end repeat set the textFont of this stack to "Helvetica" if gAPKLargeFonts then set the textSize of this stack to 14 else set the textSize of this stack to 12 set the textFont of fld 1 to empty put "210008 210010 210006 210010" into tIcons break end switch --is there an icon to display or not? set the itemDelimiter to numToChar(0) if word 2 of item 1 of the dialogData is "plain" and (not tMacOSX and gREVAppIcon is not empty) then set the loc of btn 1 to -100,21 put 0 into tIconAllowance else set the loc of btn 1 to 26,33 put wordOffset(word 2 of item 1 of the dialogData, "information error warning question") into tIconWord set the icon of button "icon" to word tIconWord of tIcons if tMacOSX then put 87 into tIconAllowance set the loc of btn "icon" to 52,44 -- top is also set later so this is ignored if tIconWord is 0 then --large app icon set the icon of btn "icon" to gREVAppIcon else --small app icon set the icon of btn "icon 2" to gREVSmallAppIcon set the itemDel to comma set the loc of btn "icon 2" to item 1 of the loc of btn "icon" + 16,item 2 of the loc of btn "icon" + 21 set the itemDel to numToChar(0) end if else put 40 into tIconAllowance end if end if --title if item 2 of the dialogData is empty then set the title of this stack to space else set the title of this stack to item 2 of the dialogData put item 3 of dialogData into tText if "

" is in tText or matchChunk(tText, "<(.+>.+") then set the htmlText of fld 1 to tText --if matchText(char 7 to -1 of line 1 of tText,"<[^P]") then else set the text of fld 1 to tText if the platform is "MacOS" and not tMacOSX then set the textFont of fld 1 to "usesystemfont" set the textSize of fld 1 to 12 end if --buttons put item 4 of dialogData into tButtonNames put the number of lines in tButtonNames into tNoOfButtons if tButtonNames is empty then put "OK" into tButtonNames put 1 into tNoOfButtons end if put 32 into tTotalBtnWidth --truncate more buttons to the maximum allowed (7) if tNoOfButtons > the number of buttons - 2 then put the number of buttons - 2 into tNoOfButtons put empty into tMnemonicString repeat with i = 3 to (tNoOfButtons + 3) -- put "got here 1" && i && tNoOfButtons --set the loc of btn i to the cPrevLoc of btn i --show btn set the name of button i to line tNoOfButtons - (i - 3) of tButtonNames -- put "got here 2" && i if the platform is "Win32" and the short name of btn i is not in "OKCancel" then -- put "got here 3" && i put 0 into tNo --put "got here 4" && i repeat for each char x in the short name of btn i -- put "got here 5" && i add 1 to tNo -- put "got here 6" && i if x is not in tMnemonicString then -- put "got here 7" && i put x after tMnemonicString -- put "got here 8" && i set the mnemonic of btn i to tNo -- put "got here 9" && i exit repeat -- put "got here 10" && i end if -- put "got here 11" && i end repeat -- put "got here 12" && i end if set the width of button i to 82 -- put "got here 13" && i if the width of btn i < the formattedWidth of btn i +28 then set the width of btn i to the formattedWidth of btn i + 28 -- put "got here 14" && i add the width of button i + 12 to tTotalBtnWidth -- put "got here 15" && i end repeat set the dontWrap of field 1 to true if tMacOSX then put 4 into tFieldSubtract else put 0 into tFieldSubtract put max(the formattedWidth of field 1 + tIconAllowance + 16, tTotalBtnWidth)+tFieldSubtract into tWidth if tWidth < 400 then put 400 into tWidth end if if tTotalBtnWidth > 450 then put tTotalBtnWidth into tWidth else if tWidth > 450 then put 450 into twidth set the width of field 1 to twidth - tIconAllowance - 16 end if set the dontWrap of field 1 to false put the width of this stack into oldwidth set the width of this stack to twidth -- set the top of button 1 to the height of field 1 div 2 - 12 if tMacOSX then set the top of btn 1 to 18 else set the top of btn 1 to 6 set the itemDel to comma get the rect of fld 1 put (the width of this stack - 12) into item 3 of it set the rect of fld 1 to it if tMacOSX then put 5 into tAddition else put 0 into tAddition put the width of this stack -12 - tAddition into tStartRight put the formattedHeight of field 1 + 58 into tHeight if tHeight > 400 then set the vScrollbar of field 1 to true put 400 into tHeight else set the vScrollbar of field 1 to false set the height of this stack to tHeight set the height of field 1 to tHeight - 58 set the topLeft of field 1 to tIconAllowance + 8, 12 if the platform is "MacOS" then if tMacOSX then put 6 into tAddition else put 0 into tAddition repeat with i = 3 to tNoOfButtons + 2 set the right of btn i to tStartRight subtract the width of btn i + 10 from tStartRight set the bottom of btn i to the height of this stack - 12 - tAddition if i is 5 and tNoOfButtons is 3 and word 1 of the short name of btn i is "Don't" then --move don't save to the left set the left of btn i to the left of fld 1+5 end if end repeat else repeat with i = (tNoOfButtons + 2) down to 3 set the right of btn i to tStartRight subtract the width of btn i + 12 from tStartRight set the bottom of btn i to the height of this stack - 12 set the traversalOn of btn i to true end repeat end if if the platform is "MacOS" then set the top of this stack to round(item 4 of the screenRect/5) set the default of button 3 to true end preOpenStack on commandKeyDown pKey if pKey is "." then if there is a btn "Cancel" then click at the loc of btn "cancel" exit commandKeyDown end if end if repeat with i = 3 to the number of btns if item 1 of the loc of btn i < 1 then next repeat if char 1 of the short name of btn i is pKey then set the hilite of btn i to true wait 50 milliseconds set the hilite of btn i to false send "mouseUp" to btn i exit repeat end if end repeat end commandKeyDown on escapeKey if there is a btn "cancel" then click at the loc of btn "cancel" end escapeKey on closeStack revCleanUpAnswerDialog end closeStack on revCleanUpAnswerDialog --show invisibles compatible removal of btns repeat with i = 3 to the number of buttons set the cPrevLoc of btn i to the loc of btn i set the loc of btn i to -100,-100 end repeat set the dialogData to empty end revCleanUpAnswerDialog on mouseUp if the name of the target contains "button" then lock messages--prevents user stack getting refocusing messages close this stack revCleanUpAnswerDialog--won't get closeStack unlock messages set the dialogData to the short name of the target end if end mouseUp on returnKey pass returnKey to top end returnKey dR cREVGeneralscriptChecksum)2hV revUniqueID 1119423709526 bookmarks handlerListYpreOpenStack commandKeyDown escapeKey closeStack revCleanUpAnswerDialog mouseUp returnKey tempScript prevHandler closeStackscriptSelectionchar 6751 to 6750script5

on preOpenStack

global gAPKLargeFonts, gREVSmallAppIcon, gREVAppIcon

--platform specific font adjustments

set the defaultStack to "answer dialog"

set the default of button 3 to false

set the bottomRight of btn "icon 2" to -100,-100

switch the platform

case "MacOS"

if char 1 of the systemVersion is 1 then

put true into tMacOSX

set the loc of this stack to the screenLoc

set the top of this stack to round(item 4 of the screenRect/5)

repeat with i = 3 to the number of btns

set the margins of btn i to 4

set the height of btn i to 23

end repeat

if char 1 of the systemVersion is 1 then

--OS X

set the textFont of this stack to "Lucida Grande"

set the textSize of this stack to 13

set the textSize of fld 1 to 13

put "210093 210092 210094 210093" into tIcons

else

set the textFont of this stack to "usesystemfont"

set the textSize of this stack to 12

set the textFont of fld 1 to "Geneva"

set the textSize of fld 1 to 10

put "210002 210001 210012 210009" into tIcons

end if

else

set the loc of this stack to the screenLoc

set the top of this stack to round(item 4 of the screenRect/5)

repeat with i = 3 to the number of btns

set the bottomMargin of btn i to 3

set the height of btn i to 20

end repeat

if char 1 of the systemVersion is 1 then

--OS X

set the textFont of this stack to "Lucida Grande"

set the textSize of this stack to 13

set the textSize of fld 1 to 13

put "210002 210001 210012 210009" into tIcons

else

set the textFont of this stack to "usesystemfont"

set the textSize of this stack to 12

set the textFont of fld 1 to "Geneva"

set the textSize of fld 1 to 10

put "210002 210001 210012 210009" into tIcons

end if

end if

break

case "Win32"

if gAPKLargeFonts then

put 26 into tNumber

put 7 into tMargin

else

put 21 into tNumber

put 5 into tMargin

end if

repeat with i = 3 to the number of btns

set the bottomMargin of btn i to tMargin

set the height of btn i to tNumber

set the traversalOn of btn i to false

set the mnemonic of btn i to 0

end repeat

set the textFont of this stack to "MS Sans Serif"

set the textSize of this stack to 10

set the textFont of fld 1 to empty

put "210005 210011 210003 210004" into tIcons

break

default

repeat with i = 3 to the number of btns

set the bottomMargin of btn i to 4

set the height of btn i to 22

set the traversalOn of btn i to false

set the mnemonic of btn i to 0

end repeat

set the textFont of this stack to "Helvetica"

if gAPKLargeFonts then set the textSize of this stack to 14

else set the textSize of this stack to 12

set the textFont of fld 1 to empty

put "210008 210010 210006 210010" into tIcons

break

end switch

--is there an icon to display or not?

set the itemDelimiter to numToChar(0)

if word 2 of item 1 of the dialogData is "plain" and (not tMacOSX and gREVAppIcon is not empty) then

set the loc of btn 1 to -100,21

put 0 into tIconAllowance

else

set the loc of btn 1 to 26,33

put wordOffset(word 2 of item 1 of the dialogData, "information error warning question") into tIconWord

set the icon of button "icon" to word tIconWord of tIcons

if tMacOSX then

put 87 into tIconAllowance

set the loc of btn "icon" to 52,44 -- top is also set later so this is ignored

if tIconWord is 0 then --large app icon

set the icon of btn "icon" to gREVAppIcon

else

--small app icon

set the icon of btn "icon 2" to gREVSmallAppIcon

set the itemDel to comma

set the loc of btn "icon 2" to item 1 of the loc of btn "icon" + 16,item 2 of the loc of btn "icon" + 21

set the itemDel to numToChar(0)

end if

else

put 40 into tIconAllowance

end if

end if

--title

if item 2 of the dialogData is empty then set the title of this stack to space

else set the title of this stack to item 2 of the dialogData

put item 3 of dialogData into tText

if "<p>" is in tText or matchChunk(tText, "<(.+>.+</.+)>") then set the htmlText of fld 1 to tText

--if matchText(char 7 to -1 of line 1 of tText,"<[^P]") then

else set the text of fld 1 to tText

if the platform is "MacOS" and not tMacOSX then

set the textFont of fld 1 to "usesystemfont"

set the textSize of fld 1 to 12

end if

--buttons

put item 4 of dialogData into tButtonNames

put the number of lines in tButtonNames into tNoOfButtons

if tButtonNames is empty then

put "OK" into tButtonNames

put 1 into tNoOfButtons

end if

put 32 into tTotalBtnWidth

--truncate more buttons to the maximum allowed (7)

if tNoOfButtons > the number of buttons - 2 then put the number of buttons - 2 into tNoOfButtons

put empty into tMnemonicString

repeat with i = 3 to (tNoOfButtons + 3)

-- put "got here 1" && i && tNoOfButtons

--set the loc of btn i to the cPrevLoc of btn i --show btn

set the name of button i to line tNoOfButtons - (i - 3) of tButtonNames

-- put "got here 2" && i

if the platform is "Win32" and the short name of btn i is not in "OKCancel" then

-- put "got here 3" && i

put 0 into tNo

--put "got here 4" && i

repeat for each char x in the short name of btn i

-- put "got here 5" && i

add 1 to tNo

-- put "got here 6" && i

if x is not in tMnemonicString then

-- put "got here 7" && i

put x after tMnemonicString

-- put "got here 8" && i

set the mnemonic of btn i to tNo

-- put "got here 9" && i

exit repeat

-- put "got here 10" && i

end if

-- put "got here 11" && i

end repeat

-- put "got here 12" && i

end if

set the width of button i to 82

-- put "got here 13" && i

if the width of btn i < the formattedWidth of btn i +28 then set the width of btn i to the formattedWidth of btn i + 28

-- put "got here 14" && i

add the width of button i + 12 to tTotalBtnWidth

-- put "got here 15" && i

end repeat

set the dontWrap of field 1 to true

if tMacOSX then put 4 into tFieldSubtract else put 0 into tFieldSubtract

put max(the formattedWidth of field 1 + tIconAllowance + 16, tTotalBtnWidth)+tFieldSubtract into tWidth

if tWidth < 400 then

put 400 into tWidth

end if

if tTotalBtnWidth > 450 then

put tTotalBtnWidth into tWidth

else if tWidth > 450 then

put 450 into twidth

set the width of field 1 to twidth - tIconAllowance - 16

end if

set the dontWrap of field 1 to false

put the width of this stack into oldwidth

set the width of this stack to twidth

-- set the top of button 1 to the height of field 1 div 2 - 12

if tMacOSX then set the top of btn 1 to 18

else set the top of btn 1 to 6

set the itemDel to comma

get the rect of fld 1

put (the width of this stack - 12) into item 3 of it

set the rect of fld 1 to it

if tMacOSX then put 5 into tAddition else put 0 into tAddition

put the width of this stack -12 - tAddition into tStartRight

put the formattedHeight of field 1 + 58 into tHeight

if tHeight > 400 then

set the vScrollbar of field 1 to true

put 400 into tHeight

else set the vScrollbar of field 1 to false

set the height of this stack to tHeight

set the height of field 1 to tHeight - 58

set the topLeft of field 1 to tIconAllowance + 8, 12

if the platform is "MacOS" then

if tMacOSX then put 6 into tAddition else put 0 into tAddition

repeat with i = 3 to tNoOfButtons + 2

set the right of btn i to tStartRight

subtract the width of btn i + 10 from tStartRight

set the bottom of btn i to the height of this stack - 12 - tAddition

if i is 5 and tNoOfButtons is 3 and word 1 of the short name of btn i is "Don't" then

--move don't save to the left

set the left of btn i to the left of fld 1+5

end if

end repeat

else

repeat with i = (tNoOfButtons + 2) down to 3

set the right of btn i to tStartRight

subtract the width of btn i + 12 from tStartRight

set the bottom of btn i to the height of this stack - 12

set the traversalOn of btn i to true

end repeat

end if

if the platform is "MacOS" then set the top of this stack to round(item 4 of the screenRect/5)

set the default of button 3 to true

end preOpenStack

on commandKeyDown pKey

if pKey is "." then

if there is a btn "Cancel" then

click at the loc of btn "cancel"

exit commandKeyDown

end if

end if

repeat with i = 3 to the number of btns

if item 1 of the loc of btn i < 1 then next repeat

if char 1 of the short name of btn i is pKey then

set the hilite of btn i to true

wait 50 milliseconds

set the hilite of btn i to false

send "mouseUp" to btn i

exit repeat

end if

end repeat

end commandKeyDown

on escapeKey

if there is a btn "cancel" then click at the loc of btn "cancel"

end escapeKey

on closeStack

revCleanUpAnswerDialog

end closeStack

on revCleanUpAnswerDialog

--show invisibles compatible removal of btns

repeat with i = 3 to the number of buttons

set the cPrevLoc of btn i to the loc of btn i

set the loc of btn i to -100,-100

end repeat

set the dialogData to empty

end revCleanUpAnswerDialog

on mouseUp

if the name of the target contains "button" then

lock messages--prevents user stack getting refocusing messages

close this stack

revCleanUpAnswerDialog--won't get closeStack

unlock messages

set the dialogData to the short name of the target

end if

end mouseUp

on returnKey

pass returnKey to top

end returnKey