Best4FREE Posted March 28, 2008 Posted March 28, 2008 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....
Madza91 Posted March 28, 2008 Posted March 28, 2008 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) :)
monoceres Posted March 28, 2008 Posted March 28, 2008 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!
Best4FREE Posted March 28, 2008 Author Posted March 28, 2008 LOL xd thanks its my second autoit script im Noob =D
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now