BrettF Posted April 13, 2007 Posted April 13, 2007 (edited) Are you sure your ini was correct? This seemed to work: This is what I made the INI: [Pic] 0="C:\Documents and Settings\Images\Radio.bmp" 1="C:\Documents and Settings\Images\Radio1.bmp" 2="C:\Documents and Settings\Images\Radio2.bmp" 3="C:\Documents and Settings\Images\Radio3.bmp" 4="C:\Documents and Settings\Images\Radio4.bmp" And this is the code: for $i = 0 to 4 Assign ('read' & $i, IniRead(@ScriptDir & "\Radio.ini", "Pic", $i, ""), "") Assign ('Label_' & $i, 'GuiCtrlCreatePic('&Eval('Read' & $i)&','& $i + 1 * 43 &', 450, 35, 35)') Next Try that and tell me how it goes. Edit: Error in code EDIT: No good if you edit one thing, and forget the other Edited April 13, 2007 by bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
therks Posted April 14, 2007 Posted April 14, 2007 (edited) That wouldn't work bert. You have the GUICtrlCreate...() in a string. That line needs to be like: Assign('Label_' & $i, GuiCtrlCreatePic(Eval('Read' & $i), ($i + 1) * 43, 450, 35, 35))oÝ÷ Ù:,¢g)à)¶¬jëh×6_ArrayAdd($avButtons, GUICtrlCreateButton($b, Random(1, 200, 1), Random(1, 200, 1), 35, 35, $BS_BITMAP))oÝ÷ ØêÛzÛ^¯'²)Üx.zË2¢íýw§¶Ú!j÷é¢Ê^r'âr)íz»ÚÉbëbë,¢g)à)¶¬jëh×6_ArrayAdd($avButtons, GUICtrlCreateButton($b, 35 * Random(1, 5, 1), 35 * Random(1, 5, 1), 35, 35, $BS_BITMAP)) But whatever, it's your code. Also, I just realized that in the code I provided previously, I missed a closing bracket. That's why the syntax error. Sorry about that, I'll edit it now. Edited April 14, 2007 by Saunders My AutoIt Stuff | My Github
SleepyXtreme Posted April 14, 2007 Posted April 14, 2007 this should work if i didn't miss something lol When you put something in brackets it means it's an array but if you add on the variable with the & sign it just adds it next to it. so $button_4 = $button_ & $a when a =4 CODE Func Blank() For $a = 1 to 20 GuiCtrlSetImage($Button_ & $a, @ScriptDir & "\Radio\blankitem.bmp) Next EndFunc
Paulie Posted April 14, 2007 Posted April 14, 2007 this should work if i didn't miss something lolWhen you put something in brackets it means it's an array but if you add on the variable with the & sign it just adds it next to it. so $button_4 = $button_ & $a when a =4CODE Func Blank() For $a = 1 to 20 GuiCtrlSetImage($Button_ & $a, @ScriptDir & "\Radio\blankitem.bmp) NextEndFuncYou should test your code before posting.
BrettF Posted April 14, 2007 Posted April 14, 2007 That wouldn't work bert. You have the GUICtrlCreate...() in a string.My Bad Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
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