Announcement

Collapse
No announcement yet.

Cannot copy and paste from SC Forum

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Cannot copy and paste from SC Forum

    In the source code Forum there is a piece of code that helps you create special characters in HTLM (the writer claims): http://www.powerbasic.com/support/pb...ad.php?t=35804 . Unfortunately, I cannot copy and paste it into PBEdit. Alternately I c&p'ed it to Notepad and then saved it as a BAS-file. But I cannot open that copy in PBEdit. What might be wrong?

    Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
    http://zijlema.basicguru.eu
    *** Opinions expressed here are not necessarily untrue ***

    #2
    I'm stumped as to why it won't copy for you, but I downloaded, tested, zipped and embedded the code below--using a little program I posted recently in Source. Can you download the below? Running it will create the zip file containing the .BAS code you wanted.

    '
    Code:
    'The function below contains the embedded file C:\htmlCoder.zip
    'Running this program will restore the file as C:\htmlCoder_emb.zip
    #COMPILE EXE
    #DIM ALL
    #REGISTER NONE
    
    GLOBAL joinOrigStr AS STRING             'GLOBAL for use anywhere
    
    FUNCTION PBMAIN () AS LONG
    LOCAL fileName AS STRING
       fileName = "C:\htmlCoder_emb.zip" '<< restored file name
       CALL restoreEmbeddedFile(fileName)
    END FUNCTION
    
    FUNCTION restoreEmbeddedFile(fileName AS STRING) AS LONG
    LOCAL changeStr, translateStr AS STRING
    LOCAL p AS STRING PTR * 240
    LOCAL origLen AS LONG
    
      joinOrigStr = STRING$(7630, 0)
      changeStr   = STRING$(530, 0)
      p = STRPTR(joinOrigStr)
      origLen = 7390
    @p="PK@@@@ÂD’7Z³zb@@#Ø@@@@@@htmlCoder.basì=koÛ¸–ßô?ðf{S§U@K²c{.r1~(‰P¿`»“vp@±•XSÙòÈrÓ̧û›v?-°»¿mIñ-Q–œG›ÎÄhešâyðžÃCòHy@Š|Î&½.@¶Ýì‚öYs4~ùâ5üoÙWà6Ø€…³Ü8¾nB/r1Àʹv×@ˆæÞ@¬ð.ØDžïE°‘Ì]ÃFð–k7Œ0Fo@+`}#@Ž¿Ö@à«Þs.}¬WîÔs|Lg:wBg@¹á":INCR p
    @p="@‚óOcûüÓ)X3÷ÆØu6Ëé3²@ƒëÐY€ÒÂ[zïw.oÁ̽r6~t@©ïM?/Á¸ rÖŸ/ÜÀø–®;ƒpŒ.(Q¬soæ®À!d}@ÅàEk0…|@Ú£Y0Ý,ÜeôXË߂ۿa|E?Mßý@ša¤½òN×ßårMa¸¹„ìBrŠäL%¸tÁUèºPG›5äÞYΐŒ¼+ϝ½‹ÕùíAohw-`}´^¾€U‡÷ý æš`h[mNÀ¹ÝoíŸ@;tÞ[¶}2÷ö¦ú0$ÿ~Ú³z½Á/V³":INCR p
    @p=";“û9ûgûÕ@@ì¾=)V)#¸³~g%ƒƒƒiCœãó‹,öì_t@á<BŒœw/ÎûáhÐ.tX!PÆÖ¨Óœ4‹A:;ï]t¬ñd4øT°×XȬßn¶'ö/ÍIAÝ”ëGɦ=Ðà´@®—1`·õa2ô?‹2ZŽY_ÃB@°^Æý‹=¶@ʯÝ@Œ:Ö¨8ír¹.@wº§'£f¯àèAÐzüiܳúv@‰chëãE×:)`Bº,COF#«Ù±ûyŠVBìӳɸ=@t»@æhWèö@":INCR p
    @p="uwØYýIÚ:nŸ\L¬Å:CdEgÐ^‘½ŸŠ@NDj<¾è&öI1ËãÝÔcF;ã³ÓÞï]ÙÇ@ýÁIÓî¶¡zò̓êe:¶&'ƒþ.âBA‰RŠƒÂÁLA¡@w2£:µ;P1±³Ña½^ÖãºöÅé¨9<³Û¸Õ¾|ѱÚ]8\Àɇ>tlƒ>hÃ`åÜ[΂›aLA×n=äbMã]§ÛÝͮ݃=¹Ys”ZŸ~–¿@†î—óåì†-@¶ìœC_@|wo¤*7½õuªòfè@˜$Yí³êî@z@ª~øÁÚ":INCR p
    @p="mûÞê2pÂYv?¤f°ÛpZ‹Ut›Sn–ƒóԍ:þµ¹‹L|¼@óV¤„³„z'¨DÅmÔ”O`H·ÞF7n@{°@Ý`y½@oÅŒrH,íå…‹ùj>õƒKÇoú>«ï@Qßê&ióVŒð͉ï\¯S¤g7@ÛÈåõùÄ»ºóh£F¼Ï=w!Èmüa顁›m¡’эÁÊ]æj©•Z}ÛˆŒÝˆAwœÈɤ“lÈHÍnN‚páDi¯RXœã¼!?æC~÷þ0‚ñ€yÀ¾‹I¤ã! ´_í&Š@Úï…΃2© —_":INCR p
    @p=":P@·¡=ƒ®‰pä:³Voø@¡~ˆÞ$ºvÚ´¨ë@©7ÃR¦ÓéëׯA@?×\¸_'ÛGa‹@`ü¡%2£Ø±×„Aàø'¸Œw–_Ѽø›ñt¾ðfHàˆ[ƒñæ²í;ëõe¥ê§VóväÃ/¤2(VÔ5y¤òÉE9Ѐ´ºÒÀ…º”MVt@h:Öp2*a> #\wÆ\§˜ïù~@cÉ¡ØnÁÕk7‹¤4ß°¶R§¶32¯·˜@6HRI¦ƒ,9IE¸ö:@‰l4Êȼ¶@Xo.§":INCR p
    @p="ˆ8ìgÀÁî¼yƒGwsµò½©yÁXË(¼ÃÀƒæúæÍ#f2¶zM»_¢úåNH‹@,@@õx’@@m9ÓÏëÇév!WJDau@ö:ß±Eý$h·zãS|}â{òŽ¿{.`/½Ès|ï¬WèAf¾Ê@S±ÃGaû¶Ômhxö¹vå[dc|68ã@ZJ1Û’v~^ƒÑf@ØN¥¢d&Á>t¼#w|q™!È@dG!@k˜%2|Ï&2o·cÛ;_\ðyAljŸ@{|ÒìŽQgÏáúºÙ“3«/·BÛ1²é`§":INCR p
    @p="â‚Xåæj”4&)Iòi—$¡1Ù'¸•ñ`K@Ù#™ :Ší@@‡àڍ€ï^E`lÖ.Ù¾F›»fêøÓïD.øoù~@‰`t\щMŠxê~LÕnÅ–×ĸ솬bqÝEZ;ä“\ÞJ±]ÖêVöˆÆÏÆ8Û%ät{_÷»ƒóQ§Df@ðèÝîŸÙBoÞ‡ÍKæ°qð/ýè@`s4îaý?ÍZ<4ã6fM€¹E0·û‡æÁ¿ý@ÎïL¾F¯Ž±^`#@@¤ ÖøþÞFK<@@‡88Ã>`¬ö\n¢":INCR p
    @p="z±ÃÂË[Wí¦øê¥„0ˆm2ØDî×RSÚ6Ï@áx&éÔö™K7ñ´p†n´@—!7,Pèó@r@b“@'-îÌ‹‚Øa§ƒ‘G·V…ªDúòEwÐŽ7xÈj«9nÛö¯@FuôV¼KzÐXÓèò¶}6zU*Óq7>×ï¥ø4B]«O´øè´9&{,,¹K½ý3½@I´vFI½¼Ü¥NRÞ´!•©E+Û*ÕDŒò&ÖãcFo8Á׏§í´œC‚ Cd´ö#ù±®¾u†öG8ùi•öð@-9mϝp½§":INCR p
    @p="½~/FMGz–ôºäUù@:‚âGä;B ¿é¡@ü™@B:PC¾åJ‘½[ò“ì=“_Òvr1ß2Ö€rs>Í=y ËG@¼R>!ÐÀd;*Ž‹:2΃.Ä~ìP×F§@’n–5ôß0¨%Ò>6;:IkÔ÷‰ÁTT‹©@TIjC/7{¤ú”iªÄC&ÓihÄŽ·7萺F|»)£ÞÆ£+µ(#µß$–ÁGÀÀCX8+°AK5à.Ñiù´öÏA«7|<ÏLbrlk@Í•àqqÝÐûêúÃ(dKÁGÃöäNë¶":INCR p
    @p="âT},dpõê˜oÍl™ÊàD{Ц2á†(D#¢8ô0Ç1>@6'“fûL5Фfí®Õ„c¿ÕE¨L²hõv–ƒKßAÉ’Sh-{2FÃçr±zµ…w‹5‹s9p)Þ@ë@&Üc&ŒÐžˆ檺0©Ç«h(ˆ£¼ô@8T––„!–ñÁ[4ñáâaí(E!ÊhÛ£àfÿ¸Œú¥—ë;Öñ1¢qˆ@¼AØ2ׂÊôXÀ^M‡î7„ÑxÎø¢Ñjþþ±ŽhÕŽÄØ@’;þ™Œ«¼¡q¡DŽ`A‰ˆ‘":INCR p
    @p="ømÿÔ…25„NK0uƒàsœReºNÅÙË Ü?†êF²Ô ʃï@Áë)`™bx˜þ,(ûïçg64KÞÌQ¢Ð@ÝMãè·Gl”ˆwû(nøm_¬ŠÛbÑÑê¸5ªˆ &ŒgL´z4‰QÊXº7lôA§@'tnÀ:X¸À÷–p=u„ÀKo@+@x%b@ÁGP*kåƒÃòûÐíhx.)ùÿ'¾ü‰¾Aœ3Ô§GŒY罦h»vß%¡é5.”ë@@¸@ˆ—üV1~ty«“!KÈ#BýÅ…·@S¢":INCR p
    @p="b*Yô@Š»fàâ6ú1tykè@úD°ñºe@k´@Ö/iúçvgrŒ,ƪ²Ö0!cÕ’¹Žö7GVg[sÔ@·‡€´¹‹>ÖÒ^ùé€&˜@’•Ó0†mðþ‘fÅôFì»Ý#;Uͬ%NáA™¢U.Yâ‰ðÈ@É[,Æ’ØMŠIyû@t8Ç(l{UÂÍÄ5¶èØÈ‰“—öþ@ƒ«½ýšÃþoÝ%.La”ŒKkwJJÓ`u‹K¡{QèÌ\\„®û@—|ç÷Mð=Jd?Ä¿Ñ@e@p-/×+\Z8Ó—fë£Ë":INCR p
    @p="¢ËÅõÎt@+'tÌo6£=÷ëÔ'Åß7îš2½@CÚ©ËðË¥Cˆm>íéÌóYqé‰ÿE?ÿÓö7ëÁywM¸ö¾xT—Ÿ@š»>\š¦CØZàzˆÇ‘'ÄÅ«ÐYûT€!å’•BVš±Òœ•4&¢H ¶@¢ÛõfA/7kŠuæM‰Ð–WU¾³¢uDŠÎúvAê(¿îïï‹@È'õ×äÛŸºT®!/úWÐÕÓ.@e?øƒp¹‚#Šp7õ7—kÄÜ…}cbw¤ØôWs[nDJ§ÎbAŠ×§µÖjíùéæ":INCR p
    @p="¯qc†Ý¢&s†Åhé½³Z‘b×Y\ÎH¹·Áß}òýÑÃ߃X#„ÐÐÈŒæDQcïšr8qø‘¿áœ kÓÂpÍл×Ö὿”;tÍE0ã@pE°ž²BÄ{ï±Þæ½÷Iï¹Þ—äû+á1E°@•!íý@õþJ(£â~D±¡\òL…0¥…ÕšQbÒ¸G(æ”ú2T®Cç@MÁ¯4§^8ˆ5#ϧFÝd®¢‰6IÑò=RlÄð[~㏋1:FÉ lÂæ6cÀšœ‘á&ð70ƒDŸ@C9XÃu3Ó":INCR p
    @p="ÓÓ‡ÀeùIh19Œú@õL<Ž€Ô@ÞAGàÌaø.mÇeè¦DÚŒ”+àwü.Çï2œžÐØ@{¼±Ç@»Ñ\@³˜4€&àh±9CÒÞH6@£¶á˜6úV ̓ØÖ-kàw}¿÷WPGaþáÊ@ã…@@úÑ6Í›#´8|¼}B1qCØ“ZÖûW%zôO@]@}TÖz~£Y8â=>/_ˆ0?½|ñ7Ði`T«ZÁË@¾Ãå™Ëg.Ÿâ%—K½Úø¸ÜñR!ÇFÕ`%^÷T¸”/†ù4ey":INCR p
    @p="Ï‹ÞЉô¥º'Æe†ž.—wÕ8î]%³Ç¹—J]G&Ò!ƒ2êÔ´ÐMâP@áÕx³I›@M,Ä‚´4Ù©˜Uª2ò‚”dÈ}â–RE®Ó•¸ü¿[\þ’‰>jb‰X›ŽudTMFÈ7Ê5¹„˜,SÃ`ŒëKÚº‡#¤ë*JúKF~Á@Ϭ@bäÐ\E'@ø2ÿ’@HÉd=æ%ËÌÀ0r4ÓräSWÑÒvÉ|°D¨óº@%Y–uSÛqäÔªi>j\ÈéÉc‹˜ô=‰é¶nP°EÂHseÖèQU +":INCR p
    @p="û.Š@%½ú@*Йá˜9“¶ì’âÎ@z¨R—”áUãã%“™¸ÑHI7õ-±÷Í Ë”“%•žU4¥»Lp\ E¥AwsF*ï9-šQ%9ð`QíñL*Ú”wöEŒx@6á2µ`Š3èÃ+GšrIrdJ…ØÌ’»Tâ̝;F=ƒ?c®æpµ5(”ª²8sK&à=–£Û@–`¦gÙ}ç¼è…¹’ïÈeÆÌ+N@Y@Ìç(Ã#y=ˆÍ!öHQ2›†s¢4e”™˜êvhÇÈÖr@\Éù×ïÊ¢,©â¡gR'„d¨¤ÔDE4—JZÞ<Î":INCR p
    @p="+¬µ ²ü¢µj±¥¢Ä㵪þÐL@w·>á7«Ò¹R—ƾ`^º¬¤’@2Œ[p{f#Ý÷ÝÛéz!Øw{O.…8å‘<ù=ÜùnËǧ9é|k.[“%YÞçòzø«ËòžÉç?Y.Y>sùÌå3—Ï\>±Ë3—v.åC‰äùâýòî|ÉÍõxš²¼?—<ºÕ•:߅ɇJøøqŒGRƒòÀì{pù'M¼!~Ú`$¸LÞ!@Š·Øã)v<¸3ÈqzÜJ7îV‚C@LÑš”Uy¯ÍÔßUÅÉŸðSP4ºíÌ9/ZÐÅšJâ^u":INCR p
    @p="ÆÒH8Uvþ Œò²b»Õ$®(ž!ø1“!»Ò@%¾¬«J‰¼=«u¼Lõ.§`idzTSâ ‘*PèDÕДç¡ÊR½–RƒàlðIÄ‘–ÞUO¨3‰Ú™ò±V%΢9Òr]@@ñQá‘È©nT•vȱá4M¾¨–¢%£`¿d.E_“«b':Ý`Œb»rÜAêd«8«jŸØQe7«;‹Ý”ŽpˆdwÓ@!C¼ÕβÏMiØ^B#«¡¥ÔP<Ù¬¨@d…c»)C»Ÿ@*Tb>’ÕP©&Ò”˜2b„&–0W)uq·R…JIjx¸":INCR p
    @p="4)s=ßGúõÆvé'ÖY@ÜUOtfÆOƒ1k²œCLŸÌ1ž1•W’yäÙW†žRÁ#X¹ù²@óQ¶1î0%Ü÷@éAÈH«ÐXiWe¤J‚!ð‰ù^ÓBVº@×…±ûœÌJfía´°ûòE¶‰Ø[•8ªÇñå}”P•…„żCFlqƒHD8wÓDEÀ·=hƒ¨ˆ½QÎï–ù¥L‹@îŽ,xžè’¡’ÐÆ·pLŠ5iå’«Œm%–ªÏìÊT®‹Uëdå„@^-SëÝqµŒ@t†7@e!žEyúãCï“Èžÿ>—@é4Oìòp™zØK":INCR p
    @p="‘ô¦È—»CŠÙ=Òü’¢¬¥+!)kßEyäyúßNÝB–•@çM™/·{²e-“Ë¢wUG*5lçü®\~“àaÊöl·4þЙ~EGP*˜x.ÿšÎò™Ëg.Ÿèå™Ëg.ŸâåÏÅeò=@Û@ógo*;%2d½@£ðž˜·ïöސo¡ñ]ôPUêáN@Wb́¸×cmOÝz*i.懶5~'=l“e|¾Âv\ØË2Ø›4È£Aü‚êŽP‚„!‡KùÒ‹Éw'M²mx†XÓ`»¨ìl©Å]ü),þú3½2ÚñL@‰íÕ%žï":INCR p
    @p="Vhf‚d…y<‰3GÙ!)ŸBÏxJ@/EâvüXDÜ‘ÌÚ‡öyÝN;ϼo•ù:˜¬Ë$á)gaϵ–y«X2ÏI×dšr;¾·®‚àÛÿ¼]@ƒKÚÄGl/1áOêr½TÙI¡™¹ý®RC5‘.‘*¥sJ„Môr‚EþÌYòýrê@Bõ\?3¦FB²D“:H¼@9&³DÐWGBâ³ë@9@æÇµÉ-+®‰,%dîý@v½m'+¹¨@ÌêŽj8J$y©”Q7·+C»‹@W,¾{$‰WTƒœPO8ƒ,el3ñUz–dĦ":INCR p
    @p="¢«uá'ÿŒ®@IpÕ>¼ø±q™Ì%ñERº¨@!eƒåòm5ˆ@çô’’nR¡=!ŸŠbL$'‚€…/T8ì-œ0ë2üâ.¬ÊfÌëááCæäc,©eÊ@HNrI@$†cz9µ@2^'§h0±U@REJìD5Á2¢[=iº‰÷Ëp¤é7“Q&Ñ‘Þ02T°eVÒ§È,ÁQÖÒÁvæÜ°UõÌY!KUÁò.¯VS4Û[7©wx»ÈÖ%W*ZJkƒ½È‡èåT@Š>dJ‰¬SyØ'²ú¾›·5Eœ’":INCR p
    @p=".ÒRl9ï§)¢…JBYú®˜Eu¡åiaûÚA¨ãY »¯„w)æãí9½†ž%·,=¨^àPË´=s\WòF}Înþ%¹hæÓ¶´t®ŠšÐÙ“@8˯‘LŠ`+ç2¹áéÂYøŽ‘Ðá~à@x›%ýe@AÅkqT罺B=[ŸÑ:Ú*Qõ‘òSßâyæò™Ë§{yæò™Ë§xyæò™Ë§xyæò™Ë§xyæòáR¹O@Xg&ÛÅÏ{ëñÃͰT~–äÃiAâÒÌW…ðô”¼KRä’‘²ÛK@”o¤þÞÃ¥ïT×+êÄé-jÈÒ€z¯M~o":INCR p
    @p="Ûc[Îâ;ª·¿ô~o7~4»Éb«¨Wâï‰GÌÍ-ˆ¶lÚt~™C'O@Ï&ê’V% r#¿Ò#nžJB1ø¨ÈßO@ÅÜW&)£'Ž@dá«ö+φð*Þ@ÂëòÿÀVA;ÿä£^Isn&6óUçrRJ¤€-dØ©¨†kÒ±Lꐷˆ@¤ómá1Ü„.L’#%%;¥x¯ÜC9ñ€ßu.vÅ,˜ù`¡*AˆËðhù˧N¢ü+RGȹÂö¿#@?ã¯:ÐâïÀ©7²€ð%´M(Þ@Ÿíq”J`¯†@ûîe-!t6oMÄReä":INCR p
    @p="Ó¥_¢øLt‚ÊžÆl¤ž{Žsô‡“ºÊÝ(p)þBBáѯ|Eðï[“8¶$@íô¤OEÝ8wìkiºÕ”ü¥ÌáXˆ§9e{Îbò´(#%·ä%'òÿí]Ë²Û Ýß™ûý€,øÕu3ÝännÿÿW:y€„’ŒcÇm½ag’È:G(¢„cTcD€+õƒ.(òÓ¸¢waÎ笗›ù¯=‹îRNˆOÓº<éWޏ{}Š©þ/b|Œ%–ù\z—+@CM˜}lÛë@¨‰ê”Æiàº2÷-qî7©>í":INCR p
    @p="ëُL+—¥bÒtÀHìÊçö@yŠ0çò1Ò?±›·†ÅÇGÃâ0”nTI„åòˆ©€Ô®©VO&›‰+yÔ@#•Å@+ìÐw»¸Î@«ÉLd2@ŸöÜN@…â)š&£ûùËõ˜îü8¤cïµD”ÞŠÃi9ê2E¼âãoPÒB9¡a¹©Y|<âlJœÝà38ÕKï¢yé@@9ãp·çÈûÑår)E4ƽH¹«f)ʹ¥Ó¬ËCÊ×sHyHyHùHÙBcô*]ÂâÑŸf×7nœ¤é쮇z8®@yÕ¸¸·j¥â¥ãRF":INCR p
    @p="ƒ¹ÐÀZÅ^knä‡gá°†õ<‡mmÜGÞm(S¡É@Ž«óÐH÷à@t‘p=n9½Ò“E¢üœ²;çÏæLòž-ZÌU‡N=t~ìñ3ˆÅ@x²xô†!@Æ4gHÊQ¤Jdon¨K*qù³ëˆ}ŠÕteVá|Ê.‰§È@p¹ˆ¶àØ»ÚÛYDÞ«_ñÔЁŒÖßo‚!1<bEœáQèÕG¹ë¼V@Vîþ®Ú8±œ¡xƱÔxæV¼ø-É¢(ŽÎUr÷Â@î1©¹0Ѩ?/)±§…6^ý90LÐó¹…O½¬":INCR p
    @p="øôl†I âªdÛÐ3@@“¢ŒÄ%Î@¢”Òãâ#.~$@¹;uÿPhgJãlŠjï GÆûò‰úz_ÓB(¡ðˆ,Ÿ!É9Òø3Ä-EtJÖ7ÇÇ\!`èB“›€7ˆ¾zù‚›‰h^©aGÈzçp*ÓÊÀipáfñkª֝¡L*C£hdï,ÃÀKËIDhHuÆïÓW@´•í2…áΓ%TË8÷Št,¤Ny{öÏ*gÆÅ*¢å€uyHu–ðlW“–@$\6¤O…=Ã@…Áj&ŠJ»Ž@++XH":INCR p
    @p="`aA|,tØ·-*è²Ö#æ¦!ná¨ì0½S;>2@!wGm·T8ç@HåˆjW~½ßUKÞ·Ðv>-{Š-ŽT|ƒ&·–qysHyH¹ÇæòrÍ_,åûۏË÷/?_¾}þú¸¼¿ýPK@@@@ÂD’7Z³zb@@#Ø@@@@@@@@@@@ @€@@@@htmlCoder.basPK@@@@@@;@@@@@@@"
    p = STRPTR(changeStr)
    @p="111111114111374955217553841375418775785984855188872734997232965225835373992249155135994335925481122172939533652337389574452513195439762837266586975582422587847363688236386555877475528617934662525256775825583634965234862499564882514356829775":INCR p
    @p="84135177173424111111111411111111111111111111111111"
    
        translateStr = CHR$(0,9,10,13,26,34,64,160,173) 'Except for "@"(64), these are all special chars on PowerBASIC web site.
    
       !mov esi, joinOrigStr      ;now replace non-printable chars in origString with orig char from changeStr
       !mov ecx, origLen          ;to cut string to correct len
       !mov edi, changeStr
       !mov [esi-4], ecx          ;now actually cut orig str to length
       !xor eax, eax
       !mov ebx, [esi-4]          ;len origString
       !mov edx, translateStr     ;original bytes replaced with "@" corresponding to 1 thru 9 in changeStr
      dpr02:
       !cmp byte ptr[esi+eax], 64 ;is byte an "@" char?
       !je short dpr01            ;yes? then replace it with orig char
       !add eax, 1
       !cmp eax, ebx              ;are we at end of string?
       !jb short dpr02            ;no
       !jmp dpr03                 ;yes
      dpr01:
       !movzx ecx, byte ptr[edi]  ;char 1 thru 9
       !sub ecx, &h31             ;turn 1 thru 9 into valid index
       !movzx ecx, byte ptr[edx+ecx] ;cl now holds original char that was replaced by printable "@"
       !mov [esi+eax], cl         ;restore it
       !add eax, 1
       !add edi, 1                ;next repl. byte
       !jmp short dpr02
      dpr03:
    
      OPEN filename FOR BINARY AS #1
      IF ERR <> 0 THEN ? filename & " had a problem!",64,"Embed Dit Error": EXIT FUNCTION
      IF LOF(1) > 0 THEN ? filename & " exists already!",64,"Embed Dit Error": EXIT FUNCTION
      PUT #1, , joinOrigStr
      CLOSE
      ? filename & " restored successfully",,"Embed Dit"
    END FUNCTION'

    Comment


      #3
      Problem tackled, not solved yet.

      Can you download the below?
      No. It appears that I cannot paste it into PBEdit due to the line length. The maximum is 256 chars per line.

      This is what happens:
      1. Cannot copy & paste it into PBEdit
      2. Can copy & paste it to Notepad and then save it as a BAS-file.
      3. But... Cannot open the Notepad-saved BAS-file in PBEdit from the file-menu
      4. Can open it however by double-clicking the file in an Explorer view, but it appears completely messed up then

      We had the same problem in the old forums. Does anybody remember how it was solved there?
      Last edited by Egbert Zijlema; 18 Dec 2007, 08:51 AM.

      Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
      http://zijlema.basicguru.eu
      *** Opinions expressed here are not necessarily untrue ***

      Comment


        #4
        No problem in edit mode

        I tried it again, but now in one of my own messages using Edit-mode. No problem! Now I remember: providing overall Edit-mode was the way PB solved the same problem a couple of years ago in the old forums.

        Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
        http://zijlema.basicguru.eu
        *** Opinions expressed here are not necessarily untrue ***

        Comment


          #5
          Edbert,
          If you are using Firefox this post by David Roberts might help..


          Using IE, I have found that copying code from the old forum (eg found by following URL links from old posts) cannot be handled in the old way (copying in 'Edit' view is no longer available).
          What what does work then, is to copy & paste first to Wordpad (rather than Notepad) and then select and copy again prior to pasting into the editor.
          This method preserves the 'proper' line breaks that are lost if copying directly from the browser.
          Rgds, Dave

          Comment


            #6
            Wordpad does not help

            Well, I'm very sorry Dave, but pasting it into Wordpad does not help. The first time the entire file was only one line! In the meantime I've tried all different Wordpad settings, but nothing gives desirable results.

            Apart from that, it should not be necessary to use a second editor before you can paste it to the IDE. I wonder why PB does not restore the possibility to use edit mode (without writing rights of course). If this is not possible, for whatever reason, they should either return to the old Forum software or provide a better IDE for their customers, with an editor that is capable to handle longer lines.

            It is approx. 7 hours since this thread started, but up to now I didn't see any message from PB's staff. Hey PB guys: a sullenmooded customer needs your help!
            Last edited by Egbert Zijlema; 18 Dec 2007, 02:27 PM.

            Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
            http://zijlema.basicguru.eu
            *** Opinions expressed here are not necessarily untrue ***

            Comment


              #7
              > hours since this thread started, but up to now I didn't see any message from PB's staff

              Somewhere on this board it says that the Peer Support Forums are not an official venue for customer support.

              You need to contact PB support directly with any issues.

              I'm not even sure this is a PB issue, since the IDE already told you it won't take more than 256 characters per line, and trying to paste unprintables into any text editor is more often than not a losing venture.

              FWIW IMO any unprintable characters posted along with source code should have been posted with either a "binbas" program source (all printables), using$ CHR$(x, y, z...) syntax for unprintables, using "DB " ASM statments (eg the code in question) or with a link to a genuine file.
              Michael Mattias
              Tal Systems (retired)
              Port Washington WI USA
              [email protected]
              http://www.talsystems.com

              Comment


                #8
                Unprintable characters?

                Hello Michael, does the code in question contain unprintable characters? I did not see them, but perhaps I did not look too well.

                But apart from that, I've tried more messages today, just to be sure. I cannot, for instance, paste my own source code (I mean the US-holiday stuff) into PBEdit too (unless I switch to edit mode, which is possible in that case because it is my own message). So, as far as I can see the 256+ character issue is the real problem here.

                In my opinion this is what matters. I bought PBWin, including an Integral Development Environment, but since PB has installed new forum software I can no longer download code samples, offered here by this programmer's community, into that IDE. You are right, this is a peer-to-peer forum, not an official PB-site; but the software for this forum is PB's responsibility. That's why I kindly asked them to offer a solution for this problem, like they did a few years ago when there were the same complaints regarding the old forum software.

                Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
                http://zijlema.basicguru.eu
                *** Opinions expressed here are not necessarily untrue ***

                Comment


                  #9
                  Originally posted by Egbert Zijlema View Post
                  Apart from that, it should not be necessary to use a second editor before you can paste it to the IDE. I wonder why PB does not restore the possibility to use edit mode (without writing rights of course).
                  You can probably use the Quote button to achive the same goal.

                  On a more general note, I think that probably using the forum to post source code as a message works OK for small snippets / samples brief tools. For a "code repository" thing, like the source code forum has become in years, a more specific web tool/service, would probably works better, IMHO.

                  Bye!
                  Last edited by Marco Pontello; 18 Dec 2007, 04:21 PM.
                  -- The universe tends toward maximum irony. Don't push it.

                  File Extension Seeker - Metasearch engine for file extensions / file types
                  Online TrID file identifier | TrIDLib - Identify thousands of file formats

                  Comment


                    #10
                    Grazie Marco

                    Originally posted by Marco Pontello
                    You can probably use the Quote button to achive the same goal.
                    Hey man, you're great!!!! Thank you. Using the Quote button, that's the solution. Why didn't you tell me that yesterday?

                    Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
                    http://zijlema.basicguru.eu
                    *** Opinions expressed here are not necessarily untrue ***

                    Comment


                      #11
                      or for that extreme, you can always do a quick app to look for non printable characters.

                      "Aka, copy paste to notepad"
                      Do a quick app to open the file
                      Check each character, and messagebox you when one is found

                      From there you can track down where or why.

                      Or even better yet, instead of messagebox, save to another file, and replace any non-printable character, with one that is printable but not in the typical ascii set...then you can see EXACTLY where the file is wrong
                      Engineer's Motto: If it aint broke take it apart and fix it

                      "If at 1st you don't succeed... call it version 1.0"

                      "Half of Programming is coding"....."The other 90% is DEBUGGING"

                      "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                      Comment


                        #12
                        Hi Egbert;

                        Another way to copy a paste from the forum:
                        1. Select and copy the code.
                        2. Paste it into WordPad not NotePad

                        WordPad properly recognizes line ends and inserts CRLF.

                        Comment


                          #13
                          Here's something I made a few days ago that might help: http://www.powerbasic.com/support/pb...ad.php?t=35818
                          Adam Drake
                          PowerBASIC

                          Comment


                            #14
                            Works using IE6 and IE7.
                            Added the following to my signature so others pick it up.
                            Thank you for the tip!
                            Last edited by Mike Doty; 20 Dec 2007, 04:10 PM.

                            Comment


                              #15
                              Well, while we're here, how does the "multi-quote" function work? I haven't been able to find any docs on it.

                              Comment


                                #16
                                Hit the 'quote marks' button on each thread you want to quote, then hit 'Post Reply' at the top of the thread.
                                Adam Drake
                                PowerBASIC

                                Comment


                                  #17
                                  Originally posted by Adam J. Drake View Post
                                  Hit the 'quote marks' button on each thread you want to quote, then hit 'Post Reply' at the top of the thread.
                                  IC now. Thank ya.

                                  Originally posted by Egbert Zijlema View Post
                                  helps you create special characters in HTLM (the writer claims)
                                  And it looks like a valid claim to me.

                                  Comment


                                    #18
                                    Thank you, good code!

                                    To Cliff Nichols: Non-printable characters were not involved.
                                    To Walter Thompson: I did try Wordpad. See: "Wordpad does not help". You nee to read a thread more carefully, I'd say

                                    To all: Thanks to Marco Pontello ("use the Quote button") I was finally able to paste the code into PBEdit. It is a perfect app. for those who write their webpages "by hand" (for instance in Notepad, which is still my favorite "html-editor" ).

                                    Thank you very much Alexander Artyukhov. Good work!

                                    Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
                                    http://zijlema.basicguru.eu
                                    *** Opinions expressed here are not necessarily untrue ***

                                    Comment


                                      #19
                                      If you had been using Semens PrePBEd 8 instead of the normal PBEditor you would not have ghad that problem, as it converts everything in the background.

                                      You find the download-links somewhere her:

                                      Comment

                                      Working...
                                      X
                                      😀
                                      🥰
                                      🤢
                                      😎
                                      😡
                                      👍
                                      👎