Jump to content

[SOLVED] IniWrite fails!


RomanK
 Share

Recommended Posts

Hi,

I have a serious problem. I made a program which writes some values into text files with an ini-File Structure.

It worked for two days as it should, but suddenly (since today I believe) the IniWrite always fails.

It returns 0. And I found out why it doesn't work:

AutoIt makes my textfile read-only and then of course the Iniwrite fails.

(I didn't make it read-only, it happened itself!!!)

I tried putting a FileSetAttribute with -R before the IniWrite function but it didn't change anything.

What's happening here? Any ideas? How can I fix this?

:):)

Roman

Edited by RomanK
[font="Courier New"]http://RomanK.hondadesigns.com[/font]
Link to comment
Share on other sites

  • Moderators

Hi,

I have a serious problem. I made a program which writes some values into text files with an ini-File Structure.

It worked for two days as it should, but suddenly (since today I believe) the IniWrite always fails.

It returns 0. And I found out why it doesn't work:

AutoIt makes my textfile read-only and then of course the Iniwrite fails.

(I didn't make it read-only, it happened itself!!!)

I tried putting a FileSetAttribute with -R before the IniWrite function but it didn't change anything.

What's happening here? Any ideas? How can I fix this?

:):)

Roman

IniWrite works fine.

I'll bite though, what OS are you running on, and if it's vista, are you sure you're not running in one of the write protected directories?

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

IniWrite works fine.

I'll bite though, what OS are you running on, and if it's vista, are you sure you're not running in one of the write protected directories?

It happens on XP 32 and Windows 7 64. Haven't tried on my Vista 32 yet.

It is not a write protected directory, it is:

I:\Coding\FS FloodLight\

...which I created on my own. And no matter whether the file ending is .ini or .anything, it always fails and never writes. :)

[font="Courier New"]http://RomanK.hondadesigns.com[/font]
Link to comment
Share on other sites

  • Moderators

It happens on XP 32 and Windows 7 64. Haven't tried on my Vista 32 yet.

It is not a write protected directory, it is:

I:\Coding\FS FloodLight\

...which I created on my own. And no matter whether the file ending is .ini or .anything, it always fails and never writes. :)

You don't give people much to go on do you.

How are we supposed to test your issue?

Do you have a replication script, and step by step by step on how we are to re-create your situation?

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

.... hihi it's solved!!

@Smoke: Well, you're right, but I didn't know what to do.

....By "mistake" I now found out what is was:

My instant messenger, Trillian, causes this. When I exit it, AutoIt will write into the ini files as always, with Trillian opened, AutoIt fails.

Strange, but true....

Thanks anyway.

Roman

:)

[font="Courier New"]http://RomanK.hondadesigns.com[/font]
Link to comment
Share on other sites

  • Moderators

.... hihi it's solved!!

@Smoke: Well, you're right, but I didn't know what to do.

....By "mistake" I now found out what is was:

My instant messenger, Trillian, causes this. When I exit it, AutoIt will write into the ini files as always, with Trillian opened, AutoIt fails.

Strange, but true....

Thanks anyway.

Roman

:)

Trillian hooks every open process. Rather annoying, but I don't recall ever having this issue with them before. What version of Trillian are you running? I'd suggest strongly you let them know what their app is doing as well.

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

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