Sign in to follow this  
Followers 0
Best4FREE

help fast please ini read and variable

4 posts in this topic

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

Share this post


Link to post
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) :)

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

LOL xd thanks its my second autoit script im Noob :) =D

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