Changeset 82 for trunk/lingosource
- Timestamp:
- 12/09/07 10:36:15 (4 years ago)
- Location:
- trunk/lingosource
- Files:
-
- 5 edited
-
castlib1/OSCmenu_Utilities.ls (modified) (2 diffs)
-
castlib1/alexUtilities.ls (modified) (2 diffs)
-
castlib1/bbedit_Utilities.ls (modified) (11 diffs)
-
castlib1/svn_Utilities.ls (modified) (3 diffs)
-
castlib2/memberInfo.xml (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/OSCmenu_Utilities.ls
r76 r82 52 52 subli.add("Batch compare selected scripts") 53 53 pLookUpCommandList.setaprop("Batch compare selected scripts", ["mCompareSelectedScriptmembersBatch me", "bbedit_Utilities"]) 54 54 55 55 56 end if … … 353 354 pLookUpCommandList.setaprop("Fix colors in scriptlists (SES 10 -> SES 9)", ["Authoring_ExchangeScriptListColorsToRGBs me", "alexUtilities"]) 354 355 356 357 if isMac = 1 then 358 --------------------------------------------------- 359 li.add("Unix path") 360 subli = [] 361 li.add(subli) 362 363 subli.add("Convert path from HFS to UNIX") 364 pLookUpCommandList.setaprop("Convert path from HFS to UNIX", ["mConvertHFS2Unix me", "alexUtilities"]) 365 subli.add("Convert path from UNIX to HFS") 366 pLookUpCommandList.setaprop("Convert path from UNIX to HFS", ["mConvertUnix2HFS me", "alexUtilities"]) 367 368 end if 355 369 356 370 li.add("") -
trunk/lingosource/castlib1/alexUtilities.ls
r78 r82 2255 2255 end 2256 2256 2257 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2258 2259 on mConvertHFS2Unix me, fname 2260 2261 if not(the platform) contains "mac" then return fname 2262 2263 if mCheckForXtra(me, "budapi") = 0 then 2264 offs = offset(":", fname) 2265 repeat while offs 2266 put "/" into char offs of fname 2267 offs = offset(":", fname) 2268 end repeat 2269 put "/Volumes/" before fname 2270 else 2271 return baUnixName(fname) 2272 end if 2273 2274 return fname 2275 2276 end 2277 2278 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2279 2280 on mConvertUnix2Hfs me, fname 2281 if not(the platform) contains "mac" then return fname 2282 2283 if mCheckForXtra(me, "budapi") = 0 then 2284 offs = offset("/", fname) 2285 repeat while offs 2286 put ":" into char offs of fname 2287 offs = offset("/", fname) 2288 end repeat 2289 osDir = getOsDirectory() 2290 olddelim = the itemdelimiter 2291 the itemdelimiter = ":" 2292 put item 1 of osDir before fname 2293 the itemdelimiter = olddelim 2294 else 2295 return baHFSName(fname) 2296 end if 2297 2298 return fname 2299 2300 end 2257 2301 2258 2302 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx … … 2536 2580 2537 2581 on mGetFloatVersionNumber me, prodVers 2538 offs = offset(".", prodVers)2539 if offs > 0 then2540 intVers = char 1 to offs of prodVers2541 delete char 1 to offs of prodVers2542 else2543 intVers = ""2544 end if2545 cnt = length(prodVers)2546 repeat with n = 1 to cnt2547 c = prodVers.char[n]2548 if integerP(integer(c)) then2549 put c after intVers2550 else if c <> "." then2551 exit repeat2552 end if2553 end repeat2554 2582 offs = offset(".", prodVers) 2583 if offs > 0 then 2584 intVers = char 1 to offs of prodVers 2585 delete char 1 to offs of prodVers 2586 else 2587 intVers = "" 2588 end if 2589 cnt = length(prodVers) 2590 repeat with n = 1 to cnt 2591 c = prodVers.char[n] 2592 if integerP(integer(c)) then 2593 put c after intVers 2594 else if c <> "." then 2595 exit repeat 2596 end if 2597 end repeat 2598 2555 2599 return value(intVers) 2556 2600 end -
trunk/lingosource/castlib1/bbedit_Utilities.ls
r76 r82 37 37 if fname.length then 38 38 39 ppath = mDoShellCmd(me, "osascript -e " & QUOTE & "return POSIX path of \" & QUOTE & fname & "\" & QUOTE & QUOTE) 39 ppath = mConvertHFS2Unix(me, fname) 40 -- ppath = mDoShellCmd(me, "osascript -e " & QUOTE & "return POSIX path of \" & QUOTE & fname & "\" & QUOTE & QUOTE) 40 41 41 42 if charToNum(the last char of ppath) = 10 then delete the last char of ppath … … 101 102 -- tempSrcPath = tempSrcPath[1] 102 103 tempSrcPath = "/tmp/temp_BBEdit_file.ls" 103 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 104 tempSrcHFSPath = tempSrcHFSPath[1] 104 105 -- tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 106 -- tempSrcHFSPath = tempSrcHFSPath[1] 107 tempSrcHFSPath = mConvertUnix2Hfs(me, tempSrcPath) 108 109 105 110 theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 106 111 --------------------- … … 128 133 -- create a temporary file from scripttext: 129 134 tempSrcPath = "/tmp/" & theName & ".ls" 130 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 131 tempSrcHFSPath = tempSrcHFSPath[1] 135 136 -- tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 137 -- tempSrcHFSPath = tempSrcHFSPath[1] 138 tempSrcHFSPath = mConvertUnix2Hfs(me, tempSrcPath) 139 140 132 141 theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 133 142 --------------------- … … 337 346 if doit = 0 then 338 347 339 tempSrcPath = mDoShellCmd(me, "mktemp -d -t temp_BBDiff_folder1", 1) 340 tempSrcPath = tempSrcPath[1] & "/" 341 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 342 tempSrcHFSPath = tempSrcHFSPath[1] 343 344 345 tempTgtPath = mDoShellCmd(me, "mktemp -d -t temp_BBDiff_folder2", 1) 346 tempTgtPath = tempTgtPath[1] & "/" 347 tempTgtHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempTgtPath & "\" & QUOTE & " as string" & QUOTE, 1) 348 tempTgtHFSPath = tempTgtHFSPath[1] 349 348 -- tempSrcPath = mDoShellCmd(me, "mktemp -d -t temp_BBDiff_folder1", 1) 349 -- tempSrcPath = tempSrcPath[1] & "/" 350 351 tempSrcPath = "/tmp/temp_BBDiff_folder1/" 352 353 mDoShellCmd(me, "mkdir -p " & tempSrcPath) 354 mDoShellCmd(me, "rm -r " & tempSrcPath) 355 356 -- tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 357 -- tempSrcHFSPath = tempSrcHFSPath[1] 358 tempSrcHFSPath = mConvertUnix2Hfs(me, tempSrcPath) 359 360 361 -- tempTgtPath = mDoShellCmd(me, "mktemp -d -t temp_BBDiff_folder2", 1) 362 -- tempTgtPath = tempTgtPath[1] & "/" 363 364 tempTgtPath = "/tmp/temp_BBDiff_folder2/" 365 366 mDoShellCmd(me, "mkdir -p " & tempTgtPath) 367 mDoShellCmd(me, "rm -r " & tempTgtPath) 368 369 --tempTgtHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempTgtPath & "\" & QUOTE & " as string" & QUOTE, 1) 370 --tempTgtHFSPath = tempTgtHFSPath[1] 371 tempTgtHFSPath = mConvertUnix2Hfs(me, tempTgtPath) 350 372 351 373 doit = 1 … … 431 453 -- tempSrcPath = tempSrcPath[1] 432 454 tempSrcPath = "/tmp/temp_BBDiff_file1.ls" 433 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 434 tempSrcHFSPath = tempSrcHFSPath[1] 455 456 -- tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 457 -- tempSrcHFSPath = tempSrcHFSPath[1] 458 tempSrcHFSPath = mConvertUnix2Hfs(me, tempSrcPath) 435 459 436 460 st1 = memref1.scripttext … … 457 481 -- tempSrcPath2 = tempSrcPath2[1] 458 482 tempSrcPath2 = "/tmp/temp_BBDiff_file2.ls" 459 tempSrcHFSPath2 = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath2 & "\" & QUOTE & " as string" & QUOTE, 1) 460 tempSrcHFSPath2 = tempSrcHFSPath2[1] 483 484 -- tempSrcHFSPath2 = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath2 & "\" & QUOTE & " as string" & QUOTE, 1) 485 -- tempSrcHFSPath2 = tempSrcHFSPath2[1] 486 tempSrcHFSPath2 = mConvertUnix2Hfs(me, tempSrcPath2) 487 461 488 comm = tempSrcPath2 462 489 … … 1039 1066 neuer.copyToClipBoard() 1040 1067 neuer.erase() 1041 mDoShellCmd(me, "PBPaste | BBedit ; BBedit "&memref.comments) 1068 1069 comm = memref.comments 1070 if char 1 of comm = "~" then put "$HOME" into char 1 of comm 1071 1072 mDoShellCmd(me, "PBPaste | BBedit ; BBedit " & comm) 1042 1073 1043 1074 end if … … 1048 1079 1049 1080 1050 tempSrcPath = mDoShellCmd(me, "mktemp -t temp_BBDiff_file1", 1) 1051 tempSrcPath = tempSrcPath[1] 1052 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 1053 tempSrcHFSPath = tempSrcHFSPath[1] 1081 -- tempSrcPath = mDoShellCmd(me, "mktemp -t temp_BBDiff_file1.ls", 1) 1082 -- tempSrcPath = tempSrcPath[1] 1083 tempSrcPath = "/tmp/temp_BBEdit_file.ls" 1084 1085 -- tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 1086 -- tempSrcHFSPath = tempSrcHFSPath[1] 1087 tempSrcHFSPath = mConvertUnix2Hfs(me, tempSrcPath) 1054 1088 1055 1089 mSaveTextToTempFile(me, memref.scripttext, tempSrcHFSPath) … … 1061 1095 -- end if 1062 1096 -- end if 1097 1098 1099 if char 1 of comm = "~" then put "$HOME" into char 1 of comm 1063 1100 1064 1101 mDoShellCmd(me, bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " "E& tempSrcPath "E&"E& comm "E) … … 1113 1150 clistr = "bbedit" 1114 1151 1115 home = mDoShellCmd(me, "echo -n $HOME")1152 -- home = mDoShellCmd(me, "echo -n $HOME") 1116 1153 1117 1154 repeat with sub in sel … … 1123 1160 if comm.length then 1124 1161 if char 1 of comm = "~" then 1125 put home into char 1 of comm 1162 -- put home into char 1 of comm 1163 put "$HOME" into char 1 of comm 1126 1164 end if 1127 1165 put " "&comm after clistr -
trunk/lingosource/castlib1/svn_Utilities.ls
r74 r82 2 2 3 3 on new me 4 ancestor = new(script "alexUtilities")5 return me4 ancestor = new(script "alexUtilities") 5 return me 6 6 end 7 7 … … 84 84 --------------------- 85 85 -- create a temporary file from scripttext: 86 tempSrcPath = mDoShellCmd(me, "mktemp -t temp_BBDiff_file1", 1) 87 tempSrcPath = tempSrcPath[1] 88 89 if mCheckForXtra(me, "budapi") = 0 then 90 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 91 tempSrcHFSPath = tempSrcHFSPath[1] 92 else 93 tempSrcHFSPath = baHFSName(tempSrcPath) 94 end if 86 -- tempSrcPath = mDoShellCmd(me, "mktemp -t temp_BBDiff_file1", 1) 87 -- tempSrcPath = tempSrcPath[1] 88 tempSrcPath = "/tmp/temp_BBEdit_file1.ls" 89 90 tempSrcHFSPath = mConvertUnix2Hfs(me, tempSrcPath) 95 91 96 92 … … 134 130 135 131 136 137 if mCheckForXtra(me, "budapi") = 0 then 138 comm = thePath 139 offs = offset(":", comm) 140 repeat while offs 141 put "/" into char offs of comm 142 offs = offset(":", comm) 143 end repeat 144 put "/Volumes/" before comm 145 else 146 comm = baUnixName(thePath) 147 end if 132 comm = mConvertHFS2Unix(me, thePath) 133 148 134 149 135 theResult = mDoShellCmd(me, bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " "E& tempSrcPath "E&"E& comm "E && "2>&1", 1) -
trunk/lingosource/castlib2/memberInfo.xml
r74 r82 5 5 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 6 6 <memberName>commonMovieScript</memberName> 7 <f name>commonMovieScript</fname>7 <fName>commonMovieScript</fName> 8 8 </commonmoviescript> 9 9 <FileIOFunktionen> … … 11 11 <comments>~/Documents/Scripts/lingo/FileIOFunktionen.ls</comments> 12 12 <memberName>FileIOFunktionen</memberName> 13 <f name>FileIOFunktionen</fname>13 <fName>FileIOFunktionen</fName> 14 14 </FileIOFunktionen> 15 15 <GetSetPrefs> … … 17 17 <comments>~/Documents/Scripts/lingo/GetSetPrefs.ls</comments> 18 18 <memberName>GetSetPrefs</memberName> 19 <f name>GetSetPrefs</fname>19 <fName>GetSetPrefs</fName> 20 20 </GetSetPrefs> 21 21 <aleXtrasMovieScript> … … 23 23 <comments>~/Documents/Scripts/lingo/aleXtrasMovieScript.ls</comments> 24 24 <memberName>aleXtrasMovieScript</memberName> 25 <f name>aleXtrasMovieScript</fname>25 <fName>aleXtrasMovieScript</fName> 26 26 </aleXtrasMovieScript> 27 27 <PseudoXMLPS> … … 29 29 <comments>~/Documents/Scripts/lingo/PseudoXMLPS.ls</comments> 30 30 <memberName>PseudoXMLPS</memberName> 31 <f name>PseudoXMLPS</fname>31 <fName>PseudoXMLPS</fName> 32 32 </PseudoXMLPS> 33 33 <simpleGoToAction> … … 35 35 <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/simpleGoToAction.ls</comments> 36 36 <memberName>simpleGoToAction</memberName> 37 <f name>simpleGoToAction</fname>37 <fName>simpleGoToAction</fName> 38 38 </simpleGoToAction> 39 39 <SpriteNameBeaver> … … 41 41 <comments>~/Documents/Scripts/lingo/SpriteNameBeaver.ls</comments> 42 42 <memberName>SpriteNameBeaver</memberName> 43 <f name>SpriteNameBeaver</fname>43 <fName>SpriteNameBeaver</fName> 44 44 </SpriteNameBeaver> 45 45 </Untitled>
Note: See TracChangeset
for help on using the changeset viewer.
