behdadsoft Posted January 24, 2014 Posted January 24, 2014 Hello. I try to learn Dim and Loop in Programming. I wrote this Loop but don't work in Autoit.I run this code at purebasic: Dim A.b (9) For i.b = 0 To 9 A (i) = i Debug i Next My code in Autoit: Dim $A [10] For $i = 0 to 9 $A [$i] = $i Next Local $FileOpen = @ScriptDir & "\text.txt" Local $FileWrite = FileWrite ($FileOpen, $A [$i]) I want write $A numbers in a text file. I need Guide, Can anyone give me an example how can use DIM $A [] with string values? Thanks
JohnOne Posted January 24, 2014 Posted January 24, 2014 #include<File.au3> ; ;above code ; ; ; Local $FileWrite = _FileWriteFromArray ($FileOpen, $A ) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
behdadsoft Posted January 24, 2014 Author Posted January 24, 2014 (edited) Thanks John, Now Work. Edited January 24, 2014 by behdadsoft
JohnOne Posted January 24, 2014 Posted January 24, 2014 Ace. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
AlmarM Posted January 25, 2014 Posted January 25, 2014 Just in case if you're wondering why your first code didn't work. $i is only accessible within the For loop, yet you tried to use it outside. Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
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