learn PB and trying to make useful utility. This should work on this way:
- enter starting hex numbers (4 chars) in String gadgets for starting point
- enter hex number in step gadget (2 chars)
- enter ending hex numbers (4 chars) for ending
Depending on step, it should print all generated values in binay file.
But (of course) I have problems:
- how to limit string gadget to accept only numbers from 0-9 and A-F ?
- how to convert that string in hex value (to be able to make calculations)?
For now I have this code:
Code: Select all
IncludeFile "test.pbf"
OpenWindow_0()
SetGadgetAttribute(String_0, #PB_String_MaximumLength, 4)
SetGadgetAttribute(String_1, #PB_String_MaximumLength, 4)
SetGadgetAttribute(String_2, #PB_String_MaximumLength, 4)
SetGadgetAttribute(String_3, #PB_String_MaximumLength, 4)
SetGadgetAttribute(String_4, #PB_String_MaximumLength, 2)
Procedure button_clicked(eventType)
MessageRequester("Button Clicked:", "It should print in file....but not now")
EndProcedure
While Window_0_Events(WaitWindowEvent()): Wend
Form looks like this (it is easier to understand what I`m trying to do):
