Jump to content

Text file inside GUI editbox?


Recommended Posts

Heres what i am trying to get. Is it possible to display the file in variable $input_whatev (say that variable is whatev.txt) is it possible to display whatev.txt in a GUI edit box? The edit box's variable being $edit_1?

Link to comment
Share on other sites

whose uses variables for such a thing :D

GUICtrlSetData($Edit_1,Fileread(FileOpenDialog("Select a file to open",@UserProfileDir, "All Files (*.*)")))

just letting people know you can pop functions inside functions , itll execute the inside ones first . Its ok they dont bite or like crush each other or like idk what

Link to comment
Share on other sites

Trust me, I agree with you there and I'm not arguing with you. :D

I write complex 1-line batch files all the time.

It looks like codemyster is working on his editor program, so he might want to re-use that info. (for example, to see if the user is re-opening the same file)

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Link to comment
Share on other sites

Skrunge (and thatsgreat): thats what i was trying to do at first but i wasn't sure on the fileopendialog stuff.

EDIT:

ok, i tried to do the same thing with my save part, but i'm getting an error:

FileWrite(GUICtrlRead($Edit_1, Fileread(FilesaveDialog("Select a file to save",@ScriptDir, "All Files (*.*)")))
Edited by codemyster
Link to comment
Share on other sites

heheh cuz you got it completely mixed up, filesavedialog should go first since it returns the file handle and thats what the first paramater in filewrite is, then should come the Guictrlread and , and you dont need the Fileread

FileWrite(FilesaveDialog("Select a file to save",@ScriptDir, "All Files (*.*)"),GUICtrlRead($Edit_1))
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...