Jump to content
Sign in to follow this  
stuka

,,,

Recommended Posts

stuka

.

Edited by stuka

Share this post


Link to post
Share on other sites
bluerein

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)

Share this post


Link to post
Share on other sites
ajag

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)

Share this post


Link to post
Share on other sites
bluerein

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

settings.ini

[settings]
startupsound=1

this works fine

Share this post


Link to post
Share on other sites
bluerein

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

Share this post


Link to post
Share on other sites
ajag

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)

Share this post


Link to post
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
Sign in to follow this  

×