
Thanks,
Kaubs
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
I'm afraid you are thinking far too complicated!Kaubs wrote:What I am looking for is what would be the best way to store this file so that it can be called and information pulled from it at a later time in the specialfolder or elsewhere?
What makes you think you can't?Kaubs wrote:Could I have the iphone make something as simple as a text file...
Code: Select all
function retrieveUNandPW
put specialfolderpath("documents") & "/your_file_name_here" into tFile
if there is a file tFile then
## File has been save here before:
return url("file:" & tFile)
else
## Not saved yet...
return empty
end if
end retrieveUNandPW
Code: Select all
## 2 Parameter Username and Password
command saveUNandPW tUN, tPW
## Just save the stuff in a text file:
## First line = Username
## Second line = Password
put specialfolderpath("documents") & "/your_file_name_here" into tFile
put tUN & CR & tPW into url("file:" & tFile)
end saveUNandPW
Code: Select all
on mouseUp
send "saveUNandPW" to me in 0 milliseconds
end mouseUp
command saveUNandPW tUN, tPW
put specialfolderpath("documents") & "/test" into tFile
put tUN & CR & tPW into url("file:test.txt" & tFile)
if there is a file specialfolderpath("documents") & "/test" then
go to card 6
end if
end saveUNandPW
Code: Select all
on mouseUp
send "saveUNandPW" to me in 0 milliseconds
end mouseUp
command saveUNandPW tUN, tPW
put specialfolderpath("documents") & "/test" into tFile
put tUN & CR & tPW into url("file:" & tFile)
if there is a file tFile then
go to card 3
end if
end saveUNandPW
Code: Select all
on mouseUp
put fld "username" intotUN
put fld "password" int tPW
## The function need to knwo these two parameters!
## Otherwise you will find the strings tUN and tPW in that fiel!
saveUNandPW tUN, tPW
end mouseUp
command saveUNandPW tUN, tPW
## YEP! tFile IS already the correct filename!
put specialfolderpath("documents") & "/test" into tFile
put tUN & CR & tPW into url("file:" & tFile)
## NO idea what this is good for?????
if there is a file tFile then
go to card 3
end if
end saveUNandPW
Your "if there is a file..." does indeed check for the presence of that file, but I have no idea what its good for AFTER we wrote the file, so this check will always be positive!?Is it correctly verifying that there is a file tho and if so its just an empty file right?
Correct!Presumed this "mosueup" script is in the button "Login" or "OK" that the user clicks after he entered the username and pasword, right?
Code: Select all
if there is a file tFile then
Code: Select all
on mouseUp
put fld "username" intotUN
put fld "password" int tPW
saveUNandPW tUN, tPW
end mouseUp
command saveUNandPW tUN, tPW
put specialfolderpath("documents") & "/test" into tFile
put tUN & CR & tPW into url("file:" & tFile)
go to card 3
end if
end saveUNandPW
Code: Select all
on openstack
put specialfolderpath("documents") & "/test" into tFile
if there is a file tFile then
go to card 3
end if
end openstack
Code: Select all
on mouseUp
put fld "username" into tUN
put fld "password" into tPW
saveUNandPW tUN, tPW
end mouseUp
command saveUNandPW tUN, tPW
put specialfolderpath("documents") & "/text.txt" into tFile
put tUN & CR & tPW into url("file:" & tFile)
go to card 3
end saveUNandPW
Code: Select all
on openstack
put specialfolderpath("documents") & "/text.txt" into tFile
if there is a file tFile then
go to card 3
end if
end openstack