REVO27007revFKey2 Xon altShowMe send mouseUp to btn "Active" if the label of btn "Edit" = "Done" then send mouseUp to btn "Edit" else send setTopleft to btn "Edit" end altShowMe ~+Tabsfalse cDonePoint108,157 cEditPoint894,43 cUpdateStack #!/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 "$@" TrozWareUpdater2 --> all handlers -- cGadgetName contains the display name for the stack to be updated -- cGadgetVersion contains the current version of the stack to be updated -- cGadgetStack contains the stack name for the stack to be updated -- cGadgetSavePath contains the file path of the gadget being updated -- cGadgetUpdatePath contains the URL for the new stack -- cGadgetVersionURL contains the URL to the text file with the version data -- on startup, the gadget needs to fill in these properties -- then call the updater routine on preOpenStack if the short name of this stack = "TrozWareUpdater" then go invisible to me put empty into fld "StackName" put empty into fld "Info" hide btn "Check for update" hide btn "Download again" hide btn "Download Now" hide btn "Cancel" enable btn "Check for update" enable btn "Download again" enable btn "Download Now" enable btn "Cancel" set the loc of me to the screenLoc end if end preOpenStack -- display current version and ask if they want to check for an update -- if so, go online and see if there is a newer version -- on checkForUpdate show stack "TrozWareUpdater" put the cGadgetName of this stack & " v." & the cGadgetVersion of this stack into fld "StackName" put "Would you like to check for an update?" into fld "Info" show btn "Check for update" show btn "Cancel" end checkForUpdate on versionCheck disable btn "Check for update" disable btn "Cancel" set the cursor to watch put the cGadgetVersionURL of this stack into theURL set the itemDel to "/" put item 3 of theURL into theHostName set the itemDel to comma put "Checking for new version..." into fld "Info" put haveIPconnect() into isConnected -- exits directly if this fails put URL theURL into theUpdateInfo replace numToChar(13) with cr in theUpdateInfo put getTagData("version",theUpdateInfo) into theVersion put getTagData("UpdateURL",theUpdateInfo) into theGadgetURL set the cGadgetUpdatePath of me to theGadgetURL hide btn "Check for update" if theVersion = the cGadgetVersion of this stack then put "You are using the current version!" into fld "Info" show btn "Download Again" else put "The version on the server is " & theVersion into fld "Info" show btn "Download Now" end if enable btn "Cancel" end versionCheck -- Updater: -- -- close the existing gadget and remove from memory -- download update & save to same spot -- open updated version -- close updater stack & remove from memory without saving (maybe gadget should do this) -- on doUpdate disable btn "Download Again" disable btn "Download Now" disable btn "Cancel" put checkData() into tCheck if tCheck is not empty then put tCheck into fld "Info" exitUpdate end if close stack (the cGadgetStack of me) delete stack (the cGadgetStack of me) set the cursor to watch set the itemDel to "/" put the cGadgetUpdatePath of me into tGadgetURL put the cGadgetSavePath of me into tGadgetFilePath set the itemDel to comma put the filetype into theFiletype set the filetype to "revoRSTK" put "Downloading new version of " & the cGadgetName of me into fld "Info" put URL tGadgetURL into tNewGadget put the result into theResult if the result is not empty then put "Download error: " & theResult into fld "Info" exitUpdate else if tNewGadget is empty then put "Download error: no data received." into fld "Info" exitUpdate else put "Saving new version..." into fld "Info" put tNewGadget into URL ("binfile:" & tGadgetFilePath) set the filetype to theFileType put "Update of " & the cGadgetName of me & " now complete!" into fld "Info" exitUpdate end if end doUpdate function checkData if the cGadgetName of me is empty then return "Unknown gadget name!" if the cGadgetStack of me is empty then return "Unknown gadget stack!" if the openStacks contains the cGadgetStack of me is false then return "Gadget stack not found!" if the cGadgetSavePath of me is empty then return "Unknown gadget file!" if there is not a file (the cGadgetSavePath of me) then return "Gadget file not found!" if the cGadgetUpdatePath of me is empty then return "Unknown gadget update URL!" return empty end checkData on exitUpdate wait 2 seconds with messages -- so user gets time to read the last message close stack "TrozWareUpdater" if the openStacks contains "TrozWareUpdater" then delete stack "TrozWareUpdater" go stack (the cGadgetSavePath of me) send "altShowMe" to stack (the cGadgetStack of me) exit to top end exitUpdate function haveIPconnect put URL "http://www.troz.net/test.txt" into tCheckConnect put tCheckConnect = 1 into haveIPconnection if haveIPConnection is false then put "Either the server is down or you have no connection to the internet." into fld "Info" exitUpdate end if return haveIPconnection end haveIPconnect function getTagData theTagName,theTagData put "<" & theTagName & ">" into theOpenTag put "" into theCloseTag filter theTagData with theOpenTag & "*" put line 1 of theTagData into theTagData replace theOpenTag with "" in theTagData replace theCloseTag with "" in theTagData put URLdecode(theTagData) into theTagData return word 1 to -1 of theTagData end getTagData hhhhhhSdcGadgetVersionURL'http://www.troz.net/Rev/plugins/PPM.txt cGadgetNamePending Message ManagercGadgetSavePathZ/Applications/Revolution 2.6.1/plugins/gadgets/revConstellation tools/window/2_pending.revcGadgetVersion1.4 cGadgetStack revPMManagercGadgetUpdatePathTrozWare Updater UVerdana WVerdanaWVerdana WLucida Grande WVerdana UVerdana WVerdana cREVGeneral debugObjects breakPoints cConsLastHandlerScroll1736 HandlerNameexitUpdate commandcConsNoSetPropsForArchive7CompilesForSave2CompilesForArchive6SetPropsForSave2 @Sd cConsLastHandlerScroll0 HandlerName Info P( cConsLastHandlerScroll0 HandlerName cREVGeneral revUniqueID 1134684251120  StackName P cConsLastHandlerScroll0 HandlerName cREVGeneral revUniqueID 1134770053029 Check for updateE;--> all handlers on mouseUp versionCheck end mouseUp H cConsLastHandlerScroll0 HandlerNamemouseUp message cREVGeneral revUniqueID 1134770143911 CancelE--> all handlers -- different functions depending on what other button is visible -- on mouseUp disable btn "Check for update" disable btn "Download again" disable btn "Download Now" disable btn "Cancel" if the visible of btn "Check for update" then put "Cancel checking for new version." into fld "Info" else put "Not downloading new version." into fld "Info" end if exitUpdate end mouseUp HR cConsLastHandlerScroll0 HandlerNamemouseUp message cREVGeneral revUniqueID 1134770147616 Download AgainE3--> all handlers on mouseUp doUpdate end mouseUp H cConsLastHandlerScroll92 HandlerNamemouseUp message cREVGeneral revUniqueID 1134770741538  Download NowE7--> all handlers on mouseUp doUpdate end mouseUp H cConsLastHandlerScroll47 HandlerNamemouseUp message cREVGeneral revUniqueID 1134770761165 FunKey ULucida Grande UVerdana UVerdana cGlx2Generalid 1193971201425 cGlxGeneral handlers

