Search found 17 matches

by JeffO2013
Thu Feb 06, 2014 8:12 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Trouble using repeat with loops and a counter variable
Replies: 4
Views: 3080

Re: Trouble using repeat with loops and a counter variable

Sorry for the delayed reply. Today was the first day I've had to work on it since I asked my question. I figured it out. I'm guessing the repeat loop automatically adds 1 to y (or whatever variable I'm using to keep track of the count)? I think my "add 1 to y" line was what was messing me up on the ...
by JeffO2013
Mon Feb 03, 2014 7:56 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Trouble using repeat with loops and a counter variable
Replies: 4
Views: 3080

Trouble using repeat with loops and a counter variable

Hi all, I'm working on making a repeat loop to put items into an array. I'm using a repeat with loop and want to use the counter variable to also tell the program what key to store the data in within the array. It will look something like this: put 1 into y repeat with y = 1 to 12 put any line of tC...
by JeffO2013
Tue Aug 06, 2013 5:23 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: "Ignoring" messages
Replies: 3
Views: 2588

Re: "Ignoring" messages

Thank you Klaus! This will work nicely with me current code.

And thanks for the hint, but what might happen without the quotations? I've run it several time through using the code without quotations and haven't noticed anything unusual.

Thanks!

Jeff
by JeffO2013
Tue Aug 06, 2013 4:02 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: "Ignoring" messages
Replies: 3
Views: 2588

"Ignoring" messages

Hi everyone, Is there a way to have livecode ignore key presses during a certain period of time? I need the program to continue to execute other commands but also disregard any key presses during this phase. The keyDown code is set up similar to what is below: on keyDown theKey if theKey is K then d...
by JeffO2013
Mon Jul 22, 2013 12:29 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Reaching recursion limit
Replies: 5
Views: 3776

Re: Reaching recursion limit

Thanks Jacque!

I'll give this a try. It definitely seems safer than the way I'm currently doing it since there is a chance that it could reach it's recursion limit normally (even though it is highly unlikely).

I'll let you know what I come up with.

Jeff
by JeffO2013
Sun Jul 21, 2013 12:02 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Reaching recursion limit
Replies: 5
Views: 3776

Re: Reaching recursion limit

Thanks, but I figured it out. It was the logic in the put 0 into trialBlockArray[1-5]. I used a repeat loop to fix it like so:

repeat with x = 1 to 5
put 0 into trialBlockArray[x]
end repeat

Thanks again!

Jeff
by JeffO2013
Sat Jul 20, 2013 8:44 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Reaching recursion limit
Replies: 5
Views: 3776

Reaching recursion limit

Hi everyone, I have a function within my program that calls itself again if a certain condition is not met. I basically need it to pick 1 of five total images and display it on the screen (then the user gives some input) then pick another image to display that is not the same as the previous one and...
by JeffO2013
Sun Jul 14, 2013 10:09 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using a Repeat
Replies: 10
Views: 6386

Re: Using a Repeat

Got It! I both love and hate when it is something simple. I have to remember that go to used to point to cards or URL's. It works like I want it to now guys. Thanks a Lot! The new code for openCard (this will change further for my program, but trying to build it in steps) on OpenCard set the visible...
by JeffO2013
Sun Jul 14, 2013 8:45 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using a Repeat
Replies: 10
Views: 6386

Re: Using a Repeat

Hi Simon, the moveToNextPhaseCode looks like this on moveToNextPhase if correctResponse is 15 then go to next card else go to openCard end if end moveToNextPhase the keyDown contains this on keyDown theKey if theKey is k then if vRandomLocation is 2 then set the visible of img "GREEN CHECK.png" to t...
by JeffO2013
Sun Jul 14, 2013 5:24 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using a Repeat
Replies: 10
Views: 6386

Re: Using a Repeat

Hi Simon and Klaus, To clairify - I wrote my last post at around 2 am - I want the card to execute all of the functions and commands listed above the keyDown and then stop until it receives a key press from the user, then execute anything listed after the keyDown (just checking to see if the conditi...
by JeffO2013
Sun Jul 14, 2013 5:16 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using a Repeat
Replies: 10
Views: 6386

Using a Repeat

Hi everyone, I'm having a problem with a repeat loop. I have some code that right now is inside openCard and I need it to start running as soon as the card opens (there are no other events to start the ball rolling) but I need it to repeat until a certain condition is met. This code includes several...
by JeffO2013
Mon Jul 01, 2013 12:28 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Creating Image Array from a File
Replies: 6
Views: 5198

Re: Creating Image Array from a File

Hi Bernd, Your're correct about the research. The way it's set up, the program would only have to handle max 200 files in a folder (for now) and they will all be the same size and format (as I'll have to create them myself and will have the luxury of ensuring this). But, if I continue with this proj...
by JeffO2013
Sun Jun 30, 2013 2:10 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Creating Image Array from a File
Replies: 6
Views: 5198

Re: Creating Image Array from a File

Thank you both for your help! I'm brand new to programming so I'm trying to learn as I go. I have a question, though: which one of these would be better for dealing with folders with a large amount of files? I need something that's going to be able to select a random picture and put it into the imag...
by JeffO2013
Sat Jun 29, 2013 6:10 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Creating Image Array from a File
Replies: 6
Views: 5198

Creating Image Array from a File

Hi, I'm trying to create an array of images from a file and then call a random image from the array and have it display in an image area. To do this I have a button with the following code global distractorArray global distractorNumber on mouseUp local tFolder answer folder "" put it into tFolder --...
by JeffO2013
Sat Jun 29, 2013 2:35 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Storing Images for later use within the program
Replies: 4
Views: 3133

Re: Storing Images for later use within the program

Thank you, Jean-Marc,

That fixed it. I imagined it was something simple I was overlooking.

Again, Thanks for your help!