Sign in to follow this  
Followers 0
computergroove

How do I isolate a value in an external file that changes between 1 and 4 characters?

2 posts in this topic

#1 ·  Posted (edited)

I have an external ini file. The contents of the file reference the hposition and vposition of a guiCreate Function. The problem I am anticipating is the numbers ranging from 1 to 1024 or 1 to 768. I want to use this ini file for two different scripts so I need the external file. How do I isolate the 2 separate numbers as local variables while my scripts are running?

ini example:

$hPosition = 80
$vPosition = 1

I have gotten this far:

$inifile = FileOpen("settings.ini", 0); the ini file holds the hovering button position values

If $inifile = -1 Then
    MsgBox(0, "Error", "Unable to open settings.ini")
    Exit
EndIf

Would IniRead be the best option here?

Edited by computergroove

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites



$inifile = FileOpen("Mac.ini", 0); the ini file holds the hovering button position values
$var = IniRead("Mac.ini", "Desktop Position", "hPosition", "NotFound")
    MsgBox(0,"123",$var)

Ini File:

[Desktop position]
hPosition=80
vPosition=1

I figured it out.


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

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  
Followers 0