altShowMe

code

on altShowMe

send mouseUp to btn "Active"

if the label of btn "Edit" = "Done" then send mouseUp to btn "Edit"

else send setTopleft to btn "Edit"

end altShowMe

checksumϱ p;whandler_scroll0dirtyfalse handler_line1 varCheckingfalsescroll0 parent stackrevFKey object namerevFKeychunkchar 1 to 12 of field 5 immed stackrevFKeycConsNoSetPropsForArchive1CompilesForSave2CompilesForArchive4SetPropsForSave1 cConsLastHandlerScroll0 HandlerNameuRIPcreatorSarah Reichelt copyright#Sarah Reichelt, TrozWare, 2003-2005homehttp://www.troz.net/Rev/updateInfoUrl.http://www.troz.net/Rev/plugins/RipUpdates.txt downloadUrl*http://www.troz.net/Rev/plugins/FunKey.rev description@Plugin allowing script snippets to be assigned to function keys.date2005,9,4version1.2 cREVLoadInfoloadchoseninMenutruerevResizeStackfalsemodePalette cREVGeneral scriptChecksumawo0. debugObjects breakPoints handlerList altShowMescriptSelectionchar 166 to 165 bookmarks tempScript prevHandler moveStackscript

on altShowMe

send mouseUp to btn "Active"

if the label of btn "Edit" = "Done" then send mouseUp to btn "Edit"

else send setTopleft to btn "Edit"

