GodForsakenSoul Posted December 30, 2009 Share Posted December 30, 2009 i'm in the ending stages of my first ever program! yay me. i'm having a small problem with the score window. while i CAN use a label for it, i don't want to. i want to use pictures of numbers instead. my current idea is incredibly retarded because i basically think of mapping out every possibly 1-9 outcome. that will be time consuming, and i will end up with an ungodly huge function. is there an easier way that i don't know of? Link to comment Share on other sites More sharing options...
jvanegmond Posted December 30, 2009 Share Posted December 30, 2009 (edited) Take images: 1.png 2.png 3.png 4.png etc.etc. 8.png 9.png Write algorithm: SetImage($c, $i) = set image to control $c to image $i.png Then another algorithm: SetNumber($i) = SetImage($leftcontrol, Round($i/10)) , SetImage($rightcontrol, Mod($i, 10)) Edited December 30, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
GodForsakenSoul Posted December 30, 2009 Author Share Posted December 30, 2009 could you explain it more thoroughly please? i can't quite understand what you mean Link to comment Share on other sites More sharing options...
jvanegmond Posted December 30, 2009 Share Posted December 30, 2009 If you're uncomfortable with talking in abstracts, make your question concrete. Show what you're trying to do in some pseudo code, and I'll improve it in some pseudo code. github.com/jvanegmond Link to comment Share on other sites More sharing options...
GodForsakenSoul Posted December 30, 2009 Author Share Posted December 30, 2009 $score=iniread("OPT.INI","ANSWERS","SCORE","0") StringDivide($score) ;put spaces between each number And from there somehow get the position of each individual number and set a large function to assign the pictures depending on the number and its position. is it even possible? Link to comment Share on other sites More sharing options...
somdcomputerguy Posted December 30, 2009 Share Posted December 30, 2009 I would try using StringSplit, StringSplit ($score, ""), then (with 0.png thru 9.png already created) pick the correct file with array[n], (array[n] & ".png"), with an array[0] loop. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
GodForsakenSoul Posted December 31, 2009 Author Share Posted December 31, 2009 the problem with StringSplit() is that i have to have a "denlimiter". snce i'm string splitting a variable, i don't have a way to shove it in between numbers. otherwise it would be awesome. Link to comment Share on other sites More sharing options...
bogQ Posted December 31, 2009 Share Posted December 31, 2009 (edited) your delimetar is "" so it will split it on nothing, did you try it before you posted this?RemarksIf you use a blank string "" for the delimiters, each character will be returned as an element. Edited December 31, 2009 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
GodForsakenSoul Posted December 31, 2009 Author Share Posted December 31, 2009 your delimetar is "" so it will split it on nothing, did you try it before you posted this?oh.... i honestly didn't think of this -headdesk- Link to comment Share on other sites More sharing options...
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