AUDICA UPLOAD TOOL REFERENCE
ver. 0.1.8

This tool is used to upload files to different file hostings. It is based on script languages to allow user to add more services or fix broken uploading code. VBScript and JScript are supported.


UPLOADING FILES

Basically you call Audica Upload with full or relative path to file to start uploading it.
EXAMPLE
[
#secret_password.txt file from program's folder will be uploaded.
upload secret_password.txt
]

Each uploading script should be saved in a separate file with .vbs or .js extension. Upload Tool needs this to find out which language is used in file. There are several ways to tell the program, which script should be used (in order of priority):
1. First argument of command line, if it is '$choose' then popup menu with all found scripts will be shown.
EXAMPLE
[
#"C:\upl script.vbs" will be used to upload files
upload "C:\upl script.vbs" home_movies_0106.avi
]
2. 'Script' value in 'Upload' section of 'options.ini'
EXAMPLE
[
#zalil.js will be used to upload files
[Upload]
Script=zalil.js
]
3. If the program still cannot get script path it tries to use upload_rghost.vbs file from it's folder.

You can add 'Timeout' value in 'Upload' section of 'options.ini' file to change the amount of time that a script can run before a warning message is displayed. Default is 60000 milliseconds.


WRITING SCRIPTS

Script file should contain "upload" function which takes filepath as a parameter and returns download link.
EXAMPLE
[
#JScript
function upload(filepath) {
    ...
    return DOWNLOAD_LINK;
}

#VBScript
Function upload(ByVal filepath)
    ...
    upload = DOWNLOAD_LINK
End Function
]

Upload Tool provides 4 objects to be used in scripts:
- XMLHTTP (MSXML2.XMLHTTP object)
- WinHttp (WinHttp.WinHttpRequest.5.1 object)
- WshShell (WScript.Shell object)
- WebForm
    > Action (URL where to send data, r/w prop)
    > AddField(Name, Value) (Add a field to request, sub)
    > AddFile(Name, Path, MimeType ['application/octet-stream' if empty]) (Add a file to request, sub)
    > Boundary (Splitter between data pieces, r prop)
    > Enctype (Use "application/x-www-form-urlencoded" for fields, use "multipart/form-data" for fields and files, r/w prop)
    > Method (Data send method: "GET" or "POST", r/w prop)
    > ResetData (Removes all added fields and files)
    > VarBody (Data to send, r prop)


EXPLORER INTEGRATION

Use 'context_install.vbs' script to add menu item 'Upload to Internet'. It runs the program with '$choose' parameter so you can select hosting, where you wish to upload file. Use 'context_uninstall.vbs' script to remove Explorer integration.