end altShowMe

 Pon openStack altShowMe end openStack on moveStack if the label of btn "Edit" = "Done" then set the cDonePoint of this stack to the topLeft of this stack else set the cEditPoint of this stack to the topleft of this stack end if save this stack end moveStack on closeStack altShowMe save this stack end closeStack on closeField if the short name of the target contains "Title" then buildMenu save this stack end closeField on buildMenu lock screen put the menuHistory of btn "Select" into storedMenu put empty into tList repeat with x = 1 to 12 put fld ("Title " & x) into tName put "F" & x into tKey if word 1 of tName <> tKey then put tKey & space before tName put tName & cr after tList if x = 4 or x = 8 then put "-" & cr after tList end repeat put tList into btn "Select" set the menuHistory of btn "Select" to storedMenu end buildMenu  cGlxGeneral handlersj

openStack

moveStack

closeStack

closeField

buildMenu

code

on openStack

altShowMe

end openStack

on moveStack

if the label of btn "Edit" = "Done" then

set the cDonePoint of this stack to the topleft of this stack

else

set the cEditPoint of this stack to the topleft of this stack

end if

save this stack

end moveStack

on closeStack

altShowMe

save this stack

end closeStack

on closeField

if the short name of the target contains "Title" then buildMenu

save this stack

end closeField

on buildMenu

lock screen

put the menuhistory of btn "Select" into storedMenu

put empty into tList

repeat with x = 1 to 12

put fld ("Title " & x) into tName

put "F" & x into tKey

if word 1 of tName <> tKey then put tKey & space before tName

put tName & cr after tList

if x = 4 or x = 8 then put "-" & cr after tList

end repeat

put tList into btn "Select"

set the menuhistory of btn "Select" to storedMenu

end buildMenu

checksum@NˠOӤwŞhandler_scroll0dirtyfalse handler_line1 varCheckingfalsescroll0 parent stackrevFKey object name card id 1002chunkchar 1 to 12 of field 5 immed stackrevFKey cREVGeneralscriptChecksumϩNgŸ % bookmarks breakPoints handlerList3openStack moveStack closeStack closeField buildMenu tempScript prevHandler moveStackscriptSelectionchar 303 to 302script

on openStack

altShowMe

end openStack

on moveStack

if the label of btn "Edit" = "Done" then

set the cDonePoint of this stack to the topLeft of this stack

else

set the cEditPoint of this stack to the topleft of this stack

end if

save this stack

end moveStack

on closeStack

altShowMe

save this stack

end closeStack

on closeField

if the short name of the target contains "Title" then buildMenu

save this stack

end closeField

on buildMenu

lock screen

put the menuHistory of btn "Select" into storedMenu

put empty into tList

repeat with x = 1 to 12

put fld ("Title " & x) into tName

put "F" & x into tKey

if word 1 of tName <> tKey then put tKey & space before tName

put tName & cr after tList

if x = 4 or x = 8 then put "-" & cr after tList

end repeat

put tList into btn "Select"

set the menuHistory of btn "Select" to storedMenu

end buildMenu

