Shides Posted February 19, 2007 Posted February 19, 2007 Hi which string it allows a random movement of some images? Thank's Excuse me for english but i'm italian :"> I'm a Italian a AutoIterMy scriptTxTediTor -->TxTediTor is a simple program similar notepad[center]Please vote me with five star ;)Antonio Caragliano for Nokia Nseries[/center]
Moderators SmOke_N Posted February 19, 2007 Moderators Posted February 19, 2007 Hi which string it allows a random movement of some images?Thank'sExcuse me for english but i'm italian :">Random() ... That's as much as I understood your question.The rest will have to be written by you yourself... if the images are in a GUI you may look at ControlMove() if they are in files, you may look at FileMove(), if this has no relevance, then post some code that demonstrates what you are trying to do so we might have an idea . Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Shides Posted February 19, 2007 Author Posted February 19, 2007 I must begin with the script but I would want to create a game I'm a Italian a AutoIterMy scriptTxTediTor -->TxTediTor is a simple program similar notepad[center]Please vote me with five star ;)Antonio Caragliano for Nokia Nseries[/center]
Moderators SmOke_N Posted February 19, 2007 Moderators Posted February 19, 2007 I must begin with the script but I would want to create a gameYou may also want to look at GUICtrlSetPos() Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Shides Posted February 19, 2007 Author Posted February 19, 2007 ok thank's I'm a Italian a AutoIterMy scriptTxTediTor -->TxTediTor is a simple program similar notepad[center]Please vote me with five star ;)Antonio Caragliano for Nokia Nseries[/center]
Shides Posted February 19, 2007 Author Posted February 19, 2007 i will be create this game this game for pc in AutoIt, the image change at button click... I'm a Italian a AutoIterMy scriptTxTediTor -->TxTediTor is a simple program similar notepad[center]Please vote me with five star ;)Antonio Caragliano for Nokia Nseries[/center]
Lakes Posted February 19, 2007 Posted February 19, 2007 For games in Autoit please use this http://www.autoitscript.com/forum/index.php?showtopic=38549 2015 - Still no flying cars, instead blankets with sleeves.
Shides Posted February 19, 2007 Author Posted February 19, 2007 what is it? I'm a Italian a AutoIterMy scriptTxTediTor -->TxTediTor is a simple program similar notepad[center]Please vote me with five star ;)Antonio Caragliano for Nokia Nseries[/center]
Lakes Posted February 19, 2007 Posted February 19, 2007 Its a UDF for moving sprites (with collision detection) and also image manipulation, have a look at the examples its really good! 2015 - Still no flying cars, instead blankets with sleeves.
Shides Posted March 18, 2007 Author Posted March 18, 2007 (edited) Hello, what's the string it allows a random image open? Edited March 19, 2007 by Shides I'm a Italian a AutoIterMy scriptTxTediTor -->TxTediTor is a simple program similar notepad[center]Please vote me with five star ;)Antonio Caragliano for Nokia Nseries[/center]
The Kandie Man Posted March 19, 2007 Posted March 19, 2007 Here is how you could do it: #include <array.au3> Dim $aPictureFilenames[3] = [@ScriptDir & "\pic1.jpg",@ScriptDir & "\pic2.jpg",@ScriptDir & "\pic3.jpg"] _ArrayDisplay($aPictureFilenames,"") Random(0,2,1);will either choose 0 or 1 or 2. The flag is set to 1 so it doesn't return decimal numbers, only integers ;here is the first way you could do it MsgBox(0,"The image randomly chosen is:",$aPictureFilenames[Random(0,2,1)]);Now that i have shown you the command, you would use it like this ;you could also do it this way Dim $iRandomInt = Random(0,2,1) MsgBox(0,"The image randomly chosen is:",$aPictureFilenames[$iRandomInt]);this does the same thing as above "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire
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