HUOM! tiedostojen muokkaamiseen ei kannata käyttää Notepad++:aa, koska tällöin muokkauksia ei tallenneta.
- Asenna Notepad++ ja käytä se käynnissä (luo windows profiilille tarvittavat tiedostot)
- Mene kansioon %APPDATA%\Notepad++ . Pitäisi toimia suoraan kun kopioi tuon osoiteriville. Normaalissa XP-asennuksessa kansio C:\Documents and Settings\kayttajannimi\Application Data\Notepad++
- Muokkaa tiedostoa userDefineLang.xml, ja lisää sinne <NotepadPlus> -tagien sisään alla (koodi 1) olevat tiedot.
- Muokkaa tiedostoa shortcuts.xml, ja lisää sinne <UserDefinedCommands> -tagien sisään alla (koodi 2) olevat tiedot.
- Nyt kun käynnistät Notepad++:n ja avaat .cb -tiedoston, pitäisi ohjelman automaattisesti tunnistaa kieleksi CoolBasic. Kielen voi myös valita valikosta Kieli -> CoolBasic (alareunassa). Koodia voit kääntää ja suorittaa menemällä Suorita -> Käännä CB-koodi, tai Suorita -> Suorita CB-koodi, tai painamalla näppäinyhdistelmää alt + shift + F5alt + shift + F6
Code: Select all
<UserLang name="CoolBasic" ext="cb">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="yes" />
<Prefix words1="yes" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">"00"00</Keywords>
<Keywords name="Folder+"></Keywords>
<Keywords name="Folder-"></Keywords>
<Keywords name="Operators">- ! " # $ % & ( ) * , . / : ; ? ^ + < = ></Keywords>
<Keywords name="Comment">1remstart 2remend 0'</Keywords>
<Keywords name="Words1">abs acos addtext after animationheight animationplaying animationwidth as asc asin atan before bin box boxoverlap calldll cameraangle camerafollow camerapick camerax cameray centertext chdir chr circle cleararray clearcollisions clearkeys clearmouse clearobjects cleartext clonecameraorientation clonecameraposition cloneimage cloneobject cloneobjectorientation cloneobjectposition closefile closeinput cls clscolor collisionangle collisionx collisiony color commandline const converttointeger converttotype copybox copyfile cos countcollisions countwords crc32 currentdir curveangle curvevalue data date decrypt defaultmask defaultvisible delete deletefile deletefont deleteimage deletememblock deleteobject deletesound dim distance distance2 dot downkey drawanimation drawgame drawghostimage drawimage drawimagebox drawscreen drawtoimage drawtoscreen drawtoworld each editmap else elseif encrypt end endif endsearch eof errors escapekey execute exit field fileexists fileoffset filesize findfile first flip float for fps framelimit function getangle getangle2 getcollision getexename getkey getmap getmap2 getmouse getpixel getpixel2 getrgb getword gfxmodeexists ghostobject global gosub goto gotosavedlocation hex hotspot if image imageheight imagescollide imagesoverlap imagewidth include index initobjectlist input insert instr int isdirectory keydown keyhit keyup last left leftkey len line loadanimimage loadanimobject loadfont loadimage loadmap loadobject loadprogram loadsound locate lock log log10 logical loopobject lower lset lstanimation lstbasic lstcamera lsteffects lstfile lstgraphics lstimage lstinput lstmap lstmath lstmem lstobject lstsound lststring lstsystem lsttext makedir makeemitter makeerror makeimage makemap makememblock makeobject makeobjectfloor mapheight mapwidth maskimage maskobject max memblocksize memcopy mid min mirrorobject mod mousedown mousehit mousemovex mousemovey mousemovez mouseup mousewx mousewy mousex mousey mousez movecamera moveobject nextobject new objectangle objectfloat objectframe objectinteger objectlife objectorder objectpick objectpickable objectplaying objectrange objectsight objectsizex objectsizey objectsoverlap objectstring objectx objecty opentoedit opentoread opentowrite ellipse paintobject particleanimation particleemission particlemovement peekbyte peekfloat peekint peekshort pickcolor pickedangle pickedobject pickedx pickedy pickimagecolor pickimagecolor2 pixelpick playanimation playobject playsound pointcamera pointobject pokebyte pokefloat pokeint pokeshort positioncamera positionmouse positionobject print putpixel putpixel2 rand randomize read readbyte readfloat readint readline readshort readstring redim repeat replace resetobjectcollision resizeimage resizememblock restore return right rightkey rnd rotatecamera rotateimage rotateobject rounddown roundup rset safeexit sar saveimage saveprogram screen screendepth screengamma screenheight screenpositionobject screenshot screenwidth seekfile select setfont setmap setsound settile setupcollision setwindow shl showmouse showobject shr sin smooth2d soundplaying sqrt startsearch stopanimation stopobject stopsound str string strinsert strmove strremove tan text textheight textwidth then time timer translatecamera translateobject trim turncamera turnobject type unlock until updategame upkey upper verticaltext wait waitkey waitmouse while wrapangle write writebyte writefloat writeint writeline writeshort writestring</Keywords>
<Keywords name="Words2"></Keywords>
<Keywords name="Words3"></Keywords>
<Keywords name="Words4"></Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="FOLDEROPEN" styleID="12" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD2" styleID="6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD3" styleID="7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD4" styleID="8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="COMMENT" styleID="1" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="2" />
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="2" />
<WordsStyle name="NUMBER" styleID="4" fgColor="B75B00" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="OPERATOR" styleID="10" fgColor="0B607B" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER1" styleID="14" fgColor="00A400" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
</Styles>
</UserLang>
Code: Select all
<Command name="Käännä CB-koodi" Ctrl="no" Alt="yes" Shift="yes" Key="116">"C:\Program Files\CoolBasic\cb.exe" "$(FULL_CURRENT_PATH)"</Command>
<Command name="Suorita CB-koodi" Ctrl="no" Alt="yes" Shift="yes" Key="117">"$(NAME_PART).exe"</Command>
PÄIVITYS: Muokattu kääntämiseen ja suorittamiseen liittyviä linkkejä (koodi 2.)