%)-1  5Active`eion mouseUp put the id of btn "FKeys" into btnID if the hilite of me then if the frontscripts contains btnID is false then insert script of btn "FKeys" into front end if else if the frontscripts contains btnID is true then remove script of btn "FKeys" from front end if end if end mouseUp Function key scripts active cGlxGeneral handlers

mouseUp

checksum_՗ VPl"code

on mouseUp

put the id of btn "FKeys" into btnID

if the hilite of me then

if the frontscripts contains btnID is false then

insert script of btn "FKeys" into front

end if

else

if the frontscripts contains btnID is true then

remove script of btn "FKeys" from front

end if

end if

end mouseUp

dirtyfalsehandler_scroll0 varCheckingfalse handler_line1scroll0 object nameActive parent stackrevFKeychunk4char 214 to 213 of field 5 of stack "revGalaxy code" immed stackrevFKey cREVGeneral scriptChecksum&G-^3&A(<( handlerListmouseUp breakPointsscriptSelectionchar 324 to 323 revUniqueID 1043964125100 bookmarks tempScript prevHandlermouseUpscriptO

on mouseUp

put the id of btn "FKeys" into btnID

if the hilite of me then

if the frontScripts contains btnID is false then

insert script of btn "FKeys" into front

end if

else

if the frontScripts contains btnID is true then

remove script of btn "FKeys" from front

end if

end if

end mouseUp

Editewo--> all handlers on mouseUp lock screen hide this stack put the topLeft of this stack into tL put the height of this stack into tH if tH = 31 then topLevel this stack set the height of this stack to 255 set the label of me to "Done" send "choose browse tool" to me in 5 ticks repeat with x = 1 to 12 set the lockText of fld ("Title " & x) to false set the lockText of fld ("Script " & x) to false end repeat else palette this stack set the height of this stack to 31 set the label of me to "Edit" repeat with x = 1 to 12 set the lockText of fld ("Title " & x) to true set the lockText of fld ("Script " & x) to true end repeat save this stack end if send "setTopLeft" to me in 5 ticks end mouseUp on setTopLeft if the label of me = "Done" then if the cDonePoint of this stack is a point then put the cDonePoint of this stack into newTopLeft else put tL into newTopLeft end if else palette this stack if the cEditPoint of this stack is a point then put the cEditPoint of this stack into newTopLeft else put tL into newTopLeft end if end if -- check if the new settting puts it outside the window if item 1 of newTopLeft < 0 then put 100 into item 1 of newTopLeft if item 2 of newTopLeft < 0 then put 100 into item 2 of newTopLeft put the screenRect into tRect put item 3 of tRect into tW put item 4 of tRect into tH if item 1 of newTopLeft + the width of this stack > tW then put tW - the width of this stack into item 1 of newTopLeft end if if item 2 of newTopLeft + the height of this stack > tH then put tH - the height of this stack into item 2 of newTopLeft end if if the platform = "MacOS" then -- leave enough room at the top for the menu bar if item 1 of newTopLeft < 44 then put 44 into item 1 of newTopLeft end if set the topleft of this stack to newTopLeft set the iconic of this stack to false show this stack end setTopLeft (cConsLastHandlerNamemouseUp altOnClickMecConsLastHandlerScroll02Edit cGlxGeneral handlers<

all handlers

mouseUp

setTopLeft

codeb

--> all handlers

on mouseUp

lock screen

hide this stack

put the topleft of this stack into tL

put the height of this stack into tH

if tH = 31 then

toplevel this stack

set the height of this stack to 255

set the label of me to "Done"

send "choose browse tool" to me in 5 ticks

repeat with x = 1 to 12

set the locktext of fld ("Title " & x) to false

set the locktext of fld ("Script " & x) to false

end repeat

else

palette this stack

set the height of this stack to 31

set the label of me to "Edit"

repeat with x = 1 to 12

set the locktext of fld ("Title " & x) to true

set the locktext of fld ("Script " & x) to true

end repeat

save this stack

end if

send "setTopLeft" to me in 5 ticks

end mouseUp

on setTopLeft

if the label of me = "Done" then

if the cDonePoint of this stack is a point then

put the cDonePoint of this stack into newTopLeft

else

put tL into newTopLeft

end if

else

palette this stack

if the cEditPoint of this stack is a point then

put the cEditPoint of this stack into newTopLeft

else

put tL into newTopLeft

end if

end if

-- check if the new settting puts it outside the window

if item 1 of newTopLeft < 0 then put 100 into item 1 of newTopLeft

if item 2 of newTopLeft < 0 then put 100 into item 2 of newTopLeft

put the screenrect into tRect

put item 3 of tRect into tW

put item 4 of tRect into tH

if item 1 of newTopLeft + the width of this stack > tW then

put tW - the width of this stack into item 1 of newTopLeft

end if

if item 2 of newTopLeft + the height of this stack > tH then

put tH - the height of this stack into item 2 of newTopLeft

end if

if the platform = "MacOS" then

-- leave enough room at the top for the menu bar

if item 1 of newTopLeft < 44 then put 44 into item 1 of newTopLeft

end if

set the topleft of this stack to newTopLeft

set the iconic of this stack to false

show this stack

end setTopLeft

checksumniѿ^zhandler_scroll0dirtyfalse handler_line3 varCheckingfalsescroll0 parent stackrevFKey object nameEditchunkchar 794 to 806 of field 5 immed stackrevFKey cConsLastHandlerScroll450 HandlerNamesetTopLeft command cREVGeneral scriptChecksumka`W̹$ breakPoints handlerListmouseUp setTopLeftscriptSelectionchar 1937 to 1936 revUniqueID 1043964160223 bookmarks tempScript prevHandlermouseUpscript1

on mouseUp

lock screen

hide this stack

put the topLeft of this stack into tL

put the height of this stack into tH

if tH = 31 then

topLevel this stack

set the height of this stack to 255

set the label of me to "Done"

send "choose browse tool" to me in 5 ticks

repeat with x = 1 to 12

set the lockText of fld ("Title " & x) to false

