Jump to content

Ini Write Problem


pille24
 Share

Recommended Posts

  • Developers

$newalarm=FileOpenDialog("Choose sound","","Sound Files (*.wav)")

    IniWrite("config.ini","Settings","sound",$newalarm)

Hi, thats my code..

unfortunately, it doesnt write to the ini at all...

Does anyone know y?

Works fine for me... :lmao:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

crap. Then the mistake must be anywhere else...

Happy searching^^

Hmmh, I also get the problem that the script doesn´t want to add the path to the ini file.

I´ve got the problem when the path of the config.ini is deeper then the file I´ve chosen.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

i doesnt work for me either i dont really know how to help you out here.. a messegebox can show the dir but i cant get it to iniwrite

same here, that was y i wondered. THe Box showed me the right path, but it didnt write it to the ini...
Link to comment
Share on other sites

  • Developers

Your problem probably is that the Config.ini file is created in the directory you select the WAV file from, because FileOpenDialog() changes the workingdirectory to the select directory.

change yoy script to something like this and try it:

$newalarm=FileOpenDialog("Choose sound","","Sound Files (*.wav)")
 IniWrite(@ScriptDir & "\config.ini","Settings","sound",$newalarm)
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Your problem probably is that the Config.ini file is created in the directory you select the WAV file from, because FileOpenDialog() changes the workingdirectory to the select directory.

change yoy script to something like this and try it:

$newalarm=FileOpenDialog("Choose sound","","Sound Files (*.wav)")
 IniWrite(@ScriptDir & "\config.ini","Settings","sound",$newalarm)
thx, I just found it out after 10 mins trial and error.. :lmao:
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...