FrancescoDiMuro Posted December 5, 2016 Author Share Posted December 5, 2016 Maybe OT, but when I compile, this occurs: Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
TheDcoder Posted December 5, 2016 Share Posted December 5, 2016 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 More sharing options...
FrancescoDiMuro Posted December 5, 2016 Author Share Posted December 5, 2016 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: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
TheDcoder Posted December 5, 2016 Share Posted December 5, 2016 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 More sharing options...
FrancescoDiMuro Posted December 5, 2016 Author Share Posted December 5, 2016 Yes, and I just noticed that opening the file with Notepad ++ or something else ( I think ), the character à does appear, instead of A with strange accent in the Excel interface. Why? How can i fix it? :/ Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
TheDcoder Posted December 5, 2016 Share Posted December 5, 2016 Ah! Exactly as I predicted . 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 More sharing options...
FrancescoDiMuro Posted December 5, 2016 Author Share Posted December 5, 2016 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: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
TheDcoder Posted December 5, 2016 Share Posted December 5, 2016 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 More sharing options...
FrancescoDiMuro Posted December 5, 2016 Author Share Posted December 5, 2016 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 Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
TheDcoder Posted December 5, 2016 Share Posted December 5, 2016 My pleasure, I wish the same to you 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 More sharing options...
j0kky Posted December 5, 2016 Share Posted December 5, 2016 @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 Spoiler Some UDFs I created: Winsock UDF STUN UDF WinApi_GetAdaptersAddresses _WinApi_GetLogicalProcessorInformation Bitwise with 64 bit integers An useful collection of zipping file UDFs Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted December 5, 2016 Author Share Posted December 5, 2016 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: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
j0kky Posted December 5, 2016 Share Posted December 5, 2016 (edited) 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 December 5, 2016 by j0kky Spoiler Some UDFs I created: Winsock UDF STUN UDF WinApi_GetAdaptersAddresses _WinApi_GetLogicalProcessorInformation Bitwise with 64 bit integers An useful collection of zipping file UDFs Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted December 5, 2016 Author Share Posted December 5, 2016 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: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
j0kky Posted December 5, 2016 Share Posted December 5, 2016 (edited) 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 December 5, 2016 by j0kky Spoiler Some UDFs I created: Winsock UDF STUN UDF WinApi_GetAdaptersAddresses _WinApi_GetLogicalProcessorInformation Bitwise with 64 bit integers An useful collection of zipping file UDFs Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now