Announcement

Collapse
No announcement yet.

Is there anything on that text file?

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

  • Is there anything on that text file?

    Again, sorry for the newbie question. Looked everywhere can't find it.
    I want to know if a text file has anything on it, if so, a button will appear. If not, the button will stay hidden.

    Thanks for your help.

  • #2
    Trying this with no luck:

    contents = TextFile.ReadToString("AutoPlay\\Docs\\facebook.tx t");

    error = Application.GetLastError();

    if (error ~= 0) then
    Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
    else
    Button.SetVisible("facebook", true);

    error = Application.GetLastError();

    if (error ~= 0) then
    Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
    end
    end

    Comment


    • #3
      Text.apz

      Comment


      • #4
        Thank you Herrin. can you give me a quick synopsis of this line?

        local result = Text:match("%w");

        Comment


        • #5
          Google is your friend

          Comment


          • #6
            thank you!

            Comment

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