Sign in to follow this  
Followers 0
deepakameta

AutoIt_GUI

3 posts in this topic

I'm new user of Auto it.I'm able to read data from .CSV file, But I want to import data in GUI from .csv.How can I do this.

file open.au3

Share this post


Link to post
Share on other sites



Hi, welcome to the Autoit forums. Lets breakdown your question.

Part 1:

But I want to import data

Importing data is quite easy in fact with FileReadLine() you did just that (by importing one line of csv data into the variable "$lineVariableName").

Part 2:

in GUI

With respect to creating a GUI, you can use Koda Form Designer from the tools menu of SciTe, also check the help file for GUICreate()

More Information:

If your intention was to read, interpret and display the csv data from your file intuitively then here are some (broad, largely general and incomplete) guidelines on how I would approach such.

1.Analyze data

Determine its general nature, reliability, quantity, specificity and uniformity.

2.Choose structures/variables/functions most suitable to read and or (temporarily/permanently) store your data.

3.Design an interface to present the data in your desired and or a meaningful GUI

4.Try to implement this GUI

Closing remarks

We at the forum will be glad to help with any problems you encounter at any of these phases, just remember when something seems tough: research, research harder, try something, think hard, and if its still tough, post your successes and or failures and we will be eager to help.

Share this post


Link to post
Share on other sites

I'm new user of Auto it.I'm able to read data from .CSV file, But I want to import data in GUI from .csv.How can I do this.

Welcolme to the forum ! Posted Image

Try this :

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>

Global $_Edit1, $_Button1, $msg

GUICreate ( "" )  
$_Edit1 = GUICtrlCreateEdit ( "" & @CRLF, 20, 20, 360, 150, $ES_AUTOVSCROLL + $WS_VSCROLL )
$_Button1 = GUICtrlCreateButton ( "Import data in GUI from .csv", 20, 200, 360, 25 )
GUISetState ( )

While 1
    $msg = GUIGetMsg()  
    Switch $msg
        Case $GUI_EVENT_CLOSE 
            ExitLoop    
        Case $_Button1  
            _ImportDataFromFile ( )
    EndSwitch
WEnd

Exit

Func _ImportDataFromFile ( )
    Local $_FileContent = FileRead ( "C:\Documents and Settings\43633201\Desktop\test.csv" )
    If Not @error Then GUICtrlSetData ( $_Edit1, $_FileContent )
EndFunc

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
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
Sign in to follow this  
Followers 0