tampavilla.blogg.se

Purebasic peek
Purebasic peek











purebasic peek

Somme = Somme + 1 (AND operation) and inverse with XOR (!), them add ‘1’ Somme = (Somme & $FF) ! $FF As PureBasic as signed integer, need to remove higher value Somme=Somme+PeekB(*B+t) Adding each byte from the packet SetGadgetText( #Editor_0, GetGadgetText( #Editor_0)+Commande$)įor t=0 To longueur Loop from 0 to checksum byte -1 Longueur = ReadSerialPortData( #CanalCOM, *Buffer, Resultat) Resultat = AvailableSerialPortInput( #CanalCOM) ******* NOT FINAL PROCEDURE : JUST HELP TO READ BUS AND SEE MESSAGES ******** R$ = r$ + Chr(13)+Chr(10) Add CR+LF characters This procedure transform ASCII string in Hexadecimal string (for human).

purebasic peek

If OpenWindow( #Window_0, 216, 0, 500, 300, “Velbus via VelbusLink”, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )īuttonGadget( #Button_0, 20, 20, 70, 20, “Bouton”, #PB_Button_Toggle) Parser to analyse received Velbus frame is on going Here are new procedures : **SetLed **(could make a PushButton led to blink, etc.) and **SwitchRelay **(put the relay ON or OFF) ProcedureReturn WriteSerialPortData(#CanalCOM, *B, 10) PokeB(*B+9,$04) ETX (End of Transmission) PokeB(*B+4,$00) Push Button Function (H00)ĮndSelect PokeB(*B+8,CheckSum(*B,8) ) Checksum from h0F to Checksum (not included of course) PokeB(*B+2,Amodule) Address module(peek an existing address !) Procedure.i SendButton(*B, Amodule.i, Abutton.i, StatusButton.i) BigInt module.Not the better part but more easy to understand :.TBEM module - thinBasic Event Manager module.thinBasic Direct Input integration by MikeHart Machine Code: script sources and examples.O2 JIT Compiler / Assembler / Oxygen project.TBGL Modelling, 3D, other SW integration.Real world situations and solutions using thinBasic.

PUREBASIC PEEK CODE

  • Sources, Templates, Code Snippets, Tips and Tricks, Do you know.
  • Console: source code examples for beginners.
  • Fixed or cleared errors in help material.
  • Program closes, Parent program closes, and i can't find the way to trap the error and handle. * All Windowed Scripts, that not includes %WS_SYSMENU or equivalent, produces a runtime error * all scripts that uses Console, produces a runtime error Replace MatchString WITH NewString IN Buffer Local dd1 as string, dd2 as string, dd3 as string, MatchString as string, NewString as string ' Buffer is Global String defined, and procesed in another functionįUNCTION ae_TB_SetVar (d1 AS ASCIIZ,d2 AS ASCIIZ,d3 AS ASCIIZ) EXPORT AS BYTE ' d3 = PB Var Type N->Numeric, S->String (input) so easier to read out content just like above. Overlay to dynamic string itself won't work if you just place another dynamic string over but some fixed to same len or shorter - so you would need the len alikeĭim myVar As String * Peek(DWord, myStrPtr -4) At myStrPtr Txt = Memory_Get(myStrPtr, Peek(DWord, myStrPtr - 4)) to have strings local read out from myStrPtr use like I would just put the VarPtr or StrPtr into some added equate or variable where to find the data - if no other idea pass it just via Clipboard or in a file. But - you could probably add an Equate or Variable containing the pointer to a PB-Variable - only thing I fear dynamic strings are not as easy to handle - if the PB-variable is a string tB might read it but changing it will be limited to the initial len - changing/redim variable from PB could also make an equate invalid - one has to poke a new value there. Sorry- I guess I lead you on wrong track here - I thought you would do something like running external propgram- start tB-script from there and this works with your in external program preset variables.













    Purebasic peek