set the lockText of fld ("Script " & x) to false

end repeat

else

palette this stack

set the height of this stack to 31

set the label of me to "Edit"

repeat with x = 1 to 12

set the lockText of fld ("Title " & x) to true

set the lockText of fld ("Script " & x) to true

end repeat

save this stack

end if

send "setTopLeft" to me in 5 ticks

end mouseUp

on setTopLeft

if the label of me = "Done" then

if the cDonePoint of this stack is a point then

put the cDonePoint of this stack into newTopLeft

else

put tL into newTopLeft

end if

else

if the cEditPoint of this stack is a point then

put the cEditPoint of this stack into newTopLeft

else

put tL into newTopLeft

end if

end if

-- check if the new settting puts it outside the window

if item 1 of newTopLeft < 0 then put 100 into item 1 of newTopLeft

if item 2 of newTopLeft < 0 then put 100 into item 2 of newTopLeft

put the screenRect into tRect

put item 3 of tRect into tW

put item 4 of tRect into tH

if item 1 of newTopLeft + the width of this stack > tW then

put tW - the width of this stack into item 1 of newTopLeft

end if

if item 2 of newTopLeft + the height of this stack > tH then

put tH - the height of this stack into item 2 of newTopLeft

end if

if the platform = "MacOS" then

-- leave enough room at the top for the menu bar

if item 1 of newTopLeft < 44 then put 44 into item 1 of newTopLeft

end if

set the topleft of this stack to newTopLeft

set the iconic of this stack to false

show this stack

end setTopLeft

Helpew-on mouseUp palette "fKeyHelp" end mouseUp Tabsfalse24Y? cREVGeneralscriptChecksum$~6Xf}- bookmarks revUniqueID 1043964173113 handlerListmouseUpscriptSelection char 11 to 10 prevHandlermouseUp tempScriptscript

on mouseUp

palette "fKeyHelp"

end mouseUp

 Edit lineKF   cREVGeneral revUniqueID 1043964307064 bookmarks handlerList tempScript prevHandlerscriptSelection char 1 to 0scriptSelect u#on menuPick pNew repeat with f = 1 to 12 hide grp ("F" & f & " group") end repeat put char 2 to -1 of word 1 of pNew into tNum put word 1 of pNew into pNew if fld ("Title " & tNum) is empty then put pNew into fld ("Title " & tNum) show grp (pNew & " group") end menuPick (Tabsfalse0 F4 - clearF1 - cut F2 - copy F3 - paste F4 - clear - F5 - Browse F6 - Pointer F7 - App Browser F8 - Message Box - F9 - Stack Props F10 - edit stack script F11 - Navigator F12 - open stack  cREVGeneralscriptChecksum2]陪,`zWv bookmarks revUniqueID 1043964503238 handlerListmenuPickscriptSelection prevHandlermenuPick tempScriptscript

on menuPick pNew

repeat with f = 1 to 12

hide grp ("F" & f & " group")

end repeat

put char 2 to -1 of word 1 of pNew into tNum

put word 1 of pNew into pNew

if fld ("Title " & tNum) is empty then put pNew into fld ("Title " & tNum)

show grp (pNew & " group")

