Changeset 63 for trunk/lingosource
- Timestamp:
- 11/30/07 13:51:25 (4 years ago)
- Location:
- trunk/lingosource
- Files:
-
- 17 added
- 5 edited
-
castlib1/OSCmenu_Utilities.ls (modified) (5 diffs)
-
castlib1/alexUtilities.ls (modified) (33 diffs)
-
castlib1/convert_Lingo_2_CSS_Html.png (added)
-
castlib1/helptext.html (added)
-
castlib1/helptext.png (added)
-
castlib1/memberInfo.xml (modified) (5 diffs)
-
castlib1/menu1_button.html (added)
-
castlib1/menu1_button.png (added)
-
castlib1/menu2_button.html (added)
-
castlib1/menu2_button.png (added)
-
castlib1/pastefeld.txt (modified) (1 diff)
-
castlib1/simpleBMMenu.ls (modified) (1 diff)
-
castlib1/statusOutput.html (added)
-
castlib1/statusOutput.png (added)
-
castlib1/texthyperlinkBehavior.png (added)
-
castlib2/FileIOFunktionen.png (added)
-
castlib2/GetSetPrefs.png (added)
-
castlib2/PseudoXMLPS.png (added)
-
castlib2/SpriteNameBeaver.png (added)
-
castlib2/aleXtrasMovieScript.png (added)
-
castlib2/commonMovieScript.png (added)
-
castlib2/simpleGoToAction.png (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/OSCmenu_Utilities.ls
r45 r63 14 14 li = [] 15 15 pLookUpCommandList = [:] 16 17 ---------------------------------------------------18 li.add("Fix colors in scriptlists (SES 10 -> SES 9)")19 pLookUpCommandList.setaprop("Fix colors in scriptlists (SES 10 -> SES 9)", "Authoring_ExchangeScriptListColorsToRGBs me")20 21 22 ---------------------------------------------------23 li.add("Castmember Thumbnails")24 subli = []25 li.add(subli)26 27 subli.add("Make castlib label...")28 pLookUpCommandList.setaprop("Make castlib label...", "makeLabel me, theContent, theBackgroundColor_optional, memberRef_optional")29 16 30 17 … … 48 35 li.add(subli) 49 36 37 subli.add("Edit in BBEdit") 38 pLookUpCommandList.setaprop("Edit in BBEdit", "mOpen_text_with_BBedit me") 39 50 40 subli.add("Open linked script") 51 41 pLookUpCommandList.setaprop("Open linked script", "mOpen_Linked_Script_With_BBedit me") 52 53 subli.add("Open text")54 pLookUpCommandList.setaprop("Open text", "mOpen_text_with_BBedit me")55 42 56 43 subli.add("Diff selected script") … … 263 250 pLookUpCommandList.setaprop("SVN Update ScriptText in Working Copy...", "mSVN_Update_Working_Copy_ScriptText me, chooseNewPath_optional") 264 251 265 subli.add("")266 subli.add("SVN Import Scripts, Text and Fields from working copy...")252 subli.add("") 253 subli.add("SVN Import Scripts, Text and Fields from working copy...") 267 254 pLookUpCommandList.setaprop("SVN Import Scripts, Text and Fields from working copy...", "mSVN_Update_And_Import_ScriptsFromFolder me, chooseNewPath_optional, selectionOnly_optional") 268 255 … … 332 319 ---------------------------------------------------- 333 320 321 322 li.add("") 323 324 li.add("Misc.") 325 subli = [] 326 li.add(subli) 327 328 subli.add("Convert textmember to HTML + copy to clipboard") 329 pLookUpCommandList.setaprop("Convert textmember to HTML + copy to clipboard", "mCopyConvert2HTML") 330 331 332 --------------------------------------------------- 333 subli.add("Fix colors in scriptlists (SES 10 -> SES 9)") 334 pLookUpCommandList.setaprop("Fix colors in scriptlists (SES 10 -> SES 9)", "Authoring_ExchangeScriptListColorsToRGBs me") 335 336 337 li.add("") 338 339 --------------------------------------------------- 340 li.add("Castmember Thumbnails") 341 subli = [] 342 li.add(subli) 343 344 subli.add("Make castlib label...") 345 pLookUpCommandList.setaprop("Make castlib label...", "makeLabel me, theContent, theBackgroundColor_optional, memberRef_optional") 346 347 348 --------------------------------------------------- 334 349 335 350 li.add("") … … 338 353 li.add("Open containing folder in" && fnd) 339 354 pLookUpCommandList.setaprop("Open containing folder in" && fnd, "mOpenContainingFolder me") 340 341 li.add("")342 li.add("Convert textmember to HTML + copy to clipboard")343 pLookUpCommandList.setaprop("Convert textmember to HTML + copy to clipboard", "mCopyConvert2HTML")344 355 345 356 -
trunk/lingosource/castlib1/alexUtilities.ls
r51 r63 604 604 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 605 605 606 on mExportBM me, BMmember, thePath, theType, compr 606 on mExportBM me, BMmember, thePath, theType, compr, xtraInst 607 607 608 608 -- first check all arguments: … … 667 667 theDot = offset(".", thePath) 668 668 if theDot = 0 then thePath = thePath&"."&theType 669 else thePath = thePath.char[1 .. theDot]&theType669 -- else thePath = thePath.char[1 .. theDot]&theType 670 670 671 671 672 672 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 673 673 -- create an instance of Werner Sharps cool Xtra: 674 xtraInst = new (xtra "SharpExport")675 674 if not(objectP(xtraInst)) then 676 if delmem then tempmember.erase() 677 alert "Sharp Xtra missing" 678 exit 675 xtraInst = new (xtra "SharpExport") 676 if not(objectP(xtraInst)) then 677 if delmem then tempmember.erase() 678 alert "Sharp Xtra missing" 679 exit 680 end if 681 delXtra = 1 679 682 end if 680 683 … … 749 752 -- cleanup 750 753 if delmem then tempmember.erase() 751 xtraInst = 0754 if delXtra = 1 then xtraInst = 0 752 755 753 756 -- return boolean for success … … 2206 2209 sel = the selection of castlib cl 2207 2210 2208 theText = ""2211 2209 2212 repeat with sub in sel 2210 2213 repeat with mem = sub[1] to sub[2] 2211 memref = member(mem,cl) 2212 if memref.type = #script then 2214 2215 memref = member(mem,cl) 2216 2217 theText = "" 2218 theType = memref.type 2219 if theType = #script then 2213 2220 theText = memref.scripttext 2214 else if [#text, #field].getPos(memref.type) > 0 then 2221 else if theType = #text then 2222 theText = memref.html 2223 else if theType = #field then 2215 2224 theText = memref.text 2216 2225 end if 2226 2217 2227 if length(theText) > 0 then 2218 2228 2219 neuer = new(#field) 2220 neuer.text = theText 2221 2222 oldclipboardNum = new(#field) 2223 oldclipboardNum.pasteClipBoardInto() 2224 2225 copyToClipBoard(neuer) 2226 2227 shell_cmd("pbpaste | bbedit") 2228 2229 if oldclipboardNum.type <> #empty then copyToClipBoard(oldclipboardNum) 2230 oldclipboardNum.erase() 2231 neuer.erase() 2232 2233 exit 2229 --------------------- 2230 -- create a temporary file from scripttext: 2231 -- tempSrcPath = shell_cmd_list("mktemp -t temp_BBEdit_file.ls") 2232 -- tempSrcPath = tempSrcPath[1] 2233 tempSrcPath = "/tmp/temp_BBEdit_file.ls" 2234 tempSrcHFSPath = shell_cmd_list("osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE) 2235 tempSrcHFSPath = tempSrcHFSPath[1] 2236 theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 2237 --------------------- 2238 2239 shell_cmd("bbedit --wait --resume " & tempSrcPath) 2240 2241 theText = mGetTextFromFile(me, tempSrcHFSPath) 2242 2243 if theType = #script then 2244 memref.scripttext = theText 2245 else if theType = #text then 2246 memref.html = theText 2247 else if theType = #field then 2248 memref.text = theText 2249 end if 2250 2251 -- neuer = new(#field) 2252 -- neuer.text = theText 2253 -- 2254 -- oldclipboardNum = new(#field) 2255 -- oldclipboardNum.pasteClipBoardInto() 2256 -- 2257 -- copyToClipBoard(neuer) 2258 -- 2259 -- shell_cmd("pbpaste | bbedit") 2260 -- 2261 -- if oldclipboardNum.type <> #empty then copyToClipBoard(oldclipboardNum) 2262 -- oldclipboardNum.erase() 2263 -- neuer.erase() 2264 -- 2265 -- exit 2266 2234 2267 end if 2235 2268 end repeat … … 2453 2486 --------------------- 2454 2487 -- create a temporary file from scripttext: 2455 tempSrcPath = shell_cmd_list("mktemp -t temp_BBDiff_file1") 2456 tempSrcPath = tempSrcPath[1] 2488 -- tempSrcPath = shell_cmd_list("mktemp -t temp_BBDiff_file1") 2489 -- tempSrcPath = tempSrcPath[1] 2490 tempSrcPath = "/tmp/temp_BBDiff_file1.ls" 2457 2491 tempSrcHFSPath = shell_cmd_list("osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE) 2458 2492 tempSrcHFSPath = tempSrcHFSPath[1] … … 2478 2512 --------------------- 2479 2513 -- create a temporary file from scripttext: 2480 tempSrcPath2 = shell_cmd_list("mktemp -t temp_BBDiff_file2") 2481 tempSrcPath2 = tempSrcPath2[1] 2514 -- tempSrcPath2 = shell_cmd_list("mktemp -t temp_BBDiff_file2") 2515 -- tempSrcPath2 = tempSrcPath2[1] 2516 tempSrcPath2 = "/tmp/temp_BBDiff_file2.ls" 2482 2517 tempSrcHFSPath2 = shell_cmd_list("osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath2 & "\" & QUOTE & " as string" & QUOTE) 2483 2518 tempSrcHFSPath2 = tempSrcHFSPath2[1] … … 3232 3267 ----------------------- 3233 3268 #text: 3234 ext = ". rtf"3235 st = memref. rtf3269 ext = ".html" 3270 st = memref.html 3236 3271 3237 3272 ----------------------- … … 3378 3413 offs = offset(fndStr, scrText) 3379 3414 repeat while offs > 0 3380 put numToChar(13) & numToChar(10)into char offs of scrText3415 put "ÀÀÀ" into char offs of scrText 3381 3416 offs = offset(fndStr, scrText) 3382 3417 end repeat … … 3420 3455 ----------------------- 3421 3456 #text: 3422 memref. rtf= scrText3457 memref.html = scrText 3423 3458 3424 3459 ----------------------- … … 3491 3526 ----------------------- 3492 3527 #text: 3493 ext = ". rtf"3494 st = memref. rtf3528 ext = ".html" 3529 st = memref.html 3495 3530 3496 3531 ----------------------- … … 3616 3651 3617 3652 3618 3619 3620 3653 cnt = count(infolist) 3621 3654 … … 3630 3663 3631 3664 -- put "path:" && fpath 3632 3633 if baFileExists(fpath) then return fpath 3665 if length(baShortFilename(fpath)) > 0 then return fpath 3666 3667 -- if baFileExists(fpath) then return fpath 3634 3668 3635 3669 end if … … 3692 3726 end if 3693 3727 end if 3728 3729 3730 DirectImageInstance = 0 3731 if skipIcons <> 1 then 3732 if mCheckForXtra(me, "DirectImage") = 1 then 3733 if the platform contains "mac" then 3734 DirectImageInstance = new(xtra "DirectImage", 234521832) 3735 else 3736 DirectImageInstance = new(xtra "DirectImage", 228285877) 3737 end if 3738 else if mCheckForXtra(me, "SharpExport") = 1 then 3739 SharpExportInst = new(xtra "SharpExport") 3740 else 3741 skipIcons = 1 3742 end if 3743 end if 3744 3745 3694 3746 3695 3747 … … 3709 3761 alert "Failed to create directory:" && thisFolder 3710 3762 if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 3763 DirectImageInstance = 0 3711 3764 exit 3712 3765 end if … … 3735 3788 3736 3789 memtype = memref.type 3790 3791 -- if [#script].getPos(memtype) > 0 then 3737 3792 if [#script, #field, #text].getPos(memtype) > 0 then 3738 3793 … … 3751 3806 ----------------------- 3752 3807 #text: 3753 ext = ". rtf"3754 scrText = memref. rtf3808 ext = ".html" 3809 scrText = memref.html 3755 3810 convertLineBreaksToUnix = 0 3756 3811 scrtype = #text … … 3777 3832 ------------- but currently I stick to the memberInfo.xml approach to store the metadata 3778 3833 ------------- so the following is disabled ... meanwhile... 3834 ------------- the "memberInfo.xml" approach is more svn like anyway 3835 3779 3836 3780 3837 -- ------------------------------ check for existing meta data … … 3804 3861 if length(theDefaultName) < 1 then 3805 3862 theDefaultName = "member" & n & "_" & m 3806 alert memref && "has no membername! Member without names will cause trouble when re-importing the scripts." 3863 memref.name = theDefaultName 3864 -- alert memref && "has no membername! Member without names will cause trouble when re-importing the scripts." 3865 put "renamed member" && memref && "to member(" & QUOTE & theDefaultName & QUOTE & ") as member without names are not supported" 3866 3867 else 3868 3869 if memref <> member(theDefaultName, m) then 3870 put "Member" && memref && "is duplicate. Member with duplicate names are not supported" 3871 next repeat 3872 end if 3873 3807 3874 end if 3808 3875 3876 3877 3809 3878 -- if offset(".", theDefaultName) < 1 then put ".ls" after theDefaultName 3810 3879 3811 offs = offset(" ", theDefaultName) 3812 repeat while offs > 0 3813 put "_" into char offs of theDefaultName 3814 offs = offset(" ", theDefaultName) 3815 end repeat 3816 3817 offs = offset("/", theDefaultName) 3818 repeat while offs > 0 3819 put "_" into char offs of theDefaultName 3820 offs = offset("/", theDefaultName) 3821 end repeat 3822 3823 offs = offset(":", theDefaultName) 3824 repeat while offs > 0 3825 put "_" into char offs of theDefaultName 3826 offs = offset(":", theDefaultName) 3827 end repeat 3828 3829 offs = offset("\", theDefaultName) 3830 repeat while offs > 0 3831 put "_" into char offs of theDefaultName 3832 offs = offset("\", theDefaultName) 3833 end repeat 3834 3835 offs = offset("&", theDefaultName) 3836 repeat while offs > 0 3837 put "_" into char offs of theDefaultName 3838 offs = offset("&", theDefaultName) 3839 end repeat 3880 theDefaultName = mStripFunnyCharsFromFileName(me, theDefaultName) 3840 3881 3841 3882 3842 3883 origname = theDefaultName&"" 3843 if length(theDefaultName) > 2 6and isMac then3884 if length(theDefaultName) > 25 and isMac then 3844 3885 3845 3886 ms = string(the milliseconds) … … 3851 3892 3852 3893 end if 3853 3854 3855 3856 3894 3857 3895 … … 3919 3957 if thumbmember.width > 0 then 3920 3958 bmexp = 1 3921 if baFileExists(thisFolder & theDefaultName & ".jpg") then baDeleteFile(thisFolder & theDefaultName & ".jpg") 3922 mExportBM me, thumbmember, thisFolder & theDefaultName & ".jpg", "jpg" 3959 if baFileExists(thisFolder & theDefaultName & ".png") then baDeleteFile(thisFolder & theDefaultName & ".png") 3960 3961 if objectP(DirectImageInstance) then 3962 3963 DirectImageInstance.imageLoadFromMember(thumbmember) 3964 DirectImageInstance.imageSaveToFile(thisFolder & theDefaultName & ".png", 100, 1,1) 3965 3966 else if objectP(SharpExportInst) then 3967 mExportBM me, thumbmember, thisFolder & theDefaultName & ".png", "png", 100, SharpExportInst 3968 3969 end if 3970 3923 3971 end if 3924 3972 … … 3932 3980 snam = baShortFileName(thisFolder & origname & ext) 3933 3981 if length(snam) > 0 then baDeleteFile(snam) 3934 erg = baRenameFile(thisFolder & theDefaultName & ".ls", thisFolder & origname & ext)3982 erg = baRenameFile(thisFolder & theDefaultName & ext, thisFolder & origname & ext) 3935 3983 if erg <> 1 then put "Couldn't rename file " & thisFolder & theDefaultName & ext & " to " & thisFolder & origname & ext 3936 3984 if bmexp = 1 then 3937 snam = baShortFileName(thisFolder & origname & ". jpg")3985 snam = baShortFileName(thisFolder & origname & ".png") 3938 3986 if length(snam) > 0 then baDeleteFile(snam) 3939 erg = baRenameFile(thisFolder & theDefaultName & ". jpg", thisFolder & origname & ".jpg")3940 if erg <> 1 then put "Couldn't rename file " & thisFolder & theDefaultName & ". jpg to " & thisFolder & origname & ".jpg"3987 erg = baRenameFile(thisFolder & theDefaultName & ".png", thisFolder & origname & ".png") 3988 if erg <> 1 then put "Couldn't rename file " & thisFolder & theDefaultName & ".png to " & thisFolder & origname & ".png" 3941 3989 end if 3942 3990 … … 3961 4009 end repeat 3962 4010 3963 if doit = 1 then mSaveList_2_XML me, infolist, infolistPath 4011 if doit = 1 then 4012 -- mSaveList_2_XML me, infolist, infolistPath 4013 4014 mRefreshMemberInfoList me, thisFolder, m, infolist 4015 end if 4016 3964 4017 3965 4018 end repeat 3966 4019 4020 DirectImageInstance = 0 4021 SharpExportInst = 0 4022 3967 4023 if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 3968 4024 3969 4025 end 4026 4027 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4028 4029 on mRefreshMemberInfoList me, thisFolder, theCastlibNumber, infolist 4030 4031 infolistPath = thisFolder & "memberInfo.xml" 4032 4033 if ilk(infolist) <> #proplist then infolist = mReadXML_2_List(me, infolistPath) 4034 if ilk(infolist) <> #proplist then infolist = [:] 4035 newInfolist = [:] 4036 4037 isMac = (the platform contains "mac") 4038 4039 cnt = the number of members of castlib theCastlibNumber 4040 4041 repeat with n = 1 to cnt 4042 4043 memref = member(n, theCastlibNumber) 4044 4045 memtype = memref.type 4046 4047 -- if [#script].getPos(memtype) > 0 then 4048 if [#script, #field, #text].getPos(memtype) > 0 then 4049 4050 case memtype of 4051 4052 ----------------------- 4053 #script: 4054 ext = ".ls" 4055 scrtype = memref.scripttype 4056 ----------------------- 4057 #field: 4058 ext = ".txt" 4059 scrtype = #field 4060 ----------------------- 4061 #text: 4062 ext = ".html" 4063 scrtype = #text 4064 ----------------------- 4065 otherwise: 4066 ext = ".txt" 4067 scrtype = #field 4068 4069 end case 4070 4071 memname = memref.name 4072 4073 theDefaultName = memname 4074 4075 doit = 1 4076 4077 if length(theDefaultName) < 1 then 4078 4079 put "Member" && memref && "has no name, therefore skipped" 4080 4081 -- if length(theDefaultName) < 1 then 4082 -- theDefaultName = "member" & n & "_" & theCastlibNumber 4083 -- alert memref && "has no membername! Member without names will cause trouble when re-importing the scripts." 4084 -- end if 4085 4086 else 4087 4088 if memref <> member(theDefaultName, theCastlibNumber) then 4089 put "Member" && memref && "is duplicate. Member with duplicate names are not supported" 4090 4091 else 4092 theDefaultName = mStripFunnyCharsFromFileName(me, theDefaultName) 4093 4094 4095 origname = theDefaultName&"" 4096 4097 oldlist = infolist.getaprop(symbol(origname)) 4098 if not(listP(oldlist)) then 4099 oldlist = [:] 4100 fname = origname 4101 snam = baShortFileName(thisFolder & origname & ext) 4102 if length(snam) < 1 then 4103 put "Something seems wrong here. baShortFileName for " & thisFolder & origname & ext && "returned false. The file doesn't seem to exist!" 4104 end if 4105 oldlist.setaprop(#fname, origname) 4106 end if 4107 oldlist.setaprop(#scripttype, scrtype) 4108 oldlist.setaprop(#comments, memref.comments) 4109 oldlist.setaprop(#membername, memname) 4110 4111 4112 newInfolist.setaprop(symbol(origname), oldlist) 4113 -- we need to store origname as string additionally to symbol, as the symbol may change the case (although only ufs is case sensitive 4114 -- I am more comfortable with not relying on case insensitivity of filesystems) 4115 4116 end if 4117 end if 4118 end if 4119 4120 end repeat 4121 4122 if doit = 1 then mSaveList_2_XML me, newInfolist, infolistPath 4123 4124 4125 end 4126 4127 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4128 4129 on mStripFunnyCharsFromFileName me, theFileName 4130 4131 offs = offset(" ", theFileName) 4132 repeat while offs > 0 4133 put "_" into char offs of theFileName 4134 offs = offset(" ", theFileName) 4135 end repeat 4136 4137 offs = offset("/", theFileName) 4138 repeat while offs > 0 4139 put "_" into char offs of theFileName 4140 offs = offset("/", theFileName) 4141 end repeat 4142 4143 offs = offset(":", theFileName) 4144 repeat while offs > 0 4145 put "_" into char offs of theFileName 4146 offs = offset(":", theFileName) 4147 end repeat 4148 4149 offs = offset("\", theFileName) 4150 repeat while offs > 0 4151 put "_" into char offs of theFileName 4152 offs = offset("\", theFileName) 4153 end repeat 4154 4155 offs = offset("&", theFileName) 4156 repeat while offs > 0 4157 put "_" into char offs of theFileName 4158 offs = offset("&", theFileName) 4159 end repeat 4160 4161 return theFileName 4162 4163 end 4164 3970 4165 3971 4166 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx … … 4125 4320 case scrtype of 4126 4321 #field: ext = ".txt" 4127 #text: ext = ". rtf"4322 #text: ext = ".html" 4128 4323 otherwise: ext = ".ls" 4129 4324 end case … … 4243 4438 4244 4439 case dertyp of 4245 #text: ext = ". rtf"4440 #text: ext = ".html" 4246 4441 #field: ext = ".txt" 4247 4442 otherwise: ext = ".ls" … … 4371 4566 4372 4567 4373 theIcon = thePath & fname & ". jpg"4374 4375 -- if length(fname & ". jpg") > 31 and (the platform contains "mac") then4568 theIcon = thePath & fname & ".png" 4569 4570 -- if length(fname & ".png") > 31 and (the platform contains "mac") then 4376 4571 -- 4377 4572 -- unixname = baUnixName(theIcon) 4378 4573 -- if length(unixname) > 0 then 4379 4574 -- tempSrcPath = shell_cmd_list("mktemp -t temp_icon_file.XXXX") 4380 -- tempSrcPath = tempSrcPath[1] & ". jpg"4575 -- tempSrcPath = tempSrcPath[1] & ".png" 4381 4576 -- shell_cmd_list("cp " & QUOTE & unixname & QUOTE && QUOTE& tempSrcPath "E) 4382 4577 -- theIcon = baHFSName(tempSrcPath) … … 4488 4683 offs = offset(fndStr, scrText) 4489 4684 repeat while offs > 0 4490 put "ÀÀÀ"into char offs+1 of scrText4685 put numToChar(13) into char offs+1 of scrText 4491 4686 offs = offset(fndStr, scrText) 4492 4687 end repeat … … 4496 4691 offs = offset(fndStr, scrText) 4497 4692 repeat while offs > 0 4498 put numToChar(13) & numToChar(10)into char offs of scrText4693 put numToChar(13) into char offs of scrText 4499 4694 offs = offset(fndStr, scrText) 4500 4695 end repeat 4501 4696 4502 4503 4504 fndStr = numToChar(13) & "ÀÀÀ"4505 offs = offset(fndStr, scrText)4506 repeat while offs > 04507 put numToChar(13) & numToChar(10) into char offs to offs+3 of scrText4508 offs = offset(fndStr, scrText)4509 end repeat4510 4511 4512 4513 fndStr = "ÀÀÀ"4514 offs = offset(fndStr, scrText)4515 repeat while offs > 04516 put numToChar(13) & numToChar(10) into char offs to offs+2 of scrText4517 offs = offset(fndStr, scrText)4518 end repeat4519 4520 4697 end if 4521 4698 … … 4527 4704 case scrtype of 4528 4705 #field: scr.text = scrtext 4529 #text: scr. rtf= scrtext4530 otherwise: memtype =scr.scripttext = scrtext4706 #text: scr.html = scrtext 4707 otherwise: scr.scripttext = scrtext 4531 4708 end case 4532 4709 … … 4694 4871 end if 4695 4872 4696 if count(infolist) < 1 then4697 4698 alert "The specified folder doesn't seem to contain info for this castlib: file memberInfo.xml missing."4699 return 04700 4701 end if4873 if count(infolist) < 1 then 4874 4875 alert "The specified folder doesn't seem to contain info for this castlib: file memberInfo.xml missing." 4876 return 0 4877 4878 end if 4702 4879 4703 4880 doCommit = 0 … … 4707 4884 sel = the selection of castlib cl 4708 4885 anz = sel.count 4709 cnt = 14886 cnt = count(infolist) 4710 4887 repeat with n = 1 to anz 4711 4888 repeat with m = sel[n][1] to sel[n][2] 4712 4889 memref = member(m, cl) 4713 4890 dertyp = memref.type 4891 4892 put "processing member" && memref 4893 4714 4894 if [#script, #field, #text].getPos(dertyp) then 4715 4895 4896 putstr = "" 4716 4897 repeat with l = 1 to cnt 4717 4898 li = infolist[l] 4899 4900 -- put "listref =" && li 4718 4901 4719 4902 if li.getaprop(#memberName) = memref.name then … … 4725 4908 case scrtype of 4726 4909 #field: ext = ".txt" 4727 #text: ext = ". rtf"4910 #text: ext = ".html" 4728 4911 otherwise: ext = ".ls" 4729 4912 end case 4730 4913 4731 4914 fpath = thePath & theFilename & ext 4915 4916 put "checking for file" && fpath 4917 4918 if isMac = 1 then 4919 sname = baShortFileName(fpath) 4920 else 4921 sname = fpath 4922 end if 4732 4923 4733 4924 if baFileExists(fpath) then … … 4747 4938 end if 4748 4939 4749 li.deleteAt(l)4940 infolist.deleteAt(l) 4750 4941 memref.erase() 4751 4942 saveRequired = 1 4752 4943 put "Erase member:" && memref.name 4753 4944 4945 putstr = "" 4946 4947 exit repeat 4948 4949 else 4950 4951 putstr = "No corresponding file o disk was found for member" && memref.name && "(" & memref & ") erase the member manually:" & RETURN & memref & ".erase()" & RETURN 4952 4754 4953 end if 4755 4954 4756 4955 end if 4956 4757 4957 end repeat 4958 4959 if length(putstr) then put putstr 4758 4960 4759 4961 end if … … 4767 4969 saveMovie() 4768 4970 end if 4971 4972 mRefreshMemberInfoList me, thePath, castlib(cl).number 4769 4973 4770 4974 end if -
trunk/lingosource/castlib1/memberInfo.xml
r49 r63 13 13 <fName>keyboardNavigation_FrameLoop</fName> 14 14 </keyboardNavigation_FrameLoop> 15 <menu1_button> 16 <scriptType>#text</scriptType> 17 <comments></comments> 18 <memberName>menu1_button</memberName> 19 <fName>menu1_button</fName> 20 </menu1_button> 21 <menu2_button> 22 <scriptType>#text</scriptType> 23 <comments></comments> 24 <memberName>menu2_button</memberName> 25 <fName>menu2_button</fName> 26 </menu2_button> 15 27 <simpleBMMenu> 16 28 <scriptType>#score</scriptType> … … 43 55 <fName>OSCmenu_Handlers</fName> 44 56 </OSCmenu_Handlers> 45 <resizewindowfs>46 <scriptType>#score</scriptType>47 <comments></comments>48 <memberName>resizewindowfs</memberName>49 <fName>resizewindowfs</fName>50 </resizewindowfs>51 <showHideHelp>52 <scriptType>#score</scriptType>53 <comments></comments>54 <memberName>showHideHelp</memberName>55 <fName>showHideHelp</fName>56 </showHideHelp>57 <texthyperlinkBehavior>58 <scriptType>#score</scriptType>59 <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/texthyperlinkBehavior.ls</comments>60 <memberName>texthyperlinkBehavior</memberName>61 <fName>texthyperlinkBehavior</fName>62 </texthyperlinkBehavior>63 <bbdiff>64 <scriptType>#movie</scriptType>65 <comments></comments>66 <memberName>bbdiff</memberName>67 <fName>bbdiff</fName>68 </bbdiff>69 <menu1_button>70 <scriptType>#text</scriptType>71 <comments></comments>72 <memberName>menu1_button</memberName>73 <fName>menu1_button</fName>74 </menu1_button>75 <menu2_button>76 <scriptType>#text</scriptType>77 <comments></comments>78 <memberName>menu2_button</memberName>79 <fName>menu2_button</fName>80 </menu2_button>81 57 <pastefeld> 82 58 <scriptType>#field</scriptType> … … 97 73 <fName>searchword</fName> 98 74 </searchword> 75 <resizewindowfs> 76 <scriptType>#score</scriptType> 77 <comments></comments> 78 <memberName>resizewindowfs</memberName> 79 <fName>resizewindowfs</fName> 80 </resizewindowfs> 81 <showHideHelp> 82 <scriptType>#score</scriptType> 83 <comments></comments> 84 <memberName>showHideHelp</memberName> 85 <fName>showHideHelp</fName> 86 </showHideHelp> 99 87 <helptext> 100 88 <scriptType>#text</scriptType> … … 106 94 <fName>helptext</fName> 107 95 </helptext> 96 <texthyperlinkBehavior> 97 <scriptType>#score</scriptType> 98 <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/texthyperlinkBehavior.ls</comments> 99 <memberName>texthyperlinkBehavior</memberName> 100 <fName>texthyperlinkBehavior</fName> 101 </texthyperlinkBehavior> 102 <bbdiff> 103 <scriptType>#movie</scriptType> 104 <comments></comments> 105 <memberName>bbdiff</memberName> 106 <fName>bbdiff</fName> 107 </bbdiff> 108 108 <statusOutput> 109 109 <scriptType>#text</scriptType> … … 115 115 <fName>statusOutput</fName> 116 116 </statusOutput> 117 <test>118 <scriptType>#text</scriptType>119 <comments></comments>120 <memberName>test</memberName>121 <fName>test</fName>122 </test>123 <tester2>124 <scriptType>#text</scriptType>125 <comments></comments>126 <memberName>tester2</memberName>127 <fName>tester2</fName>128 </tester2>129 <tester4>130 <scriptType>#field</scriptType>131 <comments></comments>132 <memberName>tester4</memberName>133 <fName>tester4</fName>134 </tester4>135 117 </Untitled> -
trunk/lingosource/castlib1/pastefeld.txt
r42 r63 1 theResult = sendSprite(3, #mGetItemByTitle, [], "mouseUp") 1 <html> 2 <head> 3 <title>Untitled</title> 4 <style type="text/css"> 5 #code 6 { 7 margin: 10.0px 5.0px 10.0px 20.0px; 8 font: 9.0px Monaco,Courier; 9 background-color: #EEEEEE; 10 padding: 10px; 11 border-color: #AAAAAA; 12 border-width: 1px 2px 2px 1px; 13 border-style: solid; 14 text-align: left; 15 overflow: auto; 16 } 17 #code #clr1 { color: #C80000; } 18 #code #clr2 { color: #0000C8; } 19 #code #clr3 { color: #004000; } 20 #code #clr4 { color: #404040; } 21 </style> 22 23 </head> 24 <body bgcolor="#FFFFFF"> 25 <pre id="code"> 26 <span id="clr2">property</span> pMenuSpritename 27 28 <span id="clr1">-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span> 29 30 <span id="clr2">on</span><span id="clr3"> mouseDown</span><span id="clr2"> me</span> 31 spr =<span id="clr3"> sprite</span>(<span id="clr2">me</span>.<span id="clr3">spritenum</span>) 32 spr.<span id="clr3">member</span>.<span id="clr3">color</span> =<span id="clr3"> rgb</span>(<span id="clr4">255</span>,<span id="clr4"> 255</span>,<span id="clr4"> 255</span>) 33 <span id="clr3"> sprite</span>(xscr().mGetKanal(<span id="clr3">#</span>blueBackGround)).<span id="clr3">rect</span> = spr.<span id="clr3">rect</span> <span id="clr1">-- blue background</span> 34 <span id="clr3"> updatestage 35 sendSprite</span>(xscr().mGetKanal(pMenuSpritename),<span id="clr3"> #</span>mShowOSCMenu,<span id="clr2"> me</span>.<span id="clr3">spritenum</span>) 36 <span id="clr2">end</span> 37 38 <span id="clr1">-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span> 39 40 <span id="clr2">on</span><span id="clr3"> endsprite</span><span id="clr2"> me</span> 41 <span id="clr3"> sprite</span>(<span id="clr2">me</span>.<span id="clr3">spritenum</span>).<span id="clr3">member</span>.<span id="clr3">color</span> =<span id="clr3"> rgb</span>(<span id="clr4">20</span>,<span id="clr4"> 20</span>,<span id="clr4"> 20</span>) 42 <span id="clr2">end</span> 43 44 <span id="clr1">-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span> 45 46 <span id="clr2">on</span><span id="clr3"> getpropertyDescriptionList</span> 47 retlist = [:] 48 retlist[<span id="clr3">#</span>pMenuSpritename] = [<span id="clr3">#default</span>:<span id="clr3">#nothing</span>,<span id="clr3"> #format</span>:<span id="clr3">#symbol</span>,<span id="clr3"> #comment</span>:<span id="clr4">"Name of sprite with menu:"</span>] 49 <span id="clr2"> return</span> retlist 50 <span id="clr2">end</span> 51 52 <span id="clr1">-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span> 53 54 <span id="clr2">on</span> mUnhilite<span id="clr2"> me</span> 55 <span id="clr3"> sprite</span>(<span id="clr2">me</span>.<span id="clr3">spritenum</span>).<span id="clr3">member</span>.<span id="clr3">color</span> =<span id="clr3"> rgb</span>(<span id="clr4">20</span>,<span id="clr4"> 20</span>,<span id="clr4"> 20</span>) 56 <span id="clr3"> sprite</span>(xscr().mGetKanal(<span id="clr3">#</span>blueBackGround)).<span id="clr3">locV</span> = -<span id="clr4">1000</span> <span id="clr1">-- blue background</span> 57 <span id="clr2">end if</span></pre> 58 </body> 59 </html> -
trunk/lingosource/castlib1/simpleBMMenu.ls
r1 r63 1 1 property pMenuSpritename 2 3 2 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4 3
Note: See TracChangeset
for help on using the changeset viewer.
