Farbflash projects: Imaging lingo table | 3-D scene list | Find all | Handler menu | Lingo message window

Changeset 82 for trunk/lingosource


Ignore:
Timestamp:
12/09/07 10:36:15 (4 years ago)
Author:
alex
Message:

cleanup

Location:
trunk/lingosource
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/lingosource/castlib1/OSCmenu_Utilities.ls

    r76 r82  
    5252    subli.add("Batch compare selected scripts") 
    5353    pLookUpCommandList.setaprop("Batch compare selected scripts", ["mCompareSelectedScriptmembersBatch me", "bbedit_Utilities"]) 
     54     
    5455     
    5556  end if 
     
    353354  pLookUpCommandList.setaprop("Fix colors in scriptlists (SES 10 -> SES 9)", ["Authoring_ExchangeScriptListColorsToRGBs me", "alexUtilities"]) 
    354355   
     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 
    355369   
    356370  li.add("") 
  • trunk/lingosource/castlib1/alexUtilities.ls

    r78 r82  
    22552255end 
    22562256 
     2257-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     2258 
     2259on 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   
     2276end 
     2277 
     2278-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     2279 
     2280on 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   
     2300end 
    22572301 
    22582302-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     
    25362580 
    25372581on mGetFloatVersionNumber me, prodVers 
    2538     offs = offset(".", prodVers) 
    2539     if offs > 0 then 
    2540       intVers = char 1 to offs of prodVers 
    2541       delete char 1 to offs of prodVers 
    2542     else 
    2543       intVers = "" 
    2544     end if 
    2545     cnt = length(prodVers) 
    2546     repeat with n = 1 to cnt 
    2547       c = prodVers.char[n] 
    2548       if integerP(integer(c)) then 
    2549         put c after intVers 
    2550       else if c <> "." then 
    2551         exit repeat 
    2552       end if 
    2553     end repeat 
    2554      
     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   
    25552599  return value(intVers) 
    25562600end 
  • trunk/lingosource/castlib1/bbedit_Utilities.ls

    r76 r82  
    3737        if fname.length then 
    3838           
    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) 
    4041           
    4142          if charToNum(the last char of ppath) = 10 then delete the last char of ppath 
     
    101102          -- tempSrcPath = tempSrcPath[1] 
    102103          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           
    105110          theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 
    106111          --------------------- 
     
    128133          -- create a temporary file from scripttext: 
    129134          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           
    132141          theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 
    133142          --------------------- 
     
    337346            if doit = 0 then 
    338347               
    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) 
    350372               
    351373              doit = 1 
     
    431453  --  tempSrcPath = tempSrcPath[1] 
    432454  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) 
    435459   
    436460  st1 = memref1.scripttext 
     
    457481    --    tempSrcPath2 = tempSrcPath2[1] 
    458482    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     
    461488    comm = tempSrcPath2 
    462489     
     
    10391066                          neuer.copyToClipBoard() 
    10401067                          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) 
    10421073                           
    10431074                        end if 
     
    10481079                       
    10491080                       
    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) 
    10541088                       
    10551089                      mSaveTextToTempFile(me, memref.scripttext, tempSrcHFSPath) 
     
    10611095                      --                      end if 
    10621096                      --                    end if 
     1097                       
     1098                       
     1099                      if char 1 of comm = "~" then put "$HOME" into char 1 of comm 
    10631100                       
    10641101                      mDoShellCmd(me, bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " &QUOTE& tempSrcPath &QUOTE&&QUOTE& comm &QUOTE) 
     
    11131150  clistr = "bbedit" 
    11141151   
    1115   home = mDoShellCmd(me, "echo -n $HOME") 
     1152  -- home = mDoShellCmd(me, "echo -n $HOME") 
    11161153   
    11171154  repeat with sub in sel 
     
    11231160        if comm.length then 
    11241161          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 
    11261164          end if 
    11271165          put " "&comm after clistr 
  • trunk/lingosource/castlib1/svn_Utilities.ls

    r74 r82  
    22 
    33on new me 
    4 ancestor = new(script "alexUtilities") 
    5 return me 
     4  ancestor = new(script "alexUtilities") 
     5  return me 
    66end 
    77 
     
    8484          --------------------- 
    8585          -- 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) 
    9591           
    9692           
     
    134130           
    135131           
    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           
    148134           
    149135          theResult = mDoShellCmd(me, bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " &QUOTE& tempSrcPath &QUOTE&&QUOTE& comm &QUOTE && "2>&1", 1) 
  • trunk/lingosource/castlib2/memberInfo.xml

    r74 r82  
    55                <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
    66                <memberName>commonMovieScript</memberName> 
    7                 <fname>commonMovieScript</fname> 
     7                <fName>commonMovieScript</fName> 
    88        </commonmoviescript> 
    99        <FileIOFunktionen> 
     
    1111                <comments>~/Documents/Scripts/lingo/FileIOFunktionen.ls</comments> 
    1212                <memberName>FileIOFunktionen</memberName> 
    13                 <fname>FileIOFunktionen</fname> 
     13                <fName>FileIOFunktionen</fName> 
    1414        </FileIOFunktionen> 
    1515        <GetSetPrefs> 
     
    1717                <comments>~/Documents/Scripts/lingo/GetSetPrefs.ls</comments> 
    1818                <memberName>GetSetPrefs</memberName> 
    19                 <fname>GetSetPrefs</fname> 
     19                <fName>GetSetPrefs</fName> 
    2020        </GetSetPrefs> 
    2121        <aleXtrasMovieScript> 
     
    2323                <comments>~/Documents/Scripts/lingo/aleXtrasMovieScript.ls</comments> 
    2424                <memberName>aleXtrasMovieScript</memberName> 
    25                 <fname>aleXtrasMovieScript</fname> 
     25                <fName>aleXtrasMovieScript</fName> 
    2626        </aleXtrasMovieScript> 
    2727        <PseudoXMLPS> 
     
    2929                <comments>~/Documents/Scripts/lingo/PseudoXMLPS.ls</comments> 
    3030                <memberName>PseudoXMLPS</memberName> 
    31                 <fname>PseudoXMLPS</fname> 
     31                <fName>PseudoXMLPS</fName> 
    3232        </PseudoXMLPS> 
    3333        <simpleGoToAction> 
     
    3535                <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/simpleGoToAction.ls</comments> 
    3636                <memberName>simpleGoToAction</memberName> 
    37                 <fname>simpleGoToAction</fname> 
     37                <fName>simpleGoToAction</fName> 
    3838        </simpleGoToAction> 
    3939        <SpriteNameBeaver> 
     
    4141                <comments>~/Documents/Scripts/lingo/SpriteNameBeaver.ls</comments> 
    4242                <memberName>SpriteNameBeaver</memberName> 
    43                 <fname>SpriteNameBeaver</fname> 
     43                <fName>SpriteNameBeaver</fName> 
    4444        </SpriteNameBeaver> 
    4545</Untitled> 
Note: See TracChangeset for help on using the changeset viewer.