'= , = , = ; = , =, = , = ,= , = 'InputLn provides ' insert-mode(with colour change) ' Clr ' Del ' Home ' Ende ' Left ' Right ' Bin(&B), Oct(&O), Dec(&D), Hex(&H)-mode, switches allowed for non-$/P ' in Dec-Mode ^, e.g. &D2^31 ' Esc to cancel input, returning Chr(27) ' Enter, Tab (returning a number string) ' switches to change input modes ' INS-support(still a bit buggy, sry..) ' no clipboard.. ' no marking.. ' no libs needed.. ' Tested with FB 0.17f using FBIde 0.4.6 ' V2.0 provides the ability to edit strings.. #include "inputln.bi" Const Red=12 Declare Function MenuChar(byVal s As String, byVal Which As Integer=1) As String Dim As String s, m, EditLine, Esc=!"\27" Do Cls Print "InputLn.Bas V2.0 2007 by ytwinky, MD" Print "V2.0 provides the ability to edit strings(for INS-mode c sourcecode ^^) :D" If s<>"" And Instr("BOHD", m) Then s="Val(" &s &")=" &Str(Val(s)) Print "<" &s &!">\nInput of a" Print MenuChar("String") Print Menuchar("Bin") Print MenuChar("Dec") Print MenuChar("Hex") Print MenuChar("Oct") Print MenuChar("Password") Print MenuChar("Line to edit") Print "Enter your choice:"; Do m=UCase(Input(1)) Loop Until Instr("BDHLOPS" &Esc, m) If m<>Esc Then Print m Select Case m Case "B" s=InputLn("Bin:", m) Case "D" s=InputLn("Dec:", m) Case "H" s=InputLn("Hex:", m) Case "L" Line Input"Enter the line to be edited afterwards:", EditLine 'Wow, support ',' s=InputLn("Now edit it:",,,,,, EditLine) Case "O" s=InputLn("Oct:", m) Case "P" s=InputLn("Password:", "$", 1=0, "*") Case Else s=InputLn("String:") End Select End If Loop Until m=Esc End Function MenuChar(byVal s As String, byVal Which As Integer=1) As String Var FG=LoWord(Color) If Which>1 Then Print Left(s, Which-1); Color Red Print Chr(s[Which-1]); Color FG Return Mid(s, Which+1) End Function