Pausing the code for DirectEntry

Hello, anywho i was wondering if anyone could help me with my current problem with my code.

Am trying to set up a hi-score method that will take the user input for DirectEntry and add it to a string. Right now my method reads in a txt file, find the correct spot for the user (ex. user.points = 100, spot 7 has 120 points, and spot 8 has 90, then it will make spot 8 into spot 9, and use spot 8 for the player), and then it writes back to that txt file (using the string) after this is all done to keep a record of it. I have a DirectEntry object that takes the users input, and adds it to the string, then display it on screen at the right spot.

My problem is that the code runs itself to the end, it shows the table, and saves, before it gets the value from the DirectEntry object. When i enter commands into it, it still shows up on the screen correctly, but doesn’t add to the string, which i use to save the hi-score. So i was wondering if anyone knew of a way to make a code pause, and force it to get a directobject value?

why do you need a pause just get the direct object value when you save? After you enter the stuff in.