How To Store E Scripts On Iphone

0 views
Skip to first unread message

Maria

unread,
Aug 5, 2024, 10:15:24 AM8/5/24
to neanetopost
Forexample, if you are running a phone gap application, then most of your code is packaged, but you still go to the server to get data, most of the data might be json format, images etc, but you can also get rendered content such as browes to a web site, and this is downloaded and the javascript is executed.

In the LUA side of things, you can do the same, but it must be more subtle, for example, you can download, store and use data, such as images, text f iles etc, and lua has the capability to save a filename.lua file to the working folder and the require it to execute its code. But your base app still needs to be a packaged deployment. if you include the luac then you can do this, as the luac is needed to compile the script on loading, but without it, you need to have pre-compiled lua scripts downloaded.


Moving forward. more double standards, if you look in the app store you can find various scripting programs, one of them is lua, and in the app you can edit script and execute it. So basically, if you package the app, and the API to offer the app functionality, and not download scripts or have the capability of the app to do something that was not in the breif, then Apple will look favourbly at your app. on th eother handm do somthing that makes you stand out, break the app so people send many bug reports to apple, then they will black list you.


Note: In the command descriptions below, if the first item in the Parameters list does not include a parameter name, it is the direct parameter of the command (described in Direct Parameter).


Table 7-1 lists each command according to the suite (or related group) of commands to which it belongs and provides a brief description. Detailed command descriptions follow the table, in alphabetical order.


Because of this unpredictability, ASCII character and ASCII number are deprecated starting in AppleScript 2.0. Use the id property of the text class instead, since it always uses the same encoding, namely Unicode.


The selected application, as either an application or alias object; for example, application "TextEdit". If multiple selections are allowed, returns a list containing one item for each selected application, if any.


The choose application dialog initially presents a list of all applications registered with the system. To choose an application not in that list, use the Browse button, which allows the user to choose an application anywhere in the file system.


A list of Uniform Type Identifiers (UTIs); for example, "public.html", "public.rtf". Only files of the specified types will be selectable. For a list of system-defined UTIs, see Uniform Type Identifiers Overview. To get the UTI for a particular file, use info for.


If you choose the name of a file or folder that exists in the selected location, choose file name offers the choice of replacing the chosen item. However, choosing to replace does not actually replace the item.


Suppose that you choose the folder named iWork '08 in your Applications folder. The previous statement would return the following result, which properly handles the embedded single quote and space characters in the folder name:


A list of numbers and/or text objects to be initially selected. The list cannot include multiple items unless you also specify multiple selections allowed true. If an item in the default items list is not in the list to choose from, it is ignored.


If the user clicks the OK button, returns a list of the chosen number and/or text items; if empty selection is allowed and nothing is selected, returns an empty list (). If the user clicks the Cancel button, returns false.


This script selects from a list of all the people in Address Book who have defined birthdays, and gets the birthday of the selected one. Notice the if the result is not false test (choose from list returns false if the user clicks Cancel) and the set aName to item 1 of the result (choose from list returns a list, even if it contains only one item).


A list that specifies the types of services to show, if available. The list can contain one or more of the following service types, or one or more text objects representing Bonjour service types (described below), or both:


delay does not make any guarantees about the actual length of the delay, and it cannot be more precise than 1/60th of a second. delay is not suitable for real-time tasks such as audio-video synchronization.


If you supply one name, a button with that name serves as the default and is displayed on the right side of the alert dialog. If you supply two names, two buttons are displayed on the right, with the second serving as the default button. If you supply three names, the first is displayed on the left, and the next two on the right, as in the case with two buttons.


If the display alert command specifies a giving up after value, and the dialog is dismissed due to timing out before the user clicks a button, the command returns a record indicating that no button was returned and the command gave up: button returned:"", gave up:true


If the display dialog command specifies a giving up after value, and the dialog is dismissed due to timing out before the user clicks a button, it returns a record indicating that no button was returned and the command gave up: button returned:"", gave up:true


The following example displays a dialog that asks for a password. It supplies a default answer of "wrong", and specifies that the default answer, as well as any text entered by the user, is hidden (displayed as a series of bullets). It gives the user up to three chances to enter a correct password.


Execute the command as the administrator? Once a script is correctly authenticated, it will not ask for authentication again for five minutes. The elevated privileges and the grace period do not extend to any other scripts or to the rest of the system. For security reasons, you may not tell another application to do shell script with administrator privileges. Put the command outside of any tell block, or put it inside a tell me block.


The name of an administrator account. You can avoid a password dialog by specifying a name in this parameter and a password in the password parameter. If you specify a user name, you must also specify a password.


Should the do shell script command change all line endings in the command output to Mac-style and trim a trailing one? For example, the result of do shell script "echo foo; echo bar" is "foo\rbar", not the "foo\nbar\n" that the shell script actually returned.


An object specifier to be evaluated. If the specifier refers to an application-defined object, the get command is sent to that application. Technically, all values respond to get, but for all values other than object specifiers, get is an identity operation: the result is the exact same value.


true: Because getting the size of a folder requires getting the sizes of all the files inside it, size true may take a long time for large folders such as /System. If you do not need the size, ask to not get it using size false. Alternatively, target the Finder or System Events applications to ask for the specific properties you want.


Because info for returns so much information, it can be slow, and because it only works on one file at a time, it can be difficult to use. The recommended technique is to use System Events or Finder to ask for the particular properties you want.


Create lproj folders in the Resources directory of the bundle for each localization: for example, English.lproj, French.lproj. Create files named Localized.strings in each one. When you are done, the folder structure should look like this:


The mount volume command can connect to any file server that is supported by the Finder Connect To... command, including Windows (smb), Samba, and FTP servers. On some kinds of servers, the as user name and with password parameters may not bypass the login dialog, but encoding the name and password in the URL (for example, smb://myname:pas...@server.domain.com/sharename) will mount it silently.


A single file may be opened more than once, and therefore have several different file descriptors. Each file descriptor maintains its own file pointer, and each must be closed separately. If you open more than one channel at once with write permission, behavior is unspecified.


One is performance: if you are performing a number of operations on the same file, opening and closing it repeatedly could become expensive. It is cheaper to explicitly open the file, do the work, and then explicitly close it.


Two is ease of sequential read and write operations: because the file pointer tracks the progress through the file, reading or writing several pieces of data from the same file is a simple matter. Doing the same thing without using the file pointer requires calculating the data size yourself, which is not even possible in some cases.


An initial seed for the random number generator. Once called with any particular seed value, random number will always generate the same sequence of numbers. This can be useful when testing randomized algorithms: you can force it to behave the same way every time.


A number between the from and to limits, including the limit values. Depending on the limit values, the result may be an integer or a real. If at least one limit is specified, and all specified limits are integers, the result is an integer. Otherwise, the result is a real, and may have a fractional part.


The byte position in the file to start reading from. The position is 1-based, so 1 is the first byte of the file, 2 the second, and so on. Negative integers count from the end of the file, so -1 is the last byte, -2 the second-to-last, and so on.


A delimiter, such as a tab or return character, used to separate the data read into a list of text objects. The resulting items consist of the text between occurrences of the delimiter text. The delimiter is considered a separator, so a leading or trailing delimiter will produce an empty string on the other side. For example, the result of reading "axbxcx" using a delimiter of "x" would be "a", "b", "c", "".

3a8082e126
Reply all
Reply to author
Forward
0 new messages