Jump to content

Text in editbox save as a txt file


Recommended Posts

It doesn't work!

It loads the txt file and then there is no text in editbox!

Hi again,

try to read the file first and the send it to the control

Hints :

FileRead

GuiCtrlSetData

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

Can post here a example?

#include <GUIConstants.au3>

GUICreate("My GUI")  ; will create a dialog box that when displayed is centered

GUICtrlCreateCombo ("", 10,10)

GUICtrlSetData(-1,"item1|item2|item3", "item3")

GUISetState ()       ; will display an empty dialog box with a combo control with focus on

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

#include <GUIConstants.au3>

GUICreate("My GUI")  ; will create a dialog box that when displayed is centered

GUICtrlCreateCombo ("", 10,10)

GUICtrlSetData(-1,"item1|item2|item3", "item3")

GUISetState ()       ; will display an empty dialog box with a combo control with focus on

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WendoÝ÷ Ûú®¢×ºÚ"µÍÕRPÝÙ]]H
    ÌÍÑY]ÌK ÌÍÙ[LJ

What's wrong?

It loads a 1 into the edit box!

Link to comment
Share on other sites

#include <GUIConstants.au3>

$sGui = GUICreate("FileWrite Text", 634, 450, -1, -1)
$Edit = GUICtrlCreateEdit("", 0, 0, 633, 401, BitOR($ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL))
GUICtrlSetData(-1, "TYPE IN HERE THEN PRESS SAVE. I WILL SAVE TO C:\test.txt!")
$Save = GUICtrlCreateButton("Save", 208, 408, 177, 41, 0)
$Open = GUICtrlCreateButton("Open", 25, 408, 177, 41, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Save
            $FileSave = FileSaveDialog("Save me!", "C:\", "Text files (*.ini;*.txt)", 2)
            $Txt = GuiCtrlRead($Edit)
            FileWrite($FileSave, $Txt)
        Case $Open
            $FileOpen = FileOpenDialog("Open", "C:\", "Text Files (*.ini;*.txt)")
            GUICtrlSetData($Edit, $FileOpen)
    EndSwitch
WEnd

Link to comment
Share on other sites

GUICtrlSetData ($Edit_1, $file0,1)

What's wrong?

It loads a 1 into the edit box!

Try to find in the script $edit_1 and $file

Just a hint... try to modify some help examples... i think you have to learn more about AutoIT!

Cheers m8

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

Thats just going a long way.

True :S

I'm almost writing the code...

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

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...