Jump to content

Recommended Posts

Posted

so youre using 1 for on and 0 for off??

just use

$startupsound = IniRead(@ScriptDir & "\settings", "settings", "startupsound", "")
If $startupsound = "1" Then SoundPlay(@ScriptDir & "\sound.wav", 1)
Posted

The .ini file is okay and everything... weird

Then show us your inifile.

Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

Posted

$startupsound = IniRead("settings.ini", "settings", "startupsound", "")
If $startupsound = "1" Then SoundPlay(@ScriptDir & "\sound.wav", 1)

settings.ini

[settings]
startupsound=1

this works fine

Posted

LOL...I didnt notice that for a while!!

I thought the filename was "settings" without an extension.

$startupsound = IniRead(@ScriptDir & "\settings.ini", "settings", "startupsound", "NotFound")

will work with a file "settings.ini"

$startupsound = IniRead(@ScriptDir & "\settings", "settings", "startupsound", "NotFound")

will work with a file "settings" (!!!)

A-Jay

Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...