end menuPick

 F5 groupa DSelection DescriptionfalseTabsfalse cREVGeneral revUniqueID 1043964671554  Script 5)`d cREVGeneral revUniqueID 1043964612011  choose browse tool `e Title 5i`HTabsfalse cREVGeneralscriptChecksumُ B~ revUniqueID 1043964631287 bookmarks handlerList tempScript prevHandlerscriptSelection char 1 to 0script

 F5 - Browse F6 groupa DSelection DescriptionfalseTabsfalse cREVGeneral revUniqueID 1043964671554  Script 6)`d cREVGeneral revUniqueID 1043964612011  choose pointer tool `e Title 6i`HTabsfalse cREVGeneral revUniqueID 1043964631287  F6 - Pointer F7 groupa DSelection DescriptionfalseTabsfalse cREVGeneral revUniqueID 1043964671554  Script 7)`d cREVGeneral revUniqueID 1043964612011  ^send "menuPick " & quote & "Application Browser" & quote to btn "Tools" of stack "revMenuBar" `e Title 7i`HTabsfalse cREVGeneral revUniqueID 1043964631287  F7 - App Browser F8 groupa DSelection DescriptionfalseTabsfalse cREVGeneral revUniqueID 1043964671554  Script 8)`d cREVGeneral revUniqueID 1043964612011  go to stack "Message Box"  `e Title 8i`HTabsfalse cREVGeneral bookmarks revUniqueID 1043964631287 handlerList prevHandler tempScriptscript  F8 - Message Box F9 groupa DSelection DescriptionfalseTabsfalse cREVGeneral revUniqueID 1043964671554  Script 9)`d cREVGeneral revUniqueID 1043964612011  [send "menuPick " & quote & "Stack Inspector" & quote to btn "Object" of stack "revMenuBar" `e Title 9i`HTabsfalse cREVGeneral revUniqueID 1043964631287  F9 - Stack Props F10 groupa DSelection DescriptionfalseTabsfalse cREVGeneral revUniqueID 1043964671554  Script 10)`d cREVGeneral revUniqueID 1043964612011  edit the script of the topstack `e  Title 10i`HTabsfalse cREVGeneral revUniqueID 1043964631287  F10 - edit stack script F11 groupa DSelection DescriptionfalseTabsfalse cREVGeneral revUniqueID 1043964671554  Script 11)`d cREVGeneral revUniqueID 1043964612011  esend "menuPick " & quote & "Plugins|revNavigator" & quote to btn "Development" of stack "revMenuBar" `e  Title 11i`HTabsfalse cREVGeneral revUniqueID 1043964631287  F11 - Navigator F12 groupa DSelection DescriptionfalseTabsfalse cREVGeneral revUniqueID 1043964671554  Script 12)`d cREVGeneral revUniqueID 1043964612011  --- for when a stack is grayed in open dialog answer file "Select a stack:" go to stack it  `e  Title 12i`HTabsfalse cREVGeneral revUniqueID 1043964631287  F12 - open stack FKeysEwzon functionKey pKey put fld ("Script " & pKey) of stack "revFKey" into tScript if tScript is not empty then try do tScript catch errName answer error "The F" & pKey & " script has failed with error:" & cr & errName end try -- pass functionKey else pass functionKey end if end functionKey (.w cGlxGeneral handlers

functionKey

checksumYlT7M0code

on functionKey pKey

put fld ("Script " & pKey) of stack "revFKey" into tScript

if tScript is not empty then

try

do tScript

catch errName

answer error "The F" & pKey & " script has failed with error:" & cr & errName

end try

-- pass functionKey

else

pass functionKey

end if

end functionKey

dirtyfalsehandler_scroll0 varCheckingfalse handler_line1scroll0 object nameFKeys parent stackrevFKeychunk4char 291 to 290 of field 5 of stack "revGalaxy code" immed stackrevFKey cREVGeneral scriptChecksumLyܷBˌx8O handlerList functionKey breakPointsscriptSelectionchar 296 to 295 revUniqueID 1044163685616 bookmarks tempScript prevHandler functionKeyscriptj

on functionKey pKey

put fld ("Script " & pKey) of stack "revFKey" into tScript

if tScript is not empty then

try

do tScript

catch errName

answer error "The F" & pKey & " script has failed with error:" & cr & errName

end try

end if

pass functionKey

end functionKey

1 F4 groupi DSelection DescriptionfalseTabsfalse cREVGeneral revUniqueID 1043964671554 2 Script 4)`d cREVGeneral revUniqueID 1043964612011  put empty into the selection3 `e 4Title 4i`HTabsfalse cREVGeneralscriptChecksumُ B~ revUniqueID 1043964631287 bookmarks handlerList tempScript prevHandlerscriptSelection char 1 to 0script

 F4 - clear- F3 groupa DTabsfalseSelection Descriptionfalse cREVGeneral revUniqueID 1043964671554 . Script 3)`d cREVGeneral revUniqueID 1043964612011  paste/ `e 0Title 3i`HTabsfalse cREVGeneralscriptChecksumُ B~ bookmarks revUniqueID 1043964631287 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript

 F3 - paste) F2 groupa DSelection DescriptionfalseTabsfalse cREVGeneral revUniqueID 1043964671554 * Script 2)`d cREVGeneral revUniqueID 1043964612011  copy+ `e ,Title 2i`HTabsfalse cREVGeneralscriptChecksumُ B~ revUniqueID 1043964631287 bookmarks handlerList tempScript prevHandlerscriptSelection char 1 to 0script

 F2 - copy% F1 groupa DTabsfalseSelection Descriptionfalse cREVGeneral revUniqueID 1043964671554 & Script 1)`d cREVGeneral revUniqueID 1043964612011  cut' `e (Title 1i`HTabsfalse cREVGeneralscriptChecksumُ B~ bookmarks revUniqueID 1043964631287 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript

 F1 - cut5 altPlug.png PH--> all handlers on mouseUp put the altVers of me into theCurrentVersion put the label of this stack into tStackLabel put the short name of this stack into tStackName put the effective fileName of this stack into tFileName put the altUpdateURL of me into tVersionURL -- open updater stack put the cUpdateStack of this stack into tUpdateBinary go stack tUpdateBinary as palette -- set it's custom properties -- cGadgetName contains the display name for the stack to be updated -- cGadgetVersion contains the current version of the stack to be updated -- cGadgetStack contains the stack name for the stack to be updated -- cGadgetSavePath contains the file path of the gadget being updated -- cGadgetUpdatePath contains the URL for the new stack (acquired during update) set the cGadgetName of stack "TrozWareUpdater" to tStackLabel set the cGadgetVersion of stack "TrozWareUpdater" to theCurrentVersion set the cGadgetStack of stack "TrozWareUpdater" to tStackName set the cGadgetSavePath of stack "TrozWareUpdater" to tFileName set the cGadgetVersionURL of stack "TrozWareUpdater" to tVersionURL set the cGadgetUpdatePath of stack "TrozWareUpdater" to "" -- call it's updater routine send "checkForUpdate" to stack "TrozWareUpdater" end mouseUp A altVers1.3altOpenVisibletruealtPlugFileName FunKey.rev altOnClickMe altShowMe altUpdateURL*http://www.troz.net/Rev/plugins/FunKey.txtPNG  IHDR szz pHYs  gAMA cHRMn rHo!05Oc)+IDATxDA0@VL:=0ˢ SUHXٝ8PPӝ=&=?ξhfP˙,gb&E`KX`@ ! ;d !0 G F̌` Q=ȧ0"9HAd X Q@6@1gf9ܷ`n14XY*oE{%y?Bh@H43H34Q|j :O^2(={;2p1>r^b)1#Y| ܌ 2ȼ| 2O^>KWX~bJcX @,f)349C@;] kFz /T' b8Gʎ,@5n,4b1+rgAC@SxB{lPY@+` X`q-`@wѷx Rt_| vYΊssxvc'[s/T1‘,(H?ȥ"@0p,~pH 䳗pWVČocaaA Fu ,%3JRA3_a{OҒal/ ZkCr( @,p53Rs5 չ(q FoOY P $oC+rQd -./~>G܈ g/,RB,bC)r}\ +eF`X''9[Kf[wf=e<XYܦ"g`r` ڮdF+Qhpi6a DDs6bbfgVR jjgV,lF&   uj*(D)j3f@Ͱ`caǩ]DNjR fZK36^]| *uΊR#g90c:ca x1 Y ~`AS)qB f-3 } 4.YYؐHDr?| 4X,,(U6f[fD  V|Z,cvA!^r"9 O| b$68PGf`cVRD? jzq  b6& Nb LRAn#( -ѻ~06@\HH4R^2#!U9zִ5a!fIENDB` cConsLastprop varCheckingfalseHandlerScroll46 HandlerNamemouseUp message cREVGeneral scriptChecksum\.1Z f breakPoints handlerList3mouseUp haveIPconnect getTagData installReplacementscriptSelectionchar 3295 to 3294 bookmarks revUniqueID 1114209944569 prevHandlermouseUp tempScriptscript2

