No announcement yet.

need help... String to character value..

  • Filter
  • Time
  • Show
Clear All
new posts

  • need help... String to character value..

    Hello everyone.. i have a project right now which i include hotkeys which can be edit by the user. but after assigning it i want the app to recover the assigned key to replaced the text of the input or label..

    example in input the current text is "Enter" which has a value of 13.

    so the user changed it to F1 and now the value is 112, so the app save it to ini file tor recover if app is restarted,

    input on e_Key: ---(input1)
    eKey = e_Key

    INIFile.SetValue(_WindowsFolder.."\\My Settings.ini", "Hotkey", "HIDE", eKey);

    on show
    result = INIFile.GetValue(_WindowsFolder.."\\My Settings.ini", "Hotkey", "Hide");
    if result then
    result = string.char(result)
    Input.SetText("Input1", result) --- the value or 112 is F1 so the input text is F1, or if the value is 8 then the text is Backspace


    i believe if else process of all the keys is not a good way.. hoping to have some other solution..