Jump to content

Txt to CSV and some other information...


Recommended Posts

43 minutes ago, FrancescoDiMuro said:

The issue occurs when I convert the file ( with FileMove ) the file I did create.

Does that mean when you rename/move the file to .csv those characters disappear?

 

Regarding your compile error, I suspect that your Anti-Virus is messing something up.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Just now, TheDcoder said:

Does that mean when you rename/move the file to .csv those characters disappear?

 

Regarding your compile error, I suspect that your Anti-Virus is messing something up.

Yeah buddy... When I move the file, those characters ( especially ° and à ) becomes A with strange accents... 
Thanks :) 

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

That is strange... how are you opening the CSV files? Are you using something like Microsoft Excel to open the CSV files?

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Ah! Exactly as I predicted :D.

It's not your script's fault... its MS Excel's fault! It does not have proper Unicode handling! As for the fix, I have no idea since I don't use MS Office Suite :(

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

And please, TheDcoder, can you explain to me a few things or, If you can ( and u don't want to explain to me ), how can I work with event of GUI... Something like...

If a certain field of a "form" is empty, the field is colored, and, when the user does write something in that field, this turns back in it's normal form... Something that works with "lost focus" or, I really don't know... Thanks :) 

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

1 minute ago, FrancescoDiMuro said:

If a certain field of a "form" is empty, the field is colored, and, when the user does write something in that field, this turns back in it's normal form... Something that works with "lost focus" or, I really don't know... Thanks :) 

 
 

Sorry but I do not know anything about GUI events... you can search the forum or ask a question in the AutoIt GUI Help and Support subforum :)

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

12 minutes ago, TheDcoder said:

Sorry but I do not know anything about GUI events... you can search the forum or ask a question in the AutoIt GUI Help and Support subforum :)

Thanks for the help buddy! :) Appreciate it <3
Have a wonderful day :D 

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

@FrancescoDiMuro: my italian friend, the help file has a beautiful guide on event mode GUI, then you can try tons of related snippets on the wiki and on this forum :)

Link to comment
Share on other sites

11 minutes ago, j0kky said:

@FrancescoDiMuro: my italian friend, the help file has a beautiful guide on event mode GUI, then you can try tons of related snippets on the wiki and on this forum :)

Hey! Thanks for your suggestion! :) But, I still can't find what I'm looking for, neither in those snippets and so on... I know that's not the correct forum section, but my "work" is simple, only seems I'm not able to manage the tools I have... Checking the content of the input, if it's blank, set a different bk color and set the focus on the control. Seems so easy, but I don't know how to do it... Especially, the reason why I'm not able to do this, it's because I can't find the "missing ring" about "How can I detect the change of state of a control?"... Something like, I go in that control, and then, I leave it, without writing anything in it... Here goes the code I just described above... Thanks for your help guys :) 

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

for example you could add an

AdLibRegister

function which checks for the field content\focus, when it tries the field has lost its focus and it has no content, the function does something...

But there are lots of solutions, another one is registering with GUIRegisterMsg for WM_COMMAND message to receive EN_KILLFOCUS notification and check with the called function for the content in the field.

Edited by j0kky
Link to comment
Share on other sites

36 minutes ago, j0kky said:

for example you could add an

AdLibRegister

function which checks for the field content\focus, when it tries the field has lost its focus and it has no content, the function does something...

But there are lots of solutions, another one is registering with GUIRegisterMsg for WM_COMMAND message to receive EN_KILLFOCUS notification and check with the called function for the content in the field.

Can you please post a practice example? I was looking at something like that, but about EN_KILLFOCUS or EN_ENABLE or something like that, I didn't find any documentation... Thanks :) 

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

A simple example:

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

Global Const $EN_KILLFOCUS = 0x0200

Global $hGUI = GUICreate("My gui")
Global $hEdit1 = GUICtrlCreateEdit("", 10, 30)
Global $hEdit2 = GUICtrlCreateEdit("Prova a cliccarmi senza scrivere niente nel primo riquadro", 180, 230)
GUIRegisterMsg($WM_COMMAND, "_WM_COMMAND")
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    If $nMsg = $GUI_EVENT_CLOSE Then Exit
WEnd

Func _WM_COMMAND($hwnd, $msg, $wparam, $lparam)
    If _WinAPI_LoWord($wparam) = $hEdit1 _
        And _WinAPI_HiWord($wparam) = $EN_KILLFOCUS _
        And GUICtrlRead($hEdit1) = "" Then ControlFocus($hGUI, "", $hEdit1)
    Return $GUI_RUNDEFMSG
EndFunc

 

Edited by j0kky
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...