In my AppleScript XCode project I have a text field named RefreshRate in my preferences area. I was wondering how I could get the value of that text feild so I can use it in other parts of my main AppleScript for the project.
I have tried:
set x to value of text field "RefreshRate" of "Mainmenu.nib"
but I get a weird error.
If it is of any help, the name of the window the text field is in is simply “Preferences”
Second, I know how to set the default of that text field in Mainmenu.nib, but how can I save the changes the user makes so everytime they open the app it is the value they last entered?
Thanks much, that works. Now I just need to figure out how to save it when the user changes it. I have the text box in a Preferences window. Its default for when the app opens is 4, but the user can change it. I’m not sure how to get it to change the default to whatever the users picks, and that link was kinda confusing to me. Do you have any other suggestions?
I figured out a different way of doing it, but that has brought a new question. How do I get the text of a certain file? For example if the file Example.txt contains the character “6”, how could I get that character into an Applescript variable?