on mouseUp

put the altVers of me into theCurrentVersion

answer info "<p><b><font size=+1>FunKey v." & theCurrentVersion & "</font></b></p>" & cr & \

"<p>© Sarah Reichelt, TrozWare, 2005</p>" & cr & \

cr & "<br><p>Would you like to check for an update?</p>" with "No" or "Check"

if it is "No" then exit to top

set the cursor to watch

put the altOpenVisible of me into theOpenVisible

put the altOpenMode of me into theOpenMode

put the altUpdateURL of me into theURL

set the itemDel to "/"

put item 3 of theURL into theHostName

set the itemDel to comma

put haveIPconnect() into isConnected

if isConnected is false then

exit mouseUp

end if

put URL theURL into theUpdateInfo

replace numToChar(13) with cr in theUpdateInfo

if line 1 of theUpdateInfo is not "<!--AltPlugin-->" then

answer warning "The update information for this gadget is not AltPlugin compatible."

exit to top

end if

put getTagData("version",theUpdateInfo) into theVersion

put getTagData("UpdateURL",theUpdateInfo) into theGadgetURL

if theVersion is theCurrentVersion then

answer info "You are using the current version!" with "Download Again" or "Cancel"

put it into theAnswer

else

answer info "There is a new version available. Would you like to update?" with "Update" or "Cancel"

