Jump to content

help fast please ini read and variable


Recommended Posts

HI thats my ini

ScreenCapture.ini

[section]

key=114

this my code

#include <Misc.au3>

#include <ScreenCapture.au3>

Global $number = 99

HotKeySet("{ESC}", "Terminate")

Func Screencaputure()

Local $capture = _ScreenCapture_Capture("", 240, 355, 429, 406, False)

Local $save = _ScreenCapture_SaveImage(@ScriptDir & "\Screenshots\Screenshot " & $number & ".bmp", $capture)

$number = $number + 1

EndFunc ;==>Screencaputure

Func Terminate()

IniWrite ( "ScreenCapture.ini","Section","key",$Number )

Exit 0

EndFunc ;==>Terminate

After i end this with esc it writes the $number in to my ini and exit the script now i want that when i run the script that it writes replaces this Global $number = 99 with $number = iniread ( "ScreenCapture.ini","Section","key","") that it reads it from ini file....

Link to comment
Share on other sites

I don't know where is the problem?

#include <Misc.au3>
#include <ScreenCapture.au3>
Global $number = iniread ( "ScreenCapture.ini","Section","key","")
HotKeySet("{ESC}", "Terminate")

Func Screencaputure()
Local $capture = _ScreenCapture_Capture("", 240, 355, 429, 406, False)
Local $save = _ScreenCapture_SaveImage(@ScriptDir & "\Screenshot " & $number & ".bmp", $capture)
$number = $number + 1
EndFunc;==>Screencaputure

Func Terminate()
IniWrite ( "ScreenCapture.ini","Section","key",$Number)
Exit 0
EndFunc;==>Terminate

[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Link to comment
Share on other sites

After i end this with esc it writes the $number in to my ini and exit the script now i want that when i run the script that it writes replaces this Global $number = 99 with $number = iniread ( "ScreenCapture.ini","Section","key","") that it reads it from ini file....

What's the problem? Just replace $number=99 with $number = iniread ( "ScreenCapture.ini","Section","key","") :)

And also make sure that the script continues by adding a never ending loop before the functions.

Broken link? PM me and I'll send you the file!

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