What code would you use?
Posted: Mon Jul 08, 2013 1:16 pm
I have a Contact manager program that I use on PC and MAC.
Big Deal I hear you say, but it has brought me in a great deal of business that I would never have got, without it. Trust me, the commercial stuff is rubbish, you need a real world application to do the job.
The issue is that I tried it on a Galaxy note 10.1 and apart from the file handling, it works very well. It looks just like it would on Mac or PC, No stupid icons etc.
I use this to save on PC or Mac (and it even saves and recalls from skydrive without mods).
local recalledfile
on mouseUp
answer file "Select a text file:" with type "Contact Manager|mge|"
if it is empty then exit mouseUp
put it into recalledfile
put recalledfile into field "FilePath"
--set the itemdelimiter to tab
put "file:" & recalledfile into recalledfile
put url recalledfile into Field "TempTable1"
RecallFromDisk -- Recalled data file manipulation
priority
--Enable buttons after initial startup with data
--enablesysbuttons
enable field id 1004 --Table Field
enable button id 1173 --Change Database
--For safety, dsisable OPEN & AS until SAVE or AS
disable button id 1093 --Open
disable button id 1017 -- A
end mouseUp
I use this to recall the file
local counter, tFileDatax, MyFileName
on mouseUp
set the itemdelimiter to tab
-- bring up the system standard file selector to choose a file on disk
--ask file "Please select a file:" with filter "Contact Manager,*.mge"
ask file "Enter file name:" with type "Contact Manager|mge|"
-- if cancel is clicked, exit
if it is empty then exit mouseUp
-- display the file path in the File Path field
put it into MyFileName
-- load the contents of the file, into a variable
if MyFileName ends with ".mge" then
put "File:" & MyFileName into MyFileName
else
put "File:" & MyFileName & ".mge" into MyFileName
end if
SavetoDisk --Common save data code in stack script
set the itemdelimiter to tab
put field "Table 1" into url MyFileName
--For safety, enable OPEN & AS until SAVE or AS
enable button id 1093 --Open
enable button id 1017 -- As
put Field "TempTable1" into field "Table 1" --Puts page content back as it was before save
priority
end mouseUp
What I actually need now is the changes that would allow the above to save on an Android tablet.
Can any one help please?
Big Deal I hear you say, but it has brought me in a great deal of business that I would never have got, without it. Trust me, the commercial stuff is rubbish, you need a real world application to do the job.
The issue is that I tried it on a Galaxy note 10.1 and apart from the file handling, it works very well. It looks just like it would on Mac or PC, No stupid icons etc.
I use this to save on PC or Mac (and it even saves and recalls from skydrive without mods).
local recalledfile
on mouseUp
answer file "Select a text file:" with type "Contact Manager|mge|"
if it is empty then exit mouseUp
put it into recalledfile
put recalledfile into field "FilePath"
--set the itemdelimiter to tab
put "file:" & recalledfile into recalledfile
put url recalledfile into Field "TempTable1"
RecallFromDisk -- Recalled data file manipulation
priority
--Enable buttons after initial startup with data
--enablesysbuttons
enable field id 1004 --Table Field
enable button id 1173 --Change Database
--For safety, dsisable OPEN & AS until SAVE or AS
disable button id 1093 --Open
disable button id 1017 -- A
end mouseUp
I use this to recall the file
local counter, tFileDatax, MyFileName
on mouseUp
set the itemdelimiter to tab
-- bring up the system standard file selector to choose a file on disk
--ask file "Please select a file:" with filter "Contact Manager,*.mge"
ask file "Enter file name:" with type "Contact Manager|mge|"
-- if cancel is clicked, exit
if it is empty then exit mouseUp
-- display the file path in the File Path field
put it into MyFileName
-- load the contents of the file, into a variable
if MyFileName ends with ".mge" then
put "File:" & MyFileName into MyFileName
else
put "File:" & MyFileName & ".mge" into MyFileName
end if
SavetoDisk --Common save data code in stack script
set the itemdelimiter to tab
put field "Table 1" into url MyFileName
--For safety, enable OPEN & AS until SAVE or AS
enable button id 1093 --Open
enable button id 1017 -- As
put Field "TempTable1" into field "Table 1" --Puts page content back as it was before save
priority
end mouseUp
What I actually need now is the changes that would allow the above to save on an Android tablet.
Can any one help please?