OmenSWE 0 Posted April 28, 2010 Hello i trying to make a program to do this for me. <Entry> <R> 0.1 </R> <G> 0.</G> <B> 0. </B> <A> 1.0 </A> </Entry> <Entry> <R> 0.2 </R> <G> 0.</G> <B> 0. </B> <A> 1.0 </A> </Entry> <Entry> <R> 0.3 </R> <G> 0.</G> <B> 0. </B> <A> 1.0 </A> </Entry> <Entry> <R> 0.4</R> <G> 0.</G> <B> 0. </B> <A> 1.0 </A> </Entry> <Entry> <R> 0.5 </R> <G> 0.</G> <B> 0. </B> <A> 1.0 </A> </Entry> <Entry> <R> 0.6 </R> <G> 0.</G> <B> 0. </B> <A> 1.0 </A> </Entry> All up to 1 and then go to 0 and start to do the same thing to Colum G. Until it got all variation of R, G and B Haven't manage to do this tho.. here is my script.. i cant make it start on the G and it just keep counting past number 1. expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.6.0 Author: Omen Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here Dim $Nextname = 0 ;Start/Stop Dim $R = 0 Dim $G = 0 Dim $B = 0 HotKeySet("{end}", "Button");On/Off HotKeySet("{F7}", "MyExit");Exit While 1 Select Case $Nextname = 1 $R = $R + 0.1 $G = $G $B = $B Send("<Entry>{Enter} <R> "& $R & " </R>{Enter} <G> "& $G & " </G>{Enter} <B> "& $B & " </B>{Enter} <A> 1.0 </A>{Enter} </Entry>{Enter}") If $R = 1 then $G = $G + 0.1 $R = 0 ElseIf $G = 1 then $B = $B + 0.1 $G = 0 ElseIf $B = 1 then $G = 0 $R = 0 $G = $G + 0.1 Endif EndSelect Sleep(1) WEnd Func Button() Select Case $Nextname = 0 $Nextname = 1 Case $Nextname = 1 $Nextname=0 EndSelect EndFunc Func MyExit() Exit EndFunc Thanks for the help in advance Share this post Link to post Share on other sites
Yoriz 6 Posted April 28, 2010 hey you could do it like this, a inner loop to count from 0 to 1 in inc of 0.1 and an outer loop to control which position it applys the inc to. $sString = "" For $i2 = 1 to 3 $sString &= "<Entry>" & @CR For $i = 0 To 1 Step 0.1 $sString &= "<R> " If $i2 = 1 Then $sString &= $i Else $sString &= 0 EndIf $sString &= " </R>" & @CR & "<G> " If $i2 = 2 Then $sString &= $i Else $sString &= 0 EndIf $sString &= " </B>" & @CR & "<B> " If $i2 = 3 Then $sString &= $i Else $sString &= 0 EndIf $sString &= " </B>" & @CR & "<A> 1.0 </A>" & @CR & "</Entry>" & @CR Next Next ConsoleWrite($sString) GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF. Share this post Link to post Share on other sites
hawky358 0 Posted April 29, 2010 (edited) Here you go. $file = FileOpen("Out.txt",2) for $B = 0 to 1 step 0.1 for $G = 0 to 1 step 0.1 for $R = 0 to 1 step 0.1 FileWrite($file,"<Entry>" & @CRLF & @TAB & "<R>" & $R & "</R>" & @CRLF & @TAB & "<G>" & $G & "</G>" & @CRLF & @TAB & "<B>" & $B & "</B>" & @CRLF & @TAB & "<A>1.0</A>" & @CRLF & "</Entry>" & @CRLF) Next Next Next FileClose($file) changed code bracket to autoit (Also whoops) Edited April 29, 2010 by hawky358 Share this post Link to post Share on other sites
OmenSWE 0 Posted April 29, 2010 Here you go. $file = FileOpen("Out.txt",2) for $B = 0 to 1 step 0.1 for $G = 0 to 1 step 0.1 for $R = 0 to 1 step 0.1 FileWrite($file,"<Entry>" & @CRLF & @TAB & "<R>" & $R & "</R>" & @CRLF & @TAB & "<G>" & $G & "</G>" & @CRLF & @TAB & "<B>" & $B & "</B>" & @CRLF & @TAB & "<A>1.0</A>" & @CRLF & "</Entry>" & @CRLF) Next Next Next FileClose($file) changed code bracket to autoit (Also whoops) This is more my kind of coding.. tho i already got it to work... kinda. Share this post Link to post Share on other sites