Changeset 80
- Timestamp:
- 12/07/07 08:23:09 (4 years ago)
- Location:
- branches/beta
- Files:
-
- 14 added
- 5 edited
-
HandlerMenu_OSC.dir (modified) (previous)
-
castlib1/OSCmenu_Utilities.ls (modified) (1 diff)
-
castlib1/alexUtilities.ls (modified) (4 diffs)
-
castlib1/bbedit_Utilities.ls (modified) (4 diffs)
-
castlib1/convert_Lingo_2_CSS_Html.png (added)
-
castlib1/helptext.png (added)
-
castlib1/menu1_button.png (added)
-
castlib1/menu2_button.png (added)
-
castlib1/statusOutput.png (added)
-
castlib1/texthyperlinkBehavior.png (added)
-
castlib2/FileIOFunktionen.ls (modified) (6 diffs)
-
castlib2/FileIOFunktionen.png (added)
-
castlib2/GetSetPrefs.png (added)
-
castlib2/PseudoXMLPS.png (added)
-
castlib2/SpriteNameBeaver.png (added)
-
castlib2/aleXtrasMovieScript.jpg (added)
-
castlib2/aleXtrasMovieScript.png (added)
-
castlib2/commonMovieScript.png (added)
-
castlib2/simpleGoToAction.png (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/beta/castlib1/OSCmenu_Utilities.ls
r68 r80 36 36 37 37 subli.add("Edit in BBEdit") 38 pLookUpCommandList.setaprop("Edit in BBEdit", ["mOpen_text_with_BBedit me", "bbedit_Utilities"]) 38 pLookUpCommandList.setaprop("Edit in BBEdit", ["mEdit_text_with_BBedit me", "bbedit_Utilities"]) 39 40 subli.add("Open in BBEdit") 41 pLookUpCommandList.setaprop("Open in BBEdit", ["mOpen_text_with_BBedit me", "bbedit_Utilities"]) 42 43 subli.add("Refresh members edited in BBEdit") 44 pLookUpCommandList.setaprop("Refresh members edited in BBEdit", ["mReImport_text_Opened_In_BBedit me", "bbedit_Utilities"]) 39 45 40 46 subli.add("Open linked script") -
branches/beta/castlib1/alexUtilities.ls
r67 r80 441 441 442 442 -- currently there is a bug in buddy beta with bafilelist, so we hack here... 443 444 retval = [] 445 n = 1 446 this = getnthfilenameinfolder(folderpath, n) 447 repeat while length(this) > 0 448 if length(getnthfilenameinfolder(folderpath & this, 1)) = 0 then retval.add(this) 449 n = n + 1 443 if mGetFloatVersionNumber(me, the productversion) < 11 then 444 445 -- -- budApi version: 446 retval = baFileList(folderpath, "*.*") 447 448 else 449 450 retval = [] 451 n = 1 450 452 this = getnthfilenameinfolder(folderpath, n) 451 end repeat 452 453 -- -- budApi version: 454 -- retval = baFileList(folderpath, "*.*") 453 repeat while length(this) > 0 454 if length(getnthfilenameinfolder(folderpath & this, 1)) = 0 then retval.add(this) 455 n = n + 1 456 this = getnthfilenameinfolder(folderpath, n) 457 end repeat 458 459 end if 460 455 461 456 462 else if mCheckForXtra(me, "FileXtra4") = 1 then -- if not buddy then try filextra … … 2337 2343 2338 2344 2339 pHandlerMenuWindowName = string( pHandlerMenuWindowName)2345 pHandlerMenuWindowName = string(me.pHandlerMenuWindowName) 2340 2346 if length(pHandlerMenuWindowName) < 1 then return retval 2341 2347 w = window(pHandlerMenuWindowName) … … 2398 2404 if pStatusMode = 0 then exit 2399 2405 2400 pHandlerMenuWindowName = string( pHandlerMenuWindowName)2406 pHandlerMenuWindowName = string(me.pHandlerMenuWindowName) 2401 2407 if length(pHandlerMenuWindowName) < 1 then exit 2402 2408 w = window(pHandlerMenuWindowName) … … 2526 2532 end if 2527 2533 end 2534 2535 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2536 2537 on 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 2555 return value(intVers) 2556 end -
branches/beta/castlib1/bbedit_Utilities.ls
r72 r80 51 51 end 52 52 53 54 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 55 56 on mOpen_text_with_BBedit me 53 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 54 55 on mEdit_text_with_BBedit me 56 mOpen_text_with_BBedit me, 1 57 end 58 59 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 60 61 on mOpen_text_with_BBedit me, doLiveEdit 57 62 58 63 if not(the platform contains "mac") then … … 89 94 if length(theText) > 0 then 90 95 91 --------------------- 92 -- create a temporary file from scripttext: 93 -- tempSrcPath = shell_cmd_list("mktemp -t temp_BBEdit_file.ls") 94 -- tempSrcPath = tempSrcPath[1] 95 tempSrcPath = "/tmp/temp_BBEdit_file.ls" 96 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 97 tempSrcHFSPath = tempSrcHFSPath[1] 98 theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 99 --------------------- 100 101 mDoShellCmd(me, "bbedit --wait --resume " & tempSrcPath) 102 103 theText = mGetTextFromFile(me, tempSrcHFSPath) 104 105 if theType = #script then 106 memref.scripttext = theText 107 else if theType = #text then 108 memref.html = theText 109 else if theType = #field then 110 memref.text = theText 96 97 if doLiveEdit then 98 --------------------- 99 -- create a temporary file from scripttext: 100 -- tempSrcPath = shell_cmd_list("mktemp -t temp_BBEdit_file.ls") 101 -- tempSrcPath = tempSrcPath[1] 102 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] 105 theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 106 --------------------- 107 108 mDoShellCmd(me, "bbedit --wait --resume " & tempSrcPath) 109 110 theText = mGetTextFromFile(me, tempSrcHFSPath) 111 112 if theType = #script then 113 memref.scripttext = theText 114 else if theType = #text then 115 memref.html = theText 116 else if theType = #field then 117 memref.text = theText 118 end if 119 120 121 else 122 123 theName = memref.name 124 if length(theName) < 1 then 125 theName = "member_" & memref.membernum & "_" & memref.castlibnum 126 end if 127 --------------------- 128 -- create a temporary file from scripttext: 129 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] 132 theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 133 --------------------- 134 135 mDoShellCmd(me, "bbedit " & tempSrcPath) 136 137 111 138 end if 112 139 … … 128 155 129 156 end if 157 end repeat 158 end repeat 159 160 end 161 162 163 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 164 165 on mReImport_text_Opened_In_BBedit me 166 167 if not(the platform contains "mac") then 168 alert "Sorry, BBEdit is a mac application!" & RETURN & "If you change this handler to match something appropriate for Windows, please drop me a note. alex@farbflash.de" 169 exit 170 end if 171 172 cl = the activecastlib 173 sel = the selection of castlib cl 174 175 repeat with sub in sel 176 repeat with mem = sub[1] to sub[2] 177 178 memref = member(mem,cl) 179 180 181 theName = memref.name 182 if length(theName) < 1 then 183 theName = "member_" & memref.membernum & "_" & memref.castlibnum 184 end if 185 186 delim = the last char of the moviepath 187 olddelim = the itemdelimiter 188 the itemdelimiter = delim 189 hd = item 1 of getosdirectory() 190 191 tempSrcPath = hd & delim & "tmp" & delim & theName & ".ls" 192 the itemdelimiter = olddelim 193 194 theText = mGetTextFromFile(me, tempSrcPath) 195 196 if length(theText) > 0 then 197 198 case memref.type of 199 #script: memref.scripttext = theText 200 #text: memref.html = theText 201 #field: memref.text = theText 202 end case 203 204 end if 205 130 206 end repeat 131 207 end repeat … … 952 1028 else 953 1029 954 if (mCheckForXtra(me, "Shell") + mCheckForXtra(me, "ff_shell")) = 0 then955 put "-------------------------------------------------------"956 put RETURN&"neuer = new(#field)"&RETURN&"neuer.text = "&memref&".scripttext"&RETURN&"neuer.copyToClipBoard()"&RETURN&"neuer.erase()"&RETURN957 put RETURN&"shell_cmd(""E&"PBPaste | BBedit ; BBedit "&memref.comments"E&")"&RETURN958 1030 959 else 960 961 neuer = new(#field) 962 neuer.text = memscr 963 neuer.copyToClipBoard() 964 neuer.erase() 965 mDoShellCmd(me, "PBPaste | BBedit ; BBedit "&memref.comments) 1031 if (mCheckForXtra(me, "Shell") + mCheckForXtra(me, "ff_shell")) = 0 then 1032 put "-------------------------------------------------------" 1033 put RETURN&"neuer = new(#field)"&RETURN&"neuer.text = "&memref&".scripttext"&RETURN&"neuer.copyToClipBoard()"&RETURN&"neuer.erase()"&RETURN 1034 put RETURN&"shell_cmd(""E&"PBPaste | BBedit ; BBedit "&memref.comments"E&")"&RETURN 1035 1036 else 1037 1038 neuer = new(#field) 1039 neuer.text = memscr 1040 neuer.copyToClipBoard() 1041 neuer.erase() 1042 mDoShellCmd(me, "PBPaste | BBedit ; BBedit "&memref.comments) 1043 1044 end if 966 1045 967 1046 end if 968 1047 969 end if970 1048 971 1049 else -
branches/beta/castlib2/FileIOFunktionen.ls
r72 r80 106 106 if call(#mCheckForXtra, mGetXScript(), "BudAPI") = 1 then 107 107 startfolder = string(startfolder) 108 109 resetUNames = 0 110 if the platform contains "mac" then 111 if baSysFolder("prefs") starts "/" then 112 baReturnUnixNames(0) 113 resetUNames = 1 114 end if 115 end if 108 116 if length(startfolder) > 0 then 109 117 pfad = baGetFilename("save", startfolder, theDefaultName, "", 524288+2+4+4194304, theTitle, false, -1, -1) … … 111 119 pfad = baGetFilename("save", "", theDefaultName, "", 524288+2+4+4194304, theTitle, false, -1, -1) 112 120 end if 121 122 if resetUNames = 1 then baReturnUnixNames(1) 123 113 124 else 114 125 pfad = fio.displaySave(theTitle, theDefaultName) … … 275 286 if call(#mCheckForXtra, mGetXScript(), "BudAPI") = 1 then 276 287 288 resetUNames = 0 289 if the platform contains "mac" then 290 if baSysFolder("prefs") starts "/" then 291 baReturnUnixNames(0) 292 resetUNames = 1 293 end if 294 end if 295 277 296 startDir = string(startDir) 278 297 defaultName = string(defaultName) … … 281 300 prompt = string(prompt) 282 301 283 return baGetFilename("open", startDir, defaultName, filetypes, 524288+4+2+4194304, prompt, false, -2, -1) 302 retval = baGetFilename("open", startDir, defaultName, filetypes, 524288+4+2+4194304, prompt, false, -2, -1) 303 304 if resetUNames = 1 then baReturnUnixNames(1) 305 306 return retval 284 307 285 308 else … … 307 330 308 331 if xscr().mCheckForXtra("BudAPI") = 1 then -- if buddy is present... 332 333 resetUNames = 0 334 if the platform contains "mac" then 335 if baSysFolder("prefs") starts "/" then 336 baReturnUnixNames(0) 337 resetUNames = 1 338 end if 339 end if 340 309 341 retval = baGetFolder( "", "Select a folder", 3, "", 50, 50 ) 342 343 if resetUNames = 1 then baReturnUnixNames(1) 344 310 345 else if xscr().mCheckForXtra("FileXtra4") = 1 then -- if not buddy then try filextra 311 346 fx = (xtra "filextra4").new() … … 340 375 341 376 if xscr().mCheckForXtra("BudAPI") then -- if buddy is present... 377 342 378 -- -- budApi version: 343 379 retval = baFileList(folderpath, "*.*")
Note: See TracChangeset
for help on using the changeset viewer.
