goldenix Posted November 28, 2008 Share Posted November 28, 2008 (edited) Make new folder C:\Documents and Settings\user\Desktop\New Folder & run this code from there. Full pre made sample in the Attachment C:\Documents and Settings\user\Desktop\config.ini will be created & filled with the data.I tried & it works.Now I paste this same code into the beginning of my other script located in:F:\MeieFailid\user\Backups\Klikkers\samples\E-Mail\Universal Mail Checker\Executables\F:\MeieFailid\user\Backups\Klikkers\samples\E-Mail\Universal Mail Checker\config.ini already exists there & the additional info should be added via iniwrite now. but it is not happening. nothing is written into iniI tried to rename that old ini file & in this case new ini is created. Old ini is not read only.just run the sample in the attachment, see it dos not work for some reason.$mail = 'mail' ;~ Get config.ini Dir is 1 dir above scriptdir ;~ ---------------------------------- $Config = StringSplit(@ScriptDir,'\') $Config = StringReplace(@ScriptDir,$Config[$Config[0]],'') ;cut last split $Config = $Config & 'config.ini' ;~ ---------------------------------- IniWrite($Config, $mail, "Newmail", '1') ; write to file how many new mails you have IniWrite($Config, $mail, "Last_Check_Time", @MDAY & '/' & @MON & '/' & @YEAR & @CRLF) ConsoleWrite($Config & @CRLF) Exitytyy.rar Edited November 28, 2008 by goldenix My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
martin Posted November 28, 2008 Share Posted November 28, 2008 Make new folder C:\Documents and Settings\user\Desktop\New Folder & run this code from there. Full pre made sample in the Attachment C:\Documents and Settings\user\Desktop\config.ini will be created & filled with the data. I tried & it works. Now I paste this same code into the beginning of my other script located in: F:\MeieFailid\user\Backups\Klikkers\samples\E-Mail\Universal Mail Checker\Executables\ F:\MeieFailid\user\Backups\Klikkers\samples\E-Mail\Universal Mail Checker\config.ini already exists there & the additional info should be added via iniwrite now. but it is not happening. nothing is written into ini I tried to rename that old ini file & in this case new ini is created. Old ini is not read only. just run the sample in the attachment, see it dos not work for some reason. $mail = 'mail' ;~ Get config.ini Dir is 1 dir above scriptdir ;~ ---------------------------------- $Config = StringSplit(@ScriptDir,'\') $Config = StringReplace(@ScriptDir,$Config[$Config[0]],'') ;cut last split $Config = $Config & 'config.ini' ;~ ---------------------------------- IniWrite($Config, $mail, "Newmail", '1') ; write to file how many new mails you have IniWrite($Config, $mail, "Last_Check_Time", @MDAY & '/' & @MON & '/' & @YEAR & @CRLF) ConsoleWrite($Config & @CRLF) ExitI don't see anything wrong so you need to add something to check that $config exists, and see what the return from IniWrite is. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
goldenix Posted November 28, 2008 Author Share Posted November 28, 2008 I don't see anything wrong so you need to add something to check that $config exists, and see what the return from IniWrite is.I added this at the end of the script: & it says the config is there, yet its not being updated. really weird. If FileExists($Config) Then ConsoleWrite('Bingo' & @CRLF) This what it returns: C:\Documents and Settings\user\Desktop\ytyy\ytyy\config.ini Bingo My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 28, 2008 Moderators Share Posted November 28, 2008 LOL ... Why are you using @CRLF in the write string? Did you scroll down further? All your @CRLF's (Carriage Return + LineFeeds) are being added ... the rest of the data is there. Item_status=Enabled Newmail=kkk [section] Newmail=1 Last_Check_Time=28/11/2008 [mail] Newmail=1 Last_Check_Time=28/11/2008 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
goldenix Posted November 28, 2008 Author Share Posted November 28, 2008 LOL ... Why are you using @CRLF in the write string? Did you scroll down further? All your @CRLF's (Carriage Return + LineFeeds) are being added ... the rest of the data is there.W00t indeed. problem solved.2 heads are always better than 1 head hehe. My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] 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