put it into theAnswer

end if

if theAnswer contains "Update" or theAnswer contains "Download" then

set the cursor to watch

put the effective filename of this stack into theFilePath

put the short name of this stack into theStackName

put "Ready to install new version."

send "installReplacement theGadgetURL,theFilePath" to me in 500 millisecs

end if

end mouseUp

function haveIPconnect

put URL "http://www.troz.net/test.txt" into tCheckConnect

put tCheckConnect = 1 into haveIPconnection

if haveIPConnection is false then

beep

answer warning "Either the server is down or you have no connection to the internet."

end if

return haveIPconnection

end haveIPconnect

function getTagData theTagName,theTagData

put "<" & theTagName & ">" into theOpenTag

put "</" & theTagName & ">" into theCloseTag

filter theTagData with theOpenTag & "*"

put line 1 of theTagData into theTagData

replace theOpenTag with "" in theTagData

replace theCloseTag with "" in theTagData

put URLdecode(theTagData) into theTagData

return theTagData

end getTagData

on installReplacement theGadgetURL,theFilePath

set the cursor to watch

set the itemDel to "/"

put the last item of theGadgetURL into theFileName

put theFileName into the last item of theFilePath

set the itemDel to comma

put the filetype into theFiletype

set the filetype to "revoRSTK"

put "Downloading new version..."

put URL theGadgetURL into tNewFile

put the result into theResult

if the result is not empty then

put "Download error: " & theResult

else if tNewFile is empty then

put "Download error: no data received."

else

put "Saving new version..."

put tNewFile into URL ("binfile:" & theFilePath)

set the filetype to theFileType

set the defaultStack to the short name of this stack

revert

put "Update of plugin" && theFileName && "now complete!"

end if

end installReplacement

 fKeyHelp2@~;TabsfalseSelection Descriptionfalse FunKey Help @UVerdana Pon preOpenStack put the topLeft of stack "revFKey" into tL add 16 to item 2 of tL set the topLeft of this stack to tL end preOpenStack  cREVGeneralscriptChecksumS$]OrGy bookmarks handlerList preOpenStackscriptSelection char 48 to 47 prevHandler preOpenStack tempScriptscript

on preOpenStack

put the topLeft of stack "revFKey" into tL

add 16 to item 2 of tL

set the topLeft of this stack to tL

end preOpenStack

 Help pon linkClicked pLink put revAppVersion() into revVersion set the itemDel to "." put item 1 of revVersion into revMajor if revMajor < 2 then revGoURL "mailto:" & pLink else revMail pLink,,"FunKey plugin" end if end linkClicked Tabsfalse cREVGeneralscriptChecksum=Uwqi bookmarks revUniqueID 1044165823348 handlerList linkClickedscriptSelectionchar 143 to 142 prevHandler linkClicked tempScriptscript

on linkClicked pLink

put revAppVersion() into revVersion

set the itemDel to "."

put item 1 of revVersion into revMajor

if revMajor < 2 then

revGoURL "mailto:" & pLink

else

revMail pLink,,"FunKey plugin"

end if

end linkClicked

 This is a plugin to allow Revolution programmers to assign snippets of code to selected function keys. It is intended for use during development. Click the Edit button to re-name and edit the scripts, selecting the relevant key from the popup menu. The name must start with F and the number of the chosen key. Click Done when you have finished to shrink the window. ,The check box inserts or removes a button script from the front scripts. This script (click Edit and have a look at the FKeys button script) checks if there is a script assigned and trys to run it if so, reporting any errors. If there is no script, the function key message is passed for normal use. I have included some sample scripts that I like to use, but I would expect every programmer to have their own preferences and to script their own, or to re-assign some of the examples to other keys. Mac OS X users: if the function keys are assigned to Expos, hold down any modifier (Shift, Control, Option or Command) when pressing a function key. Then it will get sent to this plugin. mThis plugin has been tested under Mac OS X. Please let me know if it doesn't work properly on other systems. uNow altPlugin & RIP compatible for easy update checks (click Edit & then click the image to check for new versions).  Sarah Reichelt, 2003-2005 sarah.reichelt@gmail.com  `