#!/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 "$@" q revAltImgView 1 %on openStack if word 1 of the systemVersion is "NT" and word 2 of the systemVersion > 5 then put queryRegistry("HKEY_CURRENT_USER\Control Panel\Colors\MenuBar") into tColor if tColor <> "" then put word 1 of tColor,word 2 of tColor,word 3 of tColor into tColor set the backgroundColor of this stack to tColor end if end if end openStack on altShowMe palette this stack show stack "revAltImgView" end altShowMe on altGetInfo answer last word of fld "info" end altGetInfo on closeStack delete stack "revAltImgView" end closeStack on altSetStackRect get the rect of this stack set the rect of this stack to \ item 1 of it, item 2 of it, \ item 1 of it + the width of grp "altThumbArray" + 6, \ item 2 of it + the height of grp "altThumbArray" + 130 set the width of fld "imgName" to the width of me -4 set the topLeft of fld "imgName" to 0,the bottom of grp "altThumbArray" + 2 set the botright of btn "altCopyImg" to the width of me-5, the height of me set the botright of btn "altStop" to the width of me-5, the top of grp "altThumbArray" set the topRight of btn "altHelp" to the width of me - 5, 6 set the botLeft of btn "altAsyncMode" to the 4,the height of me - 2 set the disabled of btn "altClearAll" to false end altSetStackRect on altInitStuff hide grc "altBorder" put empty into fld "imgName" set the disabled of btn "altClearAll" to true set the disabled of btn "altCopyImg" to true set the disabled of btn "altStop" to the not hilite of btn "altAsyncMode" end altInitStuff u ! W Verdana U Verdana U Verdana U Verdana W Courier New W Courier New W Verdana U Courier New U ms sans serif @U ms sans serif U Verdana size= U Verdana @U Verdana W ms sans serif W Verdana U Verdana W Verdana W ms sans serif U Courier New W Verdana W Verdana W Verdana U Verdana U Verdana W ms sans serif U ms sans serif W Verdana U Tahoma W Tahoma W Tahoma W Tahoma U Tahoma W Tahoma cREVGeneral scriptChecksum ;X'hG bookmarks handlerList FopenStack altShowMe altGetInfo closeStack altSetStackRect altInitStuffscriptSelection char 1518 to 1517prevHandler altInitStufftempScript script
on openStack
if word 1 of the systemVersion is "NT" and word 2 of the systemVersion > 5 then
put queryRegistry("HKEY_CURRENT_USER\Control Panel\Colors\MenuBar") into tColor
if tColor <> "" then
put word 1 of tColor,word 2 of tColor,word 3 of tColor into tColor
set the backgroundColor of this stack to tColor
end if
end if
end openStack
on altShowMe
palette this stack
show stack "revAltImgView"
end altShowMe
on altGetInfo
answer last word of fld "info"
end altGetInfo
on closeStack
delete stack "revAltImgView"
end closeStack
on altSetStackRect
get the rect of this stack
set the rect of this stack to \
item 1 of it, item 2 of it, \
item 1 of it + the width of grp "altThumbArray" + 6, \
item 2 of it + the height of grp "altThumbArray" + 130
set the width of fld "imgName" to the width of me -4
set the topLeft of fld "imgName" to 0,the bottom of grp "altThumbArray" + 2
set the botright of btn "altCopyImg" to the width of me-5, the height of me
set the botright of btn "altStop" to the width of me-5, the top of grp "altThumbArray"
set the topRight of btn "altHelp" to the width of me - 5, 6
set the botLeft of btn "altAsyncMode" to the 4,the height of me - 2
set the disabled of btn "altClearAll" to false
end altSetStackRect
on altInitStuff
hide grc "altBorder"
put empty into fld "imgName"
set the disabled of btn "altClearAll" to true
set the disabled of btn "altCopyImg" to true
set the disabled of btn "altStop" to the not hilite of btn "altAsyncMode"
end altInitStuff
P on mouseUp #passed from the scrollbar if the target contains "altImgScroll" then put the altImageFile of img "altThumbImg" into fld "ImgName" end if end mouseUp altImgFiles blueprint.jpg widget.GIF main_header2.jpg sunblack_x.gif humanresources.jpg splash01.jpg splash02.jpg splash03.jpg evercommunicator.jpg holiday.jpg JHoagland.jpg brussell.jpg kashcraft.jpg whoswho.jpg evercom120x40.jpg disk.gif new.gif folder.gif camera.gif prefs.gif preview.gif disk2.gif chart.gif splashk.jpg header2.gif test.JPG icons.jpg toolbar.jpg toolbar.gif altuit.gif res.jpg chris.jpg testbut1.png aaa.jpg altconvolve.jpg bg701.gif bg717.gif bg709.gif 4tuviah.jpg aaevercom.jpg motionbooks.jpg motionbooks2.jpg motionbooks.gif registered.png Four-0-Four.jpg yet_another_siemple_screenshot.jpg discovmap.jpg runrev.jpg link_x.gif abrowser.PNG cREVGeneral scriptChecksum ;zB5* bookmarks handlerList mouseUpscriptSelection char 65 to 64prevHandler mouseUptempScript scripton mouseUp
#passed from the scrollbar
if the target contains "altImgScroll" then
put the altImageFile of img "altThumbImg" into fld "ImgName"
end if
end mouseUp
@ imgName t cREVGeneral bookmarks revUniqueID 1042377421907handlerList scriptSelection char 1 to 0prevHandler tempScript script altThumbArray p1setProp altThumbInit doThumbInit end altThumbInit on doThumbInit lock screen hide grc "altBorder" hide img "altThumbImg" set cursor to watch repeat with x = the number of imgs down to 1 if the short name of img x is "altThumbImg" and the number of imgs in grp "altThumbArray" > 1 then delete img x end if end repeat unlock screen end doThumbInit on mouseDown theButton if the short name of the target is "altThumbImg" then show grc "altBorder" set the disabled of btn "altCopyImg" to false set the altTargetID of me to the id of the target get the rect of the target set the rect of grc "altBorder" to \ item 1 of it - 2, \ item 2 of it -2, \ item 3 of it +2, \ item 4 of it + 2 if theButton is 3 then put the tooltip of the target into tFname set the text of btn "altImgMenu" to "View:"&&tFname&cr&"Copy Path"&cr&"-"&cr&"Properties"&cr show btn "altImgMenu" popup btn "altImgMenu" end if end if pass mouseDown end mouseDown on mouseDoubleUp if the short name of the target is "altThumbImg" then show grc "altBorder" set the altTargetID of me to the id of the target get the rect of the target set the rect of grc "altBorder" to \ item 1 of it - 2, \ item 2 of it -2, \ item 3 of it +2, \ item 4 of it + 2 put the altImageFile of the target into tFilePath altViewImage tFilePath end if end mouseDoubleUp setProp altImageFolder tFolder --lock screen doThumbInit show img "altThumbImg" set the altImageFile of img "altThumbImg" to empty set the filename of img "altThumbImg" to empty set the vscroll of me to 0 hide grc "altBorder" put the defaultFolder into tDF set the defaultFolder to tFolder -- Fix path if it's root if the number of Chars of tFolder > 3 then put "/" after tFolder put the altImageFilter of me into tFilter repeat for each line l in the files put lower(getExt(l)) into tExt repeat for each item i in tFilter if lower(i) = tExt then put tFolder & l & cr after tFiles exit repeat end if end repeat end repeat delete last char of tFiles set the defaultFolder to tDF put the altAsyncMode of me into AsyncMode if not AsyncMode then set cursor to watch put the altImagePad of me into tPad put 1 into tInum -- tInum is the number of the img currently placing (not the ID) put the altWidth of img "altThumbImg" into tW put the altHeight of img "altThumbImg" into tH put the altNumImagesWide of me into tMaxWide put item 1 of the altLoc of img "altThumbImg" into tX put item 2 of the altLoc of img "altThumbImg" into tY put tW + tPad into tWinc --the amount to increment the X loc for each column put 1 into tCol --varible for which column to place img in put 1 into tRow --var for which row to place img in put the number of lines in tFiles into tcount set the disabled of img "altThumbImg" to false ------------------------------------ --set the altImageFiles of me to tFiles ------------------------------------ repeat tcount times #for each line l in tFiles clone img "altThumbImg" put the id of last img into tID set the loc of img id tID to \ tX + (tCol-1)*tWinc,tY + (tRow-1)*(tH+tPad) set the altLoc of last img to the loc of last img set the altImageFile of last img to line tInum of tFiles set the altListNum of last img to tInum set itemDel to "/" set the toolTip of last img to the last item of line tInum of tFiles set itemDel to "," put tID into item 2 of line tInum of tFiles put tInum + 1 into tInum if tCol = tMaxWide then put 1 into tCol put tRow + 1 into tRow else put tCol + 1 into tCol end if end repeat --can't just hide altThumbImg because in the case where all the --images in a folder are less wide than altThumbImg, --hiding altThumbImg will 'reset' the group so that all the --smaller imgs end up moving left justified. --So must disable altThumbImg because it has scripts. set the disable of img "altThumbImg" to true set the altImageFiles of me to tFiles set the level of grc "altBorder" to top set the level of btn "altImgMenu" to top --unlock screen else --AsyncMode is true set the altImageFiles of me to tFiles set the altFinishedLoading of me to false --set the disabled of me to true send "populateGroup 1,1,1" to me in 30 milliseconds end if pass altImageFolder end altImageFolder setProp altFinishedLoading tVal if tVal is true then set the level of grc "altBorder" to top set the level of btn "altImgMenu" to top set the disabled of btn "altStop" to true --set the disabled of me to false else --set the disabled of me to true end if pass altFinishedLoading end altFinishedLoading on populateGroup tCol,tRow,tInum --multitasking code if the altFinishedLoading of me is not true then put the altImagePad of me into tPad put the altImageFiles of me into tFiles put the number of lines in the altImageFiles of me into tcount put the altWidth of img "altThumbImg" into tW put the altHeight of img "altThumbImg" into tH put the altNumImagesWide of me into tMaxWide put item 1 of the altLoc of img "altThumbImg" into tX put item 2 of the altLoc of img "altThumbImg" into tY put tW + tPad into tWinc --the amount to increment the X loc for each column set the disable of img "altThumbImg" to false clone img "altThumbImg" set the disable of img "altThumbImg" to true put the id of last img into tID set the loc of img id tID to \ tX + (tCol-1)*tWinc,tY + (tRow-1)*(tH+tPad)- the vscroll of me set the altLoc of last img to the loc of last img set the altImageFile of last img to line tInum of tFiles set the altListNum of last img to tInum set itemDel to "/" set the toolTip of last img to the last item of line tInum of tFiles set itemDel to "," put tID into item 2 of line tInum of tfiles put tInum + 1 into tInum if tCol = tMaxWide then put 1 into tCol put tRow + 1 into tRow else put tCol + 1 into tCol end if set the altImageFiles of me to tFiles if tInum <= the number of lines in tFiles then send "populateGroup" && tCol,tRow,tInum to me in 30 milliseconds else set the altFinishedLoading of me to true end if end if end populateGroup setProp altChosenNum tNum put line tNum of the altImageFiles of me into fld "imgName" pass altChosenNum end altChosenNum setProp altImageSize tVal set the altWidth of img "altThumbImg" to item 1 of tVal set the altHeight of img "altThumbImg" to item 2 of tVal put the altNumImagesTall of me into tTall put the altNumImagesWide of me into tWide doNumImagesTallWide tTall,tWide pass altImageSize tVal end altImageSize setProp altNumImagesTall tNum put the altNumImagesWide of me into tWide doNumImagesTallWide tNum,tWide pass altNumImagesTall end altNumImagesTall setProp altNumImagesWide tNum put the altNumImagesTall of me into tTall doNumImagesTallWide tTall,tNum pass altNumImagesWide end altNumImagesWide on doNumImagesTallWide tTall,tWide set the lockloc of me to true doThumbInit put the topLeft of me into tTL put the altImagePad of me into tPad put the altWidth of img "altThumbImg" into tW put the altHeight of img "altThumbImg" into tH --calculate width of group --put tW + 2*tPad + the scrollBarWidth of me into tGrpW put tWide*tW + (tWide + 1)*tPad + the scrollBarWidth of me into tGrpW --calc height of group put tTall*tH + (tTall + 1)*tPad into tGrpH --set new group rect set the rect of me to the left of me, the top of me, the left of me + tGrpW, the top of me + tGrpH --set the new loc of img "altThumbImg" set the rect of img "altThumbImg" to \ the left of me + tPad, \ the top of me + tPad, \ the left of me + tPad + tW, \ the top of me + tPad + tH set the altLoc of img "altThumbImg" to the loc of img "altThumbImg" end doNumImagesTallWide function getExt tFile set itemDel to "." return last item of tFile end getExt ----------img altThumbImg properties------------ setProp altImageFile tFile if IsItImage(tFile)is true then put the altwidth of the target into oW put the altheight of the target into oH lock screen set the lockloc of the target to false set the fileName of the target to tFile put the width of the target into nW put the height of the target into nH # now clear the filename because you can't resize an animated gif # but you can resize an empty img then load the anim gif into it. set the fileName of the target to empty if nW>oW or nH>oH then #it's bigger than the box if nW/nH > oW/oh then # must fit width set the width of the target to oW set the height of the target to oW/nW*nH else # must fit height set the height of the target to oH set the width of the target to oH/nH*nW end if end if set the loc of the target to the altLoc of the target set the lockLoc of the target to true set the filename of the target to tFile unlock screen else # not an image file end if pass altImageFile end altImageFile function IsItImage tFile put the itemDel into tID set the itemDel to "." put lower(last item of tFile) into tExt set itemDel to tID switch tExt case "png" case "gif" case "jpg" case "bmp" case "jpeg" return true break default return false break end switch end IsItImage ---------------Custom other handlers--------------------- on altViewImage tPathName -- called from the right-click menu of an image open inv stack "altPreview" set the rect of stack "altPreview" to the windowBoundingRect set the loc of stack "altPreview" to -1000,-1000 show stack "altPreview" set the lockloc of img "altPreview" to false set the rect of img "altPreview" to 0,0,the width of stack "altPreview",the height of stack "altPreview" set the filename of img "altPreview" to tPathName set the topleft of img "altPreview" to 0,0 put the height of img "altPreview" into nH put the width of img "altPreview" into nW put the width of stack "altPreview" into oW put the height of stack "altPreview" into oH if nH <= oH and nW <= oW then set the width of stack "altPreview" to the width of img "altPreview" set the height of stack "altPreview" to the height of img "altPreview" else --image too big for the screen -- we need to lockLoc the image and reload it if nW/nH > oW/oh then # must fit width set the width of img "altPreview" to oW set the height of img "altPreview" to oW/nW*nH else # must fit height set the height of img "altPreview" to oH set the width of img "altPreview" to oH/nH*nW end if set the topLeft of img "altPreview" to 0,0 set the lockloc of img "altPreview" to true set the width of stack "altPreview" to the width of img "altPreview" set the height of stack "altPreview" to the height of img "altPreview" set the filename of img "altPreview" to tPathName end if set the loc of stack "altPreview" to the screenloc palette stack "altPreview" end altViewImage on altGetImageProps tPathName open inv stack "altPreview" set the rect of stack "altPreview" to the 200,200,400,400 --set the loc of stack "altPreview" to -1000,-1000 --show stack "altPreview" set the lockloc of img "altPreview" to false set the rect of img "altPreview" to 0,0,the width of stack "altPreview",the height of stack "altPreview" set the filename of img "altPreview" to tPathName set the topleft of img "altPreview" to 0,0 set itemDel to "/" put last item of tPathName into tFile set itemDel to "," put "FileName:"&&tFile into tmsg put cr &cr & "FilePath:"&&tPathName after tmsg put cr &cr & "Width:" && the width of img "altPreview" after tmsg put cr & "Height:" && the height of img "altPreview" after tmsg set the filename of img "altPreview" to empty close stack "altPreview" answer information tmsg end altGetImageProps on altCopyImgPath tPathName put tPathName into fld "altCopyPath" copy line 1 of fld "altCopyPath" end altCopyImgPath @ F, altImageFolder @C:/Documents and Settings/Chipp Walters/My Documents/My PicturesaltNumImagesWide 4 altThumbInit truealtTargetID 6858altFinishedLoading true altChosenNum 7altImagePad 4altImageFilter png,jpg,gif,bmp altAsyncMode truealtNumImagesTall 4altImageFiles C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/gorevnet.jpg,7010 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/evernet.jpg,7011 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/EvershareIF.jpg,7012 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/leologo.jpg,7013 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/4695.gif,7014 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/headerbg.jpg,7015 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/ted.jpg,7016 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/Hank01.jpg,7017 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/LEOif.jpg,7018 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/unabomber.jpg,7019 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/LEOif2.jpg,7020 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/addplugin.png,7021 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/evernetsplash.jpg,7022 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/addplugin_dn.png,7023 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/CosmicGelDa4.gif,7024 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/CosmicGelDg4.gif,7025 C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/BlurMetalLa4.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/BlurMetalLh4.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/CosmicGelLa4.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/earthspin.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/CosmicGelLg4.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/LEOsplash.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/leoslice.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/Leosplash2.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/test.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/altThumbViewer.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/mpgPlayermask.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/altPlugin.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/altHTMLbuilder.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/title.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/title.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/abrowser.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/test2.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/test3.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/altPropList.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/mpgPlayer.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/altImgViewer.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/altArchive.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/altBackdrop.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/soundbut.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/screengrap.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/mask2.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/HemTrainer.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/hemtrainer2.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/hemtr.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/hemtra.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/hem.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/imsplash.JPG C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/splash01.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/splash02.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/splash03.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/superfly_1600x1200.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/superfly_1280x1024.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/www.astrodesign.com_2.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/after_SR_1_.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/EverShare.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/sitehistory.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/HemingwayLogo.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/rack.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/blueprint.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/ICBSheader.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/reportheader.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/buttonleft.GIF C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/infodn.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/info.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/qtam.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/mailto_white_x.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/books.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/b2.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/aaaa.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/but_dn.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/but_over.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/but.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/compex.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/brushed metal.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/email.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/email_over.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/emailnote.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/email_drugs.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/email_kill.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/email_murder.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/email_heroin.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/email_bomb.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/buttonoven.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/buttongadgetlogo.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/websplash.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/ButtonGadgetScreen1.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/Butlibrary.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/buttonsplash.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/runrev.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/butt.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/buttongadgetdrip.png C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/metalmedium.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/metalmedium_down.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/logo-xclick.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/altLogo.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/bambi.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/www.mmicons.com.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/buttonsetsplash.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/rev_x.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/altFldHeader.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/runrev2.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/runrevlogo.gif C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/fg2alike.jpg C:/Documents and Settings/Chipp Walters/My Documents/My Pictures/background.gif altImageSize 100,70 cREVGeneral scriptChecksum %\ꔝ](#Ju bookmarks revUniqueID 1042436614173handlerList altThumbInit doThumbInit mouseDown mouseDoubleUp altImageFolder altFinishedLoading populateGroup altChosenNum altImageSize altNumImagesTall altNumImagesWide doNumImagesTallWide getExt altImageFile IsItImage altViewImage altGetImageProps altCopyImgPathscriptSelection char 4927 to 4967prevHandler altFinishedLoadingtempScript script ysetProp altThumbInit
doThumbInit
end altThumbInit
on doThumbInit
lock screen
hide grc "altBorder"
hide img "altThumbImg"
set cursor to watch
repeat with x = the number of imgs down to 1
if the short name of img x is "altThumbImg" and the number of imgs in grp "altThumbArray" > 1 then
delete img x
end if
end repeat
unlock screen
end doThumbInit
on mouseDown theButton
if the short name of the target is "altThumbImg" then
show grc "altBorder"
set the disabled of btn "altCopyImg" to false
set the altTargetID of me to the id of the target
get the rect of the target
set the rect of grc "altBorder" to \
item 1 of it - 2, \
item 2 of it -2, \
item 3 of it +2, \
item 4 of it + 2
if theButton is 3 then
put the tooltip of the target into tFname
set the text of btn "altImgMenu" to "View:"&&tFname&cr&"Copy Path"&cr&"-"&cr&"Properties"&cr
show btn "altImgMenu"
popup btn "altImgMenu"
end if
end if
pass mouseDown
end mouseDown
on mouseDoubleUp
if the short name of the target is "altThumbImg" then
show grc "altBorder"
set the altTargetID of me to the id of the target
get the rect of the target
set the rect of grc "altBorder" to \
item 1 of it - 2, \
item 2 of it -2, \
item 3 of it +2, \
item 4 of it + 2
put the altImageFile of the target into tFilePath
altViewImage tFilePath
end if
end mouseDoubleUp
setProp altImageFolder tFolder
--lock screen
doThumbInit
show img "altThumbImg"
set the altImageFile of img "altThumbImg" to empty
set the filename of img "altThumbImg" to empty
set the vscroll of me to 0
hide grc "altBorder"
put the defaultFolder into tDF
set the defaultFolder to tFolder
-- Fix path if it's root
if the number of Chars of tFolder > 3 then put "/" after tFolder
put the altImageFilter of me into tFilter
repeat for each line l in the files
put lower(getExt(l)) into tExt
repeat for each item i in tFilter
if lower(i) = tExt then
put tFolder & l & cr after tFiles
exit repeat
end if
end repeat
end repeat
delete last char of tFiles
set the defaultFolder to tDF
put the altAsyncMode of me into AsyncMode
if not AsyncMode then
set cursor to watch
put the altImagePad of me into tPad
put 1 into tInum -- tInum is the number of the img currently placing (not the ID)
put the altWidth of img "altThumbImg" into tW
put the altHeight of img "altThumbImg" into tH
put the altNumImagesWide of me into tMaxWide
put item 1 of the altLoc of img "altThumbImg" into tX
put item 2 of the altLoc of img "altThumbImg" into tY
put tW + tPad into tWinc --the amount to increment the X loc for each column
put 1 into tCol --varible for which column to place img in
put 1 into tRow --var for which row to place img in
put the number of lines in tFiles into tcount
set the disabled of img "altThumbImg" to false
------------------------------------
--set the altImageFiles of me to tFiles
------------------------------------
repeat tcount times #for each line l in tFiles
clone img "altThumbImg"
put the id of last img into tID
set the loc of img id tID to \
tX + (tCol-1)*tWinc,tY + (tRow-1)*(tH+tPad)
set the altLoc of last img to the loc of last img
set the altImageFile of last img to line tInum of tFiles
set the altListNum of last img to tInum
set itemDel to "/"
set the toolTip of last img to the last item of line tInum of tFiles
set itemDel to ","
put tID into item 2 of line tInum of tFiles
put tInum + 1 into tInum
if tCol = tMaxWide then
put 1 into tCol
put tRow + 1 into tRow
else
put tCol + 1 into tCol
end if
end repeat
--can't just hide altThumbImg because in the case where all the
--images in a folder are less wide than altThumbImg,
--hiding altThumbImg will 'reset' the group so that all the
--smaller imgs end up moving left justified.
--So must disable altThumbImg because it has scripts.
set the disable of img "altThumbImg" to true
set the altImageFiles of me to tFiles
set the level of grc "altBorder" to top
set the level of btn "altImgMenu" to top
--unlock screen
else --AsyncMode is true
set the altImageFiles of me to tFiles
set the altFinishedLoading of me to false
--set the disabled of me to true
send "populateGroup 1,1,1" to me in 30 milliseconds
end if
pass altImageFolder
end altImageFolder
setProp altFinishedLoading tVal
if tVal is true then
set the level of grc "altBorder" to top
set the level of btn "altImgMenu" to top
set the disabled of btn "altStop" to true
--set the disabled of me to false
else
--set the disabled of me to true
end if
pass altFinishedLoading
end altFinishedLoading
on populateGroup tCol,tRow,tInum --multitasking code
if the altFinishedLoading of me is not true then
put the altImagePad of me into tPad
put the altImageFiles of me into tFiles
put the number of lines in the altImageFiles of me into tcount
put the altWidth of img "altThumbImg" into tW
put the altHeight of img "altThumbImg" into tH
put the altNumImagesWide of me into tMaxWide
put item 1 of the altLoc of img "altThumbImg" into tX
put item 2 of the altLoc of img "altThumbImg" into tY
put tW + tPad into tWinc --the amount to increment the X loc for each column
set the disable of img "altThumbImg" to false
clone img "altThumbImg"
set the disable of img "altThumbImg" to true
put the id of last img into tID
set the loc of img id tID to \
tX + (tCol-1)*tWinc,tY + (tRow-1)*(tH+tPad)- the vscroll of me
set the altLoc of last img to the loc of last img
set the altImageFile of last img to line tInum of tFiles
set the altListNum of last img to tInum
set itemDel to "/"
set the toolTip of last img to the last item of line tInum of tFiles
set itemDel to ","
put tID into item 2 of line tInum of tfiles
put tInum + 1 into tInum
if tCol = tMaxWide then
put 1 into tCol
put tRow + 1 into tRow
else
put tCol + 1 into tCol
end if
set the altImageFiles of me to tFiles
if tInum <= the number of lines in tFiles then
send "populateGroup" && tCol,tRow,tInum to me in 30 milliseconds
else
set the altFinishedLoading of me to true
end if
end if
end populateGroup
setProp altChosenNum tNum
put line tNum of the altImageFiles of me into fld "imgName"
pass altChosenNum
end altChosenNum
setProp altImageSize tVal
set the altWidth of img "altThumbImg" to item 1 of tVal
set the altHeight of img "altThumbImg" to item 2 of tVal
put the altNumImagesTall of me into tTall
put the altNumImagesWide of me into tWide
doNumImagesTallWide tTall,tWide
pass altImageSize tVal
end altImageSize
setProp altNumImagesTall tNum
put the altNumImagesWide of me into tWide
doNumImagesTallWide tNum,tWide
pass altNumImagesTall
end altNumImagesTall
setProp altNumImagesWide tNum
put the altNumImagesTall of me into tTall
doNumImagesTallWide tTall,tNum
pass altNumImagesWide
end altNumImagesWide
on doNumImagesTallWide tTall,tWide
set the lockloc of me to true
doThumbInit
put the topLeft of me into tTL
put the altImagePad of me into tPad
put the altWidth of img "altThumbImg" into tW
put the altHeight of img "altThumbImg" into tH
--calculate width of group
--put tW + 2*tPad + the scrollBarWidth of me into tGrpW
put tWide*tW + (tWide + 1)*tPad + the scrollBarWidth of me into tGrpW
--calc height of group
put tTall*tH + (tTall + 1)*tPad into tGrpH
--set new group rect
set the rect of me to the left of me, the top of me, the left of me + tGrpW, the top of me + tGrpH
--set the new loc of img "altThumbImg"
set the rect of img "altThumbImg" to \
the left of me + tPad, \
the top of me + tPad, \
the left of me + tPad + tW, \
the top of me + tPad + tH
set the altLoc of img "altThumbImg" to the loc of img "altThumbImg"
end doNumImagesTallWide
function getExt tFile
set itemDel to "."
return last item of tFile
end getExt
----------img altThumbImg properties------------
setProp altImageFile tFile
if IsItImage(tFile)is true then
put the altwidth of the target into oW
put the altheight of the target into oH
lock screen
set the lockloc of the target to false
set the fileName of the target to tFile
put the width of the target into nW
put the height of the target into nH
# now clear the filename because you can't resize an animated gif
# but you can resize an empty img then load the anim gif into it.
set the fileName of the target to empty
if nW>oW or nH>oH then #it's bigger than the box
if nW/nH > oW/oh then # must fit width
set the width of the target to oW
set the height of the target to oW/nW*nH
else # must fit height
set the height of the target to oH
set the width of the target to oH/nH*nW
end if
end if
set the loc of the target to the altLoc of the target
set the lockLoc of the target to true
set the filename of the target to tFile
unlock screen
else
# not an image file
end if
pass altImageFile
end altImageFile
function IsItImage tFile
put the itemDel into tID
set the itemDel to "."
put lower(last item of tFile) into tExt
set itemDel to tID
switch tExt
case "png"
case "gif"
case "jpg"
case "bmp"
case "jpeg"
return true
break
default
return false
break
end switch
end IsItImage
---------------Custom other handlers---------------------
on altViewImage tPathName -- called from the right-click menu of an image
open inv stack "altPreview"
set the rect of stack "altPreview" to the windowBoundingRect
set the loc of stack "altPreview" to -1000,-1000
show stack "altPreview"
set the lockloc of img "altPreview" to false
set the rect of img "altPreview" to 0,0,the width of stack "altPreview",the height of stack "altPreview"
set the filename of img "altPreview" to tPathName
set the topleft of img "altPreview" to 0,0
put the height of img "altPreview" into nH
put the width of img "altPreview" into nW
put the width of stack "altPreview" into oW
put the height of stack "altPreview" into oH
if nH <= oH and nW <= oW then
set the width of stack "altPreview" to the width of img "altPreview"
set the height of stack "altPreview" to the height of img "altPreview"
else --image too big for the screen
-- we need to lockLoc the image and reload it
if nW/nH > oW/oh then # must fit width
set the width of img "altPreview" to oW
set the height of img "altPreview" to oW/nW*nH
else # must fit height
set the height of img "altPreview" to oH
set the width of img "altPreview" to oH/nH*nW
end if
set the topLeft of img "altPreview" to 0,0
set the lockloc of img "altPreview" to true
set the width of stack "altPreview" to the width of img "altPreview"
set the height of stack "altPreview" to the height of img "altPreview"
set the filename of img "altPreview" to tPathName
end if
set the loc of stack "altPreview" to the screenloc
palette stack "altPreview"
end altViewImage
on altGetImageProps tPathName
open inv stack "altPreview"
set the rect of stack "altPreview" to the 200,200,400,400
--set the loc of stack "altPreview" to -1000,-1000
--show stack "altPreview"
set the lockloc of img "altPreview" to false
set the rect of img "altPreview" to 0,0,the width of stack "altPreview",the height of stack "altPreview"
set the filename of img "altPreview" to tPathName
set the topleft of img "altPreview" to 0,0
set itemDel to "/"
put last item of tPathName into tFile
set itemDel to ","
put "FileName:"&&tFile into tmsg
put cr &cr & "FilePath:"&&tPathName after tmsg
put cr &cr & "Width:" && the width of img "altPreview" after tmsg
put cr & "Height:" && the height of img "altPreview" after tmsg
set the filename of img "altPreview" to empty
close stack "altPreview"
answer information tmsg
end altGetImageProps
on altCopyImgPath tPathName
put tPathName into fld "altCopyPath"
copy line 1 of fld "altCopyPath"
end altCopyImgPath
` G * altCopyPath !` cREVGeneral revUniqueID 1042973532870 UC:/Documents and Settings/Chipp Walters/My Documents/My Pictures/glossy/glossy01.jpg altThumbImg T uon mouseUp set the altChosenNum of grp "altThumbArray" to the altListNum of me pass mouseUp end mouseUp O d F altWidth 100 altHeight 70disable true altImageFile altListNum 0altLoc 57,109 cREVGeneral scriptChecksum $4hW=ʋ bookmarks revUniqueID 1042369309541handlerList mouseUpscriptSelection char 116 to 115prevHandler mouseUptempScript scripton mouseUp
set the altChosenNum of grp "altThumbArray" to the altListNum of me
pass mouseUp
end mouseUp
' altImgMenu 5on menuPick t put the altTargetID of grp "altThumbArray" into tID put the the altImageFile of img id tID into tFilePath switch case t = "Properties" altGetImageProps tFilePath break case t = "Copy Image" put "copy image" break case t = "Copy Path" altCopyImgPath tFilePath break case word 1 of t = "View:" altViewImage tFilePath break end switch hide me end menuPick H level top *View: evernet.jpg Copy Path - Properties cREVGeneral scriptChecksum ^ږゟ\Qn bookmarks revUniqueID 1042963121096handlerList menuPickscriptSelection char 375 to 374prevHandler menuPicktempScript scripton menuPick t
put the altTargetID of grp "altThumbArray" into tID
put the the altImageFile of img id tID into tFilePath
switch
case t = "Properties"
altGetImageProps tFilePath
break
case t = "Copy Image"
put "copy image"
break
case t = "Copy Path"
altCopyImgPath tFilePath
break
case word 1 of t = "View:"
altViewImage tFilePath
break
end switch
hide me
end menuPick
altBorder C W J level top cREVGeneral revUniqueID 1042973828111 altAsyncMode `e Zon mouseUp set the altAsyncMode of grp "altThumbArray" to the hilite of me end mouseUp Cimages load in background process. If OFF, images load much faster Load Images in background cREVGeneral scriptChecksum +]Џ`(vK bookmarks revUniqueID 1042598490490handlerList mouseUpscriptSelection char 34 to 33prevHandler mouseUptempScript scripton mouseUp
set the altAsyncMode of grp "altThumbArray" to the hilite of me
end mouseUp
altCopyPath !` * cREVGeneral revUniqueID 1042973532870 XC:/Documents and Settings/Chipp Walters/My Documents/My Pictures/craigmullins/robot.jpg altBrowsenormal @ &