iMB_OK = 0; MB_OKCANCEL = 1; MB_ABORTRETRYIGNORE = 2; MB_YESNOCANCEL = 3; MB_YESNO = 4; MB_RETRYCANCEL = 5; MB_ICONNONE = 0; MB_ICONSTOP = 16; MB_ICONQUESTION = 32; MB_ICONEXCLAMATION = 48; MB_ICONINFORMATION = 64; MB_DEFBUTTON1 = 0; MB_DEFBUTTON2 = 256; MB_DEFBUTTON3 = 512; IDOK = 1; IDCANCEL = 2; IDABORT = 3; IDIGNORE = 5; IDRETRY = 4; IDYES = 6; IDNO = 7; SW_SHOWNORMAL = 1; SW_NORMAL = 1; SW_MAXIMIZE = 3; SW_MINIMIZE = 6; CHANNEL_ALL = -3; CHANNEL_EFFECTS = 0; CHANNEL_USER1 = 1; CHANNEL_USER2 = 2; CHANNEL_USER3 = 3; CHANNEL_USER4 = 4; CHANNEL_BACKGROUND = 5; CHANNEL_NARRATION = 6; OB_STATE_UP = 0; OB_STATE_DOWN = 1; SEEK_BEGINNING = 0; SEEK_END = 1; SEEK_FORWARD = 2; SEEK_BACKWARD = 3; SEEK_SPECIFIC = 4; PAGE_FIRST = 0; PAGE_LAST = 1; PAGE_NEXT = 2; PAGE_PREVIOUS = 3; PAGE_BACKWARD = 4; PAGE_FORWARD = 5; FLASH_LOADING = 0; FLASH_UNINITIALIZED = 1; FLASH_LOADED = 2; FLASH_INTERACTIVE = 3; FLASH_COMPLETE = 4; VIDEO_STOPPED = 0; VIDEO_PAUSED = 1; VIDEO_PLAYING = 2; OBJECT_BUTTON = 0; OBJECT_LABEL = 1; OBJECT_PARAGRAPH = 2; OBJECT_IMAGE = 3; OBJECT_FLASH = 4; OBJECT_VIDEO = 5; OBJECT_WEB = 6; OBJECT_INPUT = 7; OBJECT_HOTSPOT = 8; OBJECT_LISTBOX = 9; OBJECT_COMBOBOX = 10; OBJECT_PROGRESS = 11; OBJECT_TREE = 12; OBJECT_PLUGIN = 40; HKEY_CLASSES_ROOT = 0; HKEY_CURRENT_CONFIG = 1; HKEY_CURRENT_USER = 2; HKEY_LOCAL_MACHINE = 3; HKEY_USERS = 4; REG_NONE = 0; REG_SZ = 1; REG_EXPAND_SZ = 2; REG_BINARY = 3; REG_DWORD = 4; REG_DWORD_LITTLE_ENDIAN = 4; REG_DWORD_BIG_ENDIAN = 5; REG_LINK = 6; REG_MULTI_SZ = 7; REG_RESOURCE_LIST = 8; REG_FULL_RESOURCE_DESCRIPTOR = 9; REG_RESOURCE_REQUIREMENTS_LIST = 10; DLL_CALL_CDECL = 0; DLL_CALL_STDCALL = 1; DLL_RETURN_TYPE_INTEGER = 0; DLL_RETURN_TYPE_LONG = 1; DLL_RETURN_TYPE_STRING = 2; SUBMITWEB_POST = 0; SUBMITWEB_GET = 1; ACCESS_READ = 131097; ACCESS_WRITE = 131078; ACCESS_ENUMERATE = 8; ACCESS_ALL = 983103; SHF_FONTS = 20; SHF_DESKTOP = 16; SHF_DESKTOP_COMMON = 25; SHF_STARTMENU = 11; SHF_STARTMENU_COMMON = 22; SHF_STARTMENUPROGRAMS = 2; SHF_STARTMENUPROGRAMS_COMMON = 23; SHF_STARTUP = 7; SHF_STARTUP_COMMON = 24; SHF_COMMONFILES = 43; SHF_PROGRAMFILES = 38; SHF_MYDOCUMENTS = 5; SHF_APPLICATIONDATA = 26; SHF_APPLICATIONDATA_COMMON = 35; DATE_FMT_US = 0; DATE_FMT_EUROPE = 1; DATE_FMT_ISO = 2; DATE_FMT_JULIAN = 3; DATE_FMT_MONTH = 4; DATE_FMT_DAY = 5; DATE_FMT_YEAR = 6; DATE_FMT_DAYOFWEEK = 7; TIME_FMT_MIL = 0; TIME_FMT_AMPM = 1; TIME_FMT_SEC = 2; TIME_FMT_MIN = 3; TIME_FMT_HOUR = 4; LB_ALLITEMS = -1; LB_BYTEXT = 0; LB_BYDATA = 1; LB_BYTEXTDATA = 2; LB_ERROR = -1; CLOSEWND_SENDMESSAGE = 0; CLOSEWND_TERMINATE = 1; HWND_BOTTOM = 1; HWND_NOTOPMOST = -2; HWND_TOP = 0; HWND_TOPMOST = -1; DRIVE_UNKNOWN = 0; DRIVE_NO_ROOT_DIR = 1; DRIVE_REMOVABLE = 2; DRIVE_FIXED = 3; DRIVE_REMOTE = 4; DRIVE_CDROM = 5; DRIVE_RAMDISK = 6; FILE_INSTALL_SAMEOLDER = 0; FILE_INSTALL_OLDER = 1; FILE_INSTALL_ALWAYS = 2; FILE_INSTALL_NEVER = 3; FILE_INSTALL_ASK = 4; FILE_INSTALL_CALLBACK = 6; ZIP_OVERWRITE_NEVER = 0; ZIP_OVERWRITE_IFNEWER = 1; ZIP_OVERWRITE_ALWAYS = 2; SPLASH_FLASH = 0; SPLASH_VIDEO = 1; SPLASH_IMAGE = 2; BTN_UP = 0; BTN_DOWN = 1; TABLE_ALL = -1; MODE_BINARY = 0; MODE_TEXT = 1; ZIP_STATUS_MINOR = 1; ZIP_STATUS_MAJOR = 0; LOGON_NO_OPTION = 0; LOGON_WITH_PROFILE = 1; LOGON_NETCREDENTIALS_ONLY = 2; FMTSIZE_AUTOMATIC = 1; FMTSIZE_BYTES = 2; FMTSIZE_KB = 3; FMTSIZE_MB = 4; FMTSIZE_GB = 5; FMTSIZE_GB = 5; FW_DONTCARE = 0; FW_THIN = 100; FW_EXTRALIGHT = 200; FW_LIGHT = 300; FW_NORMAL = 400; FW_MEDIUM = 500; FW_SEMIBOLD = 600; FW_BOLD = 700; FW_EXTRABOLD = 800; FW_HEAVY = 900; ANSI_CHARSET = 0; BALTIC_CHARSET = 186; CHINESEBIG5_CHARSET = 136; DEFAULT_CHARSET = 1; EASTEUROPE_CHARSET = 238; GB2312_CHARSET = 134; GREEK_CHARSET = 161; HANGUL_CHARSET = 129; MAC_CHARSET = 77; OEM_CHARSET = 255; RUSSIAN_CHARSET = 204; SHIFTJIS_CHARSET = 128; SYMBOL_CHARSET = 2; TURKISH_CHARSET = 162; ALIGN_LEFT = 0; ALIGN_CENTER = 1; ALIGN_RIGHT = 2; BTNSTYLE_STANDARD = 0; BTNSTYLE_TOGGLE = 1; BTNTOGGLE_UP = 0; BTNTOGGLE_DOWN = 1; CURSOR_ARROW = 0; CURSOR_HAND = 1; CURSOR_BLACK_ARROW = 2; CURSOR_CROSSHAIR = 3; CURSOR_EXPLORE = 4; CURSOR_HELP = 5; CURSOR_MAGNIFY = 6; CURSOR_MEDIA = 7; CURSOR_MEDIA = 7; CURSOR_MONEY = 8; CURSOR_NOTEPAD = 9; CURSOR_PENCIL = 10; CURSOR_PRINTER = 11; CURSOR_SPEAKER = 12; CURSOR_UP_ARROW = 13; SND_NONE = 0; SND_STANDARD = 1; SND_CUSTOM = 2; BG_SOLID = 0; BG_TRANSPARENT = 1; BORDER_NONE = 0; BORDER_SOLID = 1; SCROLL_STANDARD = 0; SCROLL_CUSTOM = 1; SCROLL_AUTO = 0; SCROLL_ON = 1; SCROLL_OFF = 2; HITTEST_STANDARD = 0; HITTEST_ALPHA = 1; ALIGN_DEFAULT = 0; ALIGN_TOP = 1; ALIGN_BOTTOM = 3; ALIGN_TOP_LEFT = 5; ALIGN_TOP_RIGHT = 6; ALIGN_BOTTOM_LEFT = 7; ALIGN_BOTTOM_RIGHT = 8; MENU_STANDARD = 0; MENU_FULL = 1; QUALITY_LOW = 0; QUALITY_HIGH = 1; QUALITY_AUTO_LOW = 2; QUALITY_AUTO_HIGH = 3; SHOW_ALL = 0; NO_BORDER = 1; EXACT_FIT = 2; LEFT_BUTTON_DOWN = 0; LEFT_BUTTON_UP = 1; RIGHT_BUTTON_DOWN = 2; RIGHT_BUTTON_UP = 3; INPUT_STANDARD = 0; INPUT_PASSWORD = 1; INPUT_MASK = 2; MASK_FORMATTED = 0; MASK_AS_TYPED = 1; BORDER_NONE = 0; BORDER_FLAT = 1; BORDER_SUNKEN = 2; READ_STANDARD = 0; READ_RIGHT_TO_LEFT = 1; DROPDOWN_LIST = 0; DROPDOWN_EDIT = 1; STYLE_BARS = 0; STYLE_SMOOTH = 1; ORIENT_HORIZONTAL = 0; ORIENT_VERTICAL = 1; STRETCH_MODE = 0; MAINTAIN_ASPECT = 1; CONTROL_PANEL_NONE = 0; CONTROL_PANEL_STANDARD = 1; CONTROL_PANEL_CUSTOM = 2; TIME_NONE = 0; TIME_ELAPSED = 1; TIME_LENGTH = 2; TIME_BOTH = 3; ZORDER_FRONT = 0; ZORDER_BACK = 1; ZORDER_FORWARD = 2; ZORDER_BACKWARD = 3; ZORDER_INSERT_BEFORE = 4; ZORDER_INSERT_BEHIND = 5; SIZE_RESTORED = 0; SIZE_MINIMIZED = 1; SIZE_MAXIMIZED = 2; TPM_LEFTALIGN = 0; TPM_CENTERALIGN = 4; TPM_RIGHTALIGN = 8; TPM_TOPALIGN = 0; TPM_VCENTERALIGN = 16; TPM_BOTTOMALIGN = 32; _tblErrorMessages = {}; _tblErrorMessages[0]=[[Success.]]; _tblErrorMessages[1000]=[[The specified file could not be found.]]; _tblErrorMessages[1001]=[[Failed to load file.]]; _tblErrorMessages[1002]=[[The specified path was not found.]]; _tblErrorMessages[1003]=[[The .exe file is invalid (non-Win32 .exe or error in .exe image).]]; _tblErrorMessages[1004]=[[The operating system denied access to the specified file.]]; _tblErrorMessages[1005]=[[The file name association is incomplete or invalid.]]; _tblErrorMessages[1006]=[[The DDE transaction could not be completed because other DDE transactions were being processed.]]; _tblErrorMessages[1007]=[[The DDE transaction failed.]]; _tblErrorMessages[1008]=[[The DDE transaction could not be completed because the request timed out.]]; _tblErrorMessages[1009]=[[The specified dynamic-link library was not found.]]; _tblErrorMessages[1011]=[[There is no application associated with the given file name extension. This error will also be returned if you attempt to print a file that is not printable.]]; _tblErrorMessages[1012]=[[There was not enough memory to complete the operation.]]; _tblErrorMessages[1013]=[[File execution failed.]]; _tblErrorMessages[1014]=[[A sharing violation occurred.]]; _tblErrorMessages[1015]=[[Could not determine viewer class name.]]; _tblErrorMessages[1016]=[[Could not determine viewer command line.]]; _tblErrorMessages[1017]=[[Associated viewer was not an executable file.]]; _tblErrorMessages[1018]=[[Associated viewer executable does not exist.]]; _tblErrorMessages[1019]=[[Invalid source specified.]]; _tblErrorMessages[1020]=[[Invalid destination specified.]]; _tblErrorMessages[1021]=[[Source file(s) does not exist.]]; _tblErrorMessages[1022]=[[Destination directory does not exist.]]; _tblErrorMessages[1023]=[[Failed to copy one or more files.]]; _tblErrorMessages[1024]=[[Failed to delete one or more files.]]; _tblErrorMessages[1025]=[[Failed to schedule delete on reboot.]]; _tblErrorMessages[1026]=[[Failed to schedule move on reboot.]]; _tblErrorMessages[1027]=[[Operation aborted by user.]]; _tblErrorMessages[1028]=[[An error occurred while calling the callback function.]]; _tblErrorMessages[1029]=[[Error, the callback function could not be found.]]; _tblErrorMessages[1030]=[[Could not get the size of the version information.]]; _tblErrorMessages[1031]=[[Could not get the file version information.]]; _tblErrorMessages[1032]=[[The specified filename contains invalid characters.]]; _tblErrorMessages[1033]=[[The destination file already exists.]]; _tblErrorMessages[1034]=[[An unknown error occurred.]]; _tblErrorMessages[1035]=[[Run on reboot command failed, could not open key.]]; _tblErrorMessages[1036]=[[Run on reboot command failed, could not set value.]]; _tblErrorMessages[1037]=[[Could not set the file's attributes.]]; _tblErrorMessages[1038]=[[Could not set file's compressed attribute.]]; _tblErrorMessages[1039]=[[Could not create destination Folder.]]; _tblErrorMessages[1040]=[[Could not create a backup of one or more files.]]; _tblErrorMessages[1041]=[[Out of memory.]]; _tblErrorMessages[1045]=[[File execution failed, elevation required.]]; _tblErrorMessages[1100]=[[The specified object could not be found.]]; _tblErrorMessages[1101]=[[Play command failed.]]; _tblErrorMessages[1102]=[[Pause command failed.]]; _tblErrorMessages[1103]=[[Media does not support seeking.]]; _tblErrorMessages[1104]=[[Seek command failed.]]; _tblErrorMessages[1105]=[[Stop command failed.]]; _tblErrorMessages[1106]=[[Could not display dialog.]]; _tblErrorMessages[1107]=[[File is to large to read.]]; _tblErrorMessages[1108]=[[The specified file could not be opened]]; _tblErrorMessages[1109]=[[The image file could not be found]]; _tblErrorMessages[1110]=[[Could not determine the size of the media.]]; _tblErrorMessages[1115]=[[Exception thrown by internal control.]]; _tblErrorMessages[1118]=[[Action cannot be performed on disabled object.]]; _tblErrorMessages[1120]=[[Failed to create object, an object with that name already exists.]]; _tblErrorMessages[1123]=[[Failed to create object, invalid object type.]]; _tblErrorMessages[1126]=[[Failed to create object.]]; _tblErrorMessages[1128]=[[The specified event could not be found.]]; _tblErrorMessages[1130]=[[Invalid zorder position value.]]; _tblErrorMessages[1200]=[[The specified channel is out of range.]]; _tblErrorMessages[1201]=[[Audio channel is not loaded.]]; _tblErrorMessages[1202]=[[Set volume command failed.]]; _tblErrorMessages[1203]=[[Could not determine volume level.]]; _tblErrorMessages[1204]=[[Error CHANNEL_ALL not supported for the Audio.Load action.]]; _tblErrorMessages[1205]=[[Error CHANNEL_ALL not supported for the Audio.GetVolume action.]]; _tblErrorMessages[1206]=[[Error CHANNEL_ALL not supported for the Audio.GetCurrentPos action.]]; _tblErrorMessages[1207]=[[Error CHANNEL_ALL not supported for the Audio.Seek action.]]; _tblErrorMessages[1208]=[[Could not determine audio file's length.]]; _tblErrorMessages[1209]=[[Could not determine the playback position.]]; _tblErrorMessages[1210]=[[Error CHANNEL_ALL not supported for the Audio.GetOggTags action.]]; _tblErrorMessages[1211]=[[Error sound system not initialized.]]; _tblErrorMessages[1212]=[[Error file does not appear to be of type Ogg-Vorbis]]; _tblErrorMessages[1300]=[[The specified page does not exist.]]; _tblErrorMessages[1301]=[[Could not resolve the current page.]]; _tblErrorMessages[1400]=[[Could not show status dialog.]]; _tblErrorMessages[1401]=[[Could not hide status dialog.]]; _tblErrorMessages[1402]=[[Could not set the status text on the status dialog.]]; _tblErrorMessages[1403]=[[Could not set the progress meter's range on the status dialog.]]; _tblErrorMessages[1404]=[[Could not set the progress meter's position on the status dialog.]]; _tblErrorMessages[1405]=[[Could not set the message text on the status dialog.]]; _tblErrorMessages[1406]=[[Could not set the title text on the status dialog.]]; _tblErrorMessages[1407]=[[Could not get the position of the progress meter.]]; _tblErrorMessages[1500]=[[Could not delete the specified INI file section.]]; _tblErrorMessages[1501]=[[Could not delete the specified INI file value.]]; _tblErrorMessages[1502]=[[Could not set the specified value.]]; _tblErrorMessages[1600]=[[Could not create the specified Registry key.]]; _tblErrorMessages[1601]=[[Could not delete the specified Registry key.]]; _tblErrorMessages[1602]=[[Could not delete the specified Registry value.]]; _tblErrorMessages[1603]=[[The specified sub key does not exist.]]; _tblErrorMessages[1604]=[[Could not get the sub key names.]]; _tblErrorMessages[1605]=[[Could not get the specified value's data.]]; _tblErrorMessages[1606]=[[Could not get the value names.]]; _tblErrorMessages[1607]=[[Could not get the registry value's type.]]; _tblErrorMessages[1608]=[[Could not set the specified registry value's data.]]; _tblErrorMessages[1700]=[[Could not add item to ListBox object.]]; _tblErrorMessages[1701]=[[Could not insert item into ListBox object.]]; _tblErrorMessages[1702]=[[Index out of range]]; _tblErrorMessages[1800]=[[Could not get the OS Version information.]]; _tblErrorMessages[1801]=[[Could not reboot system. OS information not available.]]; _tblErrorMessages[1802]=[[Failure in LoadLibrary().]]; _tblErrorMessages[1803]=[[GetProcAddress failed.]]; _tblErrorMessages[1804]=[[Failure code returned by DllRegisterServer.]]; _tblErrorMessages[1805]=[[Error in call to LoadTypeLib.]]; _tblErrorMessages[1806]=[[Error in call to RegisterTypeLib.]]; _tblErrorMessages[1807]=[[Error, font name cannot be empty.]]; _tblErrorMessages[1808]=[[Invalid font name.]]; _tblErrorMessages[1809]=[[Failed to add font to system font table.]]; _tblErrorMessages[1810]=[[Failed to add font to registry.]]; _tblErrorMessages[1811]=[[Failed to remove font from system font table.]]; _tblErrorMessages[1812]=[[Failed to remove font from registry.]]; _tblErrorMessages[1813]=[[Could not retrieve user information.]]; _tblErrorMessages[1814]=[[Unknown date format specified.]]; _tblErrorMessages[1815]=[[Unknown time format specified.]]; _tblErrorMessages[1816]=[[Unable to determine default language ID.]]; _tblErrorMessages[1817]=[[Unable to determine display info.]]; _tblErrorMessages[1818]=[[The server was unable to complete the registration of all the type libraries used by its classes.]]; _tblErrorMessages[1819]=[[The server was unable to complete the registration of all the object classes.]]; _tblErrorMessages[1820]=[[The server was unable to remove the entries of all the type libraries used by its classes.]]; _tblErrorMessages[1821]=[[The server was unable to remove the entries of all the object classes.]]; _tblErrorMessages[1822]=[[Failure code returned by DllUnregisterServer.]]; _tblErrorMessages[1823]=[[Failed to access the number of running processes.]]; _tblErrorMessages[1824]=[[Failed to enumerate the processes.]]; _tblErrorMessages[1825]=[[Failed to get the process handle.]]; _tblErrorMessages[1900]=[[Could not open text file.]]; _tblErrorMessages[1901]=[[The text file is too large to be read.]]; _tblErrorMessages[1902]=[[Error, could not save text file.]]; _tblErrorMessages[2000]=[[Error, window handle is not valid.]]; _tblErrorMessages[2001]=[[Error, could not hide window.]]; _tblErrorMessages[2002]=[[Error, could not maximize window.]]; _tblErrorMessages[2003]=[[Error, could not minimize window.]]; _tblErrorMessages[2004]=[[Error, could not restore window.]]; _tblErrorMessages[2005]=[[Error, could not show window.]]; _tblErrorMessages[2006]=[[Error, could not load transparency map file.]]; _tblErrorMessages[2007]=[[Error, could not set window mask.]]; _tblErrorMessages[2100]=[[Error, could not eject drive, action not supported.]]; _tblErrorMessages[2101]=[[Error, could not calculate free space.]]; _tblErrorMessages[2102]=[[Error, could not calculate total size.]]; _tblErrorMessages[2103]=[[Error, could not calculate used space.]]; _tblErrorMessages[2104]=[[Failed to get volume information.]]; _tblErrorMessages[2200]=[[Could not create folder.]]; _tblErrorMessages[2201]=[[The specified folder does not exist.]]; _tblErrorMessages[2202]=[[The specified path does not point to a folder.]]; _tblErrorMessages[2203]=[[Could not delete folder.]]; _tblErrorMessages[2204]=[[Could not set the current folder.]]; _tblErrorMessages[2205]=[[The destination folder already exists.]]; _tblErrorMessages[2206]=[[The folder name contains invalid characters.]]; _tblErrorMessages[2207]=[[Could not delete base folder.]]; _tblErrorMessages[2300]=[[Could not create folder for shortcut.]]; _tblErrorMessages[2301]=[[Could not create the link for the shortcut.]]; _tblErrorMessages[2302]=[[Error, the shortcut description is longer then 250 characters.]]; _tblErrorMessages[2303]=[[Shortcut could not be deleted.]]; _tblErrorMessages[2304]=[[Unknown shell folder.]]; _tblErrorMessages[2305]=[[The folder returned is invalid.]]; _tblErrorMessages[2400]=[[Failed to load the specified DLL.]]; _tblErrorMessages[2401]=[[Failed to find the specified function within the DLL.]]; _tblErrorMessages[2500]=[[Failed to create the Internet session.]]; _tblErrorMessages[2501]=[[Failed to create the Internet connection.]]; _tblErrorMessages[2502]=[[Could not open request.]]; _tblErrorMessages[2503]=[[Send request failed.]]; _tblErrorMessages[2504]=[[Could not open the destination file for writing.]]; _tblErrorMessages[2505]=[[Invalid HTTP response from server.]]; _tblErrorMessages[2506]=[[An error occurred when downloading information from the server.]]; _tblErrorMessages[2507]=[[An error occurred while trying to write to the destination file.]]; _tblErrorMessages[2508]=[[The user has aborted the action.]]; _tblErrorMessages[2509]=[[An error occurred while trying to open an FTP file.]]; _tblErrorMessages[2510]=[[An error occurred when trying to write to memory. (Out of memory?)]]; _tblErrorMessages[2511]=[[An error occurred when trying to set the proxy username.]]; _tblErrorMessages[2512]=[[An error occurred when trying to set the proxy password.]]; _tblErrorMessages[2513]=[[The request could not be understood by the server. (Bad Syntax)]]; _tblErrorMessages[2514]=[[Access is forbidden.]]; _tblErrorMessages[2515]=[[The requested URL was not found on the server.]]; _tblErrorMessages[2516]=[[An internal server error has occurred.]]; _tblErrorMessages[2517]=[[The server is at full capacity.]]; _tblErrorMessages[2600]=[[Could not reenter the zip file.]]; _tblErrorMessages[2601]=[[Unexpected end of zip file.]]; _tblErrorMessages[2602]=[[Zip file structure error.]]; _tblErrorMessages[2603]=[[Out of memory.]]; _tblErrorMessages[2604]=[[Internal logic error.]]; _tblErrorMessages[2605]=[[Entry too large to split.]]; _tblErrorMessages[2606]=[[Invalid comment format.]]; _tblErrorMessages[2607]=[[Zip test failed or out of memory.]]; _tblErrorMessages[2608]=[[User cancelled.]]; _tblErrorMessages[2609]=[[An error occurred when using a temp file.]]; _tblErrorMessages[2610]=[[A read or seek error occurred.]]; _tblErrorMessages[2611]=[[No files were added to the zip file.]]; _tblErrorMessages[2612]=[[Missing or empty zip file.]]; _tblErrorMessages[2613]=[[Error writing to a file.]]; _tblErrorMessages[2614]=[[Couldn't open to write.]]; _tblErrorMessages[2615]=[[Bad control parameters.]]; _tblErrorMessages[2616]=[[Could not complete operation.]]; _tblErrorMessages[2617]=[[Could not open a specified file to read.]]; _tblErrorMessages[2618]=[[Media error. Disk not ready, hardware read/write error.]]; _tblErrorMessages[2619]=[[Bad Multi-Volume control parameters.]]; _tblErrorMessages[2620]=[[Improper usage of a Multi-Volume Zip File.]]; _tblErrorMessages[2621]=[[Unexpected end of zip file, the zip file may be corrupted.]]; _tblErrorMessages[2622]=[[The internal structure of the zip file is invalid.]]; _tblErrorMessages[2623]=[[Out of memory, not enough memory was available to complete the action.]]; _tblErrorMessages[2624]=[[The zip file could not be found.]]; _tblErrorMessages[2625]=[[There was nothing to extract in the unzip action.]]; _tblErrorMessages[2626]=[[An error occurred when trying to extract to the same volume.]]; _tblErrorMessages[2627]=[[The index specified in the zip file was out of bounds.]]; _tblErrorMessages[2628]=[[An error occurred when creating the output file.]]; _tblErrorMessages[2629]=[[An error occurred when opening the zip file. The zip file may be locked or unavailable.]]; _tblErrorMessages[2630]=[[An extracted file has an incorrect CRC value and may be corrupted.]]; _tblErrorMessages[2631]=[[The operation has been canceled.]]; _tblErrorMessages[2632]=[[A file was skipped during the extraction because it is encrypted and no password was specified, or the password was incorrect.]]; _tblErrorMessages[2633]=[[A file was skipped because it used an unknown compression format.]]; _tblErrorMessages[2634]=[[Bad or missing decrypt code, either no password was specified, or the password was incorrect..]]; _tblErrorMessages[2635]=[[Busy error, the zip file could not be entered.]]; _tblErrorMessages[2636]=[[Could not extract volume ID item.]]; _tblErrorMessages[2637]=[[A bad command structure was used when attempting to unzip the file.]]; _tblErrorMessages[2638]=[[The operation was canceled through an internal function.]]; _tblErrorMessages[2639]=[[One or more of the files was skipped during the extraction phase. Usually this is caused by an incorrect password.]]; _tblErrorMessages[2640]=[[The destination disk was full, and no more information could be written to it.]]; _tblErrorMessages[2641]=[[The destination folder could not be created.]]; _tblErrorMessages[2700]=[[Could not register window class to create splash dialog.]]; _tblErrorMessages[2701]=[[Could not create Flash splash dialog.]]; _tblErrorMessages[2702]=[[Could not create image splash dialog.]]; _tblErrorMessages[2703]=[[Could not create video splash dialog.]]; _tblErrorMessages[2800]=[[An error occurred getting the current page name. No current page.]]; _tblErrorMessages[2801]=[[Could not load value.]]; _tblErrorMessages[2802]=[[Could not save value.]]; _tblErrorMessages[2803]=[[Error, could not get applications window handle.]]; _tblErrorMessages[2900]=[[An internal error occurred resolving the specified function.]]; _tblErrorMessages[2901]=[[A runtime error occurred while calling the function.]]; _tblErrorMessages[2902]=[[A memory allocation error occurred while calling the function.]]; _tblErrorMessages[3000]=[[An invalid index has been specified. Indices must be greater than or equal to -1.]]; _tblErrorMessages[3001]=[[The specified path is longer then MAX_PATH,or 260 characters.]]; _tblErrorMessages[3300]=[[The specified math value is not valid for the given function.]]; _tblErrorMessages[3400]=[[The item could not be found in the tree.]]; _tblErrorMessages[3401]=[[An error occurred when trying to update the item in the tree.]]; _tblErrorMessages[3402]=[[An error occurred when trying to insert the item into the tree.]]; _tblErrorMessages[3403]=[[Error, the tree's window is not valid. This action needs a valid window to succeed.]]; _tblErrorMessages[3404]=[[An internal pointer error has occurred.]]; _tblErrorMessages[3405]=[[An error occurred when trying to expand the specified item.]]; _tblErrorMessages[9999]=[[Unknown error.]]; _tblErrorMessages[34000]=[[String does not contain valid base-64 encoded data.]]; _tblErrorMessages[34001]=[[Error while attempting to decode base-64 encoded string (usually means string is corrupt - missing bytes in string?).]]; _tblErrorMessages[34002]=[[Invalid file header - not an Indigo Rose blowfish file.]]; _tblErrorMessages[34003]=[[Incompatible blowfish file. (The file has either been damaged or it uses an incompatible block padding scheme.)]]; _tblErrorMessages[37000]=[[Error loading XML file.]]; _tblErrorMessages[37001]=[[Error saving XML file.]]; _tblErrorMessages[37002]=[[No valid XML document loaded. (The document is empty or not well formed.)]]; _tblErrorMessages[37003]=[[The specified XML path is not valid or was not found.]]; _tblErrorMessages[37004]=[[An error occurred while trying to set the value.]]; _tblErrorMessages[37005]=[[An error occurred while trying to set the attribute.]]; _tblErrorMessages[37006]=[[Invalid attribute name. (Attribute names cannot contain spaces.)]]; _tblErrorMessages[37007]=[[The specified element could not be removed.]]; _tblErrorMessages[37008]=[[The specified attribute could not be removed.]]; _tblErrorMessages[37009]=[[There are no elements below the specified XML path.]]; _tblErrorMessages[37010]=[[The element at the specified XML path does not have any attributes.]]; _tblErrorMessages[37011]=[[An error occurred while trying to insert XML.]]; _tblErrorMessages[37012]=[[Invalid insertion mode.]]; if not _tblNotificationMessages then _tblNotificationMessages = {}; end -- Translatable messages: _tblNotificationMessages["MSG_FROM_CAP"]=[[From]]; _tblNotificationMessages["MSG_FROM"]=[[from]]; _tblNotificationMessages["MSG_TO_CAP"]=[[To]]; _tblNotificationMessages["MSG_TO"]=[[to]]; _tblNotificationMessages["MSG_COPYING"]=[[Copying]]; _tblNotificationMessages["MSG_INSTALLING"]=[[Installing]]; _tblNotificationMessages["MSG_MOVING"]=[[Moving]]; _tblNotificationMessages["MSG_DELETING"]=[[Deleting]]; _tblNotificationMessages["MSG_SEARCHING"]=[[Searching]]; _tblNotificationMessages["MSG_READING"]=[[Reading]]; _tblNotificationMessages["MSG_NOTICE"]=[[Notice]]; _tblNotificationMessages["MSG_ERROR"]=[[Error]]; _tblNotificationMessages["MSG_SAVING"]=[[Saving]]; _tblNotificationMessages["MSG_INSTALL_DO_YOU_WANT_OVERWRITE"]=[[Do you want to overwrite the following file?]]; _tblNotificationMessages["MSG_INSTALL_ALWAYS_ASK_OVERWRITE_MSG"]=[[The application would like to install a file, however a file with the same name already exists on your system.]]; _tblNotificationMessages["MSG_INSTALL_FILE_OLDER_MSG"]=[[The application would like to install a file, however a NEWER file with the same name already exists on your system.]]; _tblNotificationMessages["MSG_DOWNLOADING"]=[[Downloading]]; _tblNotificationMessages["MSG_DOWNLOADING_FILE"]=[[Downloading file...]]; _tblNotificationMessages["MSG_DOWNLOADING_FILE_UNKNOWN_TOTAL"]=[[Downloading file, total size is unknown. Kb downloaded so far: ]]; _tblNotificationMessages["MSG_SIZE_BYTES"]=[[bytes]]; _tblNotificationMessages["MSG_SIZE_KILOBYTES"]=[[KB]]; _tblNotificationMessages["MSG_SIZE_MEGABYTES"]=[[MB]]; _tblNotificationMessages["MSG_SIZE_GIGABYTES"]=[[GB]]; _tblNotificationMessages["MSG_REBOOT_FAILED"]=[[System reboot failed. Close all open applications and choose Retry.]]; _tblNotificationMessages["MSG_ESTIMATED_TIME_LEFT"]=[[Estimated time left]]; _tblNotificationMessages["MSG_KB_PER_SEC"]=[[KB/Sec]]; _tblNotificationMessages["MSG_QUERYING_INTERNET"]=[[Querying Internet]]; 6.0.5.0r.F&{5136EB8C-D071-4839-B0A0-B3923FC2C19F}AutoPlay&AMS Code Pretty Utility"AutoPlay\Icons\AMS_Code_Pretty.ico$AutoPlay\Images\frame_blue_w_tab.pngvv  function GetCaretPos(sInputName) local tblPos = Input.GetPos(sInputName) local nPos = DLL.CallFunction("AutoPlay\\DLLs\\GetCaretPos.DLL", "GetCurPos", Application.GetWndHandle()..","..tblPos.X..","..tblPos.Y, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL) return String.ToNumber(nPos) end function GetCaretRow(sInputName) local tblPos = Input.GetPos(sInputName) local nPos = DLL.CallFunction("AutoPlay\\DLLs\\GetCaretPos.DLL", "GetCurRow", Application.GetWndHandle()..","..tblPos.X..","..tblPos.Y, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL) return String.ToNumber(nPos) end function GetCaretPosInRow(sInputName) local tblPos = Input.GetPos(sInputName) local nPos = DLL.CallFunction("AutoPlay\\DLLs\\GetCaretPos.DLL", "GetCurPosInRow", Application.GetWndHandle()..","..tblPos.X..","..tblPos.Y, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL) return String.ToNumber(nPos) end function save_input_source() local text_org = Input.GetText("input_source"); TextFile.WriteFromString(source_temp_filepath, text_org, false); if (error_test("File Creation Error", source_temp_filepath) ~= 0) then return false; end return true; end function error_test(title, path) local err = Application.GetLastError (); if (err ~= 0) then Dialog.Message(title, _tblErrorMessages[err] .. "\r\n\r\n" .. path .. ""); end return err; end function conv_bool_2_text(bool_val) local out_val = "false"; if (bool_val == true) then out_val = "true"; end return out_val; end function conv_text_2_bool(text_val) local out_val = false; if (text_val == "true") then out_val = true; end return out_val; end function settings_get() convert_to_html = conv_text_2_bool(INIFile.GetValue(ini_filepath, "general", "convert_to_html")); html_fontsize = INIFile.GetValue(ini_filepath, "general", "html_fontsize"); number_lines = conv_text_2_bool(INIFile.GetValue(ini_filepath, "general", "number_lines")); comment_color = INIFile.GetValue(ini_filepath, "syntax", "comment_color"); comment_italic = conv_text_2_bool(INIFile.GetValue(ini_filepath, "syntax", "comment_italic")); comment_bold = conv_text_2_bool(INIFile.GetValue(ini_filepath, "syntax", "comment_bold")); quoted_color = INIFile.GetValue(ini_filepath, "syntax", "quoted_color"); quoted_italic = conv_text_2_bool(INIFile.GetValue(ini_filepath, "syntax", "quoted_italic")); quoted_bold = conv_text_2_bool(INIFile.GetValue(ini_filepath, "syntax", "quoted_bold")); keyword_color = INIFile.GetValue(ini_filepath, "syntax", "keyword_color"); keyword_italic = conv_text_2_bool(INIFile.GetValue(ini_filepath, "syntax", "keyword_italic")); keyword_bold = conv_text_2_bool(INIFile.GetValue(ini_filepath, "syntax", "keyword_bold")); punctuation_color = INIFile.GetValue(ini_filepath, "syntax", "punctuation_color"); punctuation_italic = conv_text_2_bool(INIFile.GetValue(ini_filepath, "syntax", "punctuation_italic")); punctuation_bold = conv_text_2_bool(INIFile.GetValue(ini_filepath, "syntax", "punctuation_bold")); end function settings_save() INIFile.SetValue(ini_filepath, "general", "convert_to_html", conv_bool_2_text(convert_to_html)); INIFile.SetValue(ini_filepath, "general", "html_fontsize", html_fontsize); INIFile.SetValue(ini_filepath, "general", "number_lines", conv_bool_2_text(number_lines)); INIFile.SetValue(ini_filepath, "syntax", "comment_color", comment_color); INIFile.SetValue(ini_filepath, "syntax", "comment_italic", conv_bool_2_text(comment_italic)); INIFile.SetValue(ini_filepath, "syntax", "comment_bold", conv_bool_2_text(comment_bold)); INIFile.SetValue(ini_filepath, "syntax", "quoted_color", quoted_color); INIFile.SetValue(ini_filepath, "syntax", "quoted_italic", conv_bool_2_text(quoted_italic)); INIFile.SetValue(ini_filepath, "syntax", "quoted_bold", conv_bool_2_text(quoted_bold)); INIFile.SetValue(ini_filepath, "syntax", "keyword_color", keyword_color); INIFile.SetValue(ini_filepath, "syntax", "keyword_italic", conv_bool_2_text(keyword_italic)); INIFile.SetValue(ini_filepath, "syntax", "keyword_bold", conv_bool_2_text(keyword_bold)); INIFile.SetValue(ini_filepath, "syntax", "punctuation_color", punctuation_color); INIFile.SetValue(ini_filepath, "syntax", "punctuation_italic", conv_bool_2_text(punctuation_italic)); INIFile.SetValue(ini_filepath, "syntax", "punctuation_bold", conv_bool_2_text(punctuation_bold)); end function restore_defaults() convert_to_html = true; html_fontsize = "9"; number_lines = true; comment_color = "#008000"; comment_italic = true; comment_bold = false; quoted_color = "#800080"; quoted_italic = false; quoted_bold = false; keyword_color = "#0000FF"; keyword_italic = false; keyword_bold = true; punctuation_color = "#FF0000"; punctuation_italic = false; punctuation_bold = false; settings_save(); end _PageFirstAutoPlay\Audio\High1.oggAutoPlay\Audio\Click1.ogg0Clipboard\Clipboard.lmdRunSilent\RunSilent.lmd CIRMenuItemd Main Menu &1e Sub Menu &1f Sub Menu &2 Main Menu &2 Sub Menu &1 Sub Menu &2CIREvent On Startup -- load external code require("code_pretty.luac"); require("ams_extras.luac"); require("color_dialog.luac"); -- allow only one instance --exitDuplicateInstance("AMS Code Pretty Utility", true, false); duplicate_msg = "AMS Code Pretty Duplicate Encountered"; exitDuplicateInstanceByProcess(appNameOriginal() .. ".exe", duplicate_msg, "AMS Code Pretty Utility", true, false); -- test if a command line parameter is /tray app_autostart = false; cmd_tray = "/tray"; if (Table.Count(_CommandLineArgs) > 0) then for i = 1, Table.Count(_CommandLineArgs) do if (_CommandLineArgs[i] == cmd_tray) then Application.Minimize(); app_autostart = true; break; end end end -- backup registry print data MSIE_PageSetup_Backup(); -- init page functionality page_current = "page_source"; input_source_pos = 0; input_source_row = 0; input_source_folder = ""; output_dest_folder = ""; compile_dest_folder = ""; -- init file paths html_path = "AutoPlay\\HTML\\"; html_file_template = "web_template.html"; html_file_template_print = "web_template_print.html"; html_file_template_save = "web_template_save.html"; html_file_dest = "code_pretty.html"; html_file_dest_print = "code_pretty_print.html"; html_file_dest_save = "code_pretty_save.html"; html_file_processing = "processing.html"; source_temp_filepath = "AutoPlay\\Docs\\source_temp.txt"; html_help_file = "help_overview.html"; ini_filepath = appPathOriginal() .. "AMS_Code_Pretty.ini"; -- build keywords list str_keywords = "and,break,do,dofile,else,elseif,end,false,for,function,if,in,local,not,or,repeat,"; str_keywords = str_keywords .. "return,require,table,then,this,true,type,until,while,"; keywords = StringToTable(str_keywords, ","); -- nil is handled elsewhere -- All LUA Code, Function List, Function List Sorted, INI File, or XML File conv_category = "All LUA Code"; -- init control variables str_comment_token = "--"; str_multiline_comment_start = "--[["; str_multiline_comment_end = "]]"; pad_number_lines = "  "; pad_tab = "    "; -- assorted user settings print_header = "Syntax Highlighted"; -- create ini file, if needed if (File.DoesExist(ini_filepath) == false) then restore_defaults(); else settings_get(); end  On Shutdown= -- restore registry print data MSIE_PageSetup_Restore(); cnumber e_WindowWidth, number e_WindowHeight, number e_PageWidth, number e_PageHeight, number e_TypeOn Sizenumber e_ID, table e_ItemInfoOn Menu page_source$AutoPlay\Images\frame_blue_w_tab.png  On Preload Page.StartTimer(1000); On Show page_current = "page_source"; Page.SetFocus("input_source"); Input.SetSelection("input_source", input_source_pos + 1, input_source_pos); Input.ScrollToLine("input_source", input_source_row); On CloseOn Timer' if (Clipboard.GetText() == duplicate_msg) then Clipboard.CopyText(""); Application.Restore(); wdwCenterToScreen(Application.GetWndHandle()); parms = Application.GetWndHandle(); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "BringWindowToTop", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "SetForegroundWindow", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "SetFocus", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); end  number e_Channel, string e_StateOn Audiocnumber e_WindowWidth, number e_WindowHeight, number e_PageWidth, number e_PageHeight, number e_TypeOn Sizenumber e_ID, table e_ItemInfoOn Menunumber e_Key, table e_ModifiersOn Key%number e_Type, number e_X, number e_YOn Mouse Buttonnumber e_X, number e_Y On Mouse MoveCAutoPlayButtonObjectbtn_help9ROn Click if (page_current ~= "page_help") then input_source_pos = GetCaretPos("input_source"); input_source_row = GetCaretRow("input_source"); save_input_source(); Page.Jump("page_help"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btnHelpVerdanabtn_output_previewc9ROn Click if (page_current ~= "page_output_preview") then input_source_pos = GetCaretPos("input_source"); input_source_row = GetCaretRow("input_source"); save_input_source(); Page.Jump("page_output_preview"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btnOutput PreviewVerdanabtn_output_settings9^ROn Click if (page_current ~= "page_output_settings") then input_source_pos = GetCaretPos("input_source"); input_source_row = GetCaretRow("input_source"); save_input_source(); Page.Jump("page_output_settings"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btnOutput SettingsVerdanabtn_source_codeA9ROn ClickL if (page_current ~= "page_source") then Page.Jump("page_source"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012.btn Source CodeVerdanaCAutoPlayTextObjectlbl_title_shadow@ +On ClickOn Right-ClickOn EnterOn LeaveAMS Code PrettyVerdana, lbl_titleA ,On ClickOn Right-ClickOn EnterOn LeaveAMS Code PrettyVerdanaCAutoPlayImageObjectimgExit(Exit ApplicationOn Clicka if (app_autostart == true) then hWnd = Application.GetWndHandle(); sTitle = " Exit Application?"; sMsg = "This program was started with Windows.\n\n" .. "Would you rather just minimize it to the system tray?\n\n"; sButtons = "YES_NO_CANCEL"; sIcon = "ICON_QUESTION"; sIcon_File = ""; sCheckText = "NONE"; nFont_Size = 10; nText_Color = "-1"; sFont_Bold = "YES"; sHide_Title_Bar = "NO"; sStyle = "NORMAL"; nBG_Color = "-1"; nWidth = 350; nHeight = 150; result = DLL.CallFunction("AutoPlay\\DLLs\\xDialog_Message.dll", "Show_Msg", "\""..sTitle.."\",\""..sMsg.."\",\""..sCheckText.."\",\""..sButtons.."\",\""..sIcon.."\",\""..sIcon_File.."\",\""..nFont_Size.."\",\""..sFont_Bold.."\",\""..nBG_Color.."\",\""..nText_Color.."\",\""..sStyle.."\",\""..sHide_Title_Bar.."\",\""..nWidth.."\",\""..nHeight.."\",\""..hWnd.."\"", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL) if (result == "YES") then Application.Minimize(); return end end Audio.Load(CHANNEL_BACKGROUND, _SourceFolder .. "\\AutoPlay\\Audio\\mfm_Close.wav", true, false); Application.Sleep(750); Application.Exit(); On Right-ClickOn Enter tProperties = Image.GetProperties("imgExit"); tProperties.ImageFile = "AutoPlay\\Images\\" .. "exit_yellow_light.png"; Image.SetProperties("imgExit", {ImageFile=tProperties.ImageFile}); On Leave tProperties = Image.GetProperties("imgExit"); tProperties.ImageFile = "AutoPlay\\Images\\" .. "exit_blue.png"; Image.SetProperties("imgExit", {ImageFile=tProperties.ImageFile}); AutoPlay\Images\exit_blue.png dAutoPlay\Audio\mfm_Close.wav7 imgMinimize)#Minimize Application to System TrayOn Click Application.Minimize(); On Right-ClickOn Enter tProperties = Image.GetProperties("imgMinimize"); tProperties.ImageFile = _SourceFolder .. "\\AutoPlay\\Images\\" .. "minimize_yellow_light.png"; Image.SetProperties("imgMinimize", {ImageFile=tProperties.ImageFile}); On Leave tProperties = Image.GetProperties("imgMinimize"); tProperties.ImageFile = _SourceFolder .. "\\AutoPlay\\Images\\" .. "minimize_blue.png"; Image.SetProperties("imgMinimize", {ImageFile=tProperties.ImageFile}); !AutoPlay\Images\minimize_blue.png dAutoPlay\Audio\mfm_Rollup.wavCAutoPlayEditFieldObject input_source1number e_Key, table e_ModifiersOn Keyd input_source_pos = GetCaretPos("input_source"); input_source_row = GetCaretRow("input_source"); On Focus Courier New  btn_clearTZ{On Clickt Input.SetText("input_source", ""); print_header = ""; input_source_file = ""; conv_category = "All LUA Code"; On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btn Clear SourceVerdana btn_pasteZJ{On Click  text_org = Input.GetText("input_source"); if (Clipboard.IsTextAvailable() == true) then text_clip = Clipboard.GetText(); text_out = text_org .. "\r\n" .. text_clip; Input.SetText("input_source", text_out); Page.SetFocus("input_source"); print_header = ""; input_source_file = ""; Input.ScrollToLine("input_source", -1); Input.SetSelection("input_source", String.Length(text_out) + 1, -1); input_source_pos = String.Length(text_out) + 1; input_source_row = GetCaretRow("input_source"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btn Paste SourceVerdanabtn_open2Z{On Click -- create new default source path ir_folder_base = input_source_folder; if (ir_folder_base == "") then -- test for version folders (20.0 down to 5.0) app_data_folder = Shell.GetFolder(SHF_APPLICATIONDATA) .. "\\IndigoRose\\"; ir_folder_str = "AutoPlay Media Studio @.0 Professional"; ir_folder_base = ""; for i = 20, 5, -1 do test_folder = String.Replace(ir_folder_str, "@", i); if (Folder.DoesExist(app_data_folder .. test_folder)) then ir_folder_base = test_folder; break; end end -- now, create the new default source path if (ir_folder_base ~= "") then ir_folder_base = app_data_folder .. ir_folder_base; XML.Load(ir_folder_base .. "\\Preferences.xml"); ir_folder_base = XML.GetValue("Preferences/Folders/ProjectBaseFolder"); if (ir_folder_base == nil) then ir_folder_base = Shell.GetFolder(SHF_MYDOCUMENTS); end if (ir_folder_base == "") then ir_folder_base = Shell.GetFolder(SHF_MYDOCUMENTS); end else ir_folder_base = Shell.GetFolder(SHF_MYDOCUMENTS); end end -- open dialog files_sel = Dialog.FileBrowse(true, "Open/Insert Source File", ir_folder_base, "Source Files (*.lua, *.ini, *.xml, *.txt)|*.lua;*.ini;*.xml;*.txt|", "", "lua", false, true); -- check for user cancel if (files_sel[1] == nil) then Page.SetFocus("input_source"); return; end if (files_sel[1] == "CANCEL") then Page.SetFocus("input_source"); return; end -- set new default print header path_parts = String.SplitPath(files_sel[1]); input_source_folder = path_parts.Drive .. path_parts.Folder; input_source_file = path_parts.Filename .. path_parts.Extension; print_header = input_source_file; -- possibly set new conversion type if (String.Lower(path_parts.Extension) == ".ini") then conv_category = "INI File"; elseif (String.Lower(path_parts.Extension) == ".xml") then conv_category = "XML File"; else conv_cateogry = "All LUA Code"; end -- open the file and display it user_source = TextFile.ReadToString(files_sel[1]); if (error_test("File Access Error", files_sel[1]) ~= 0) then return; end text_org = Input.GetText("input_source"); text_out = text_org .. "\r\n" .. user_source; Input.SetText("input_source", text_out); Page.SetFocus("input_source"); -- set input position variables Input.ScrollToLine("input_source", -1); Input.SetSelection("input_source", String.Length(text_out) + 1, -1); input_source_pos = String.Length(text_out) + 1; input_source_row = GetCaretRow("input_source"); On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btnInsert File...Verdana,lbl_input_source2On ClickOn Right-ClickOn EnterOn LeaveAMS / LUA Source Code:Verdana,lbl_tipLOn ClickOn Right-ClickOn EnterOn Leave9(new code will be inserted at the current caret position)Verdana,lbl_visit_ams_forums }On Click3 File.Open("http://www.indigorose.com/forums/"); On Right-ClickOn EnterOn LeaveVisit Indigo Rose AMS ForumsVerdana btn_compileZl{On Click -- check for empty text this_text = Input.GetText("input_source"); this_text = String.TrimLeft(String.TrimRight(this_text)); if (this_text == "") then Dialog.Message("Compile Error", "What?\r\n\r\nThere is no source code in the input box.\r\n\r\nYou need to either Insert a File, Paste Code, or Type Code first."); return; end -- save it dialog if (compile_dest_folder == "") then compile_dest_folder = Shell.GetFolder(SHF_MYDOCUMENTS) .. "\\"; end compile_file_name = "ams_code_pretty.luac"; nPos = String.Find(print_header, ".lua"); if (nPos > 0) then path_parts = String.SplitPath(input_source_folder); compile_dest_folder = path_parts.Drive .. path_parts.Folder; if (compile_dest_folder == "") then compile_dest_folder = Shell.GetFolder(SHF_MYDOCUMENTS) .. "\\"; end compile_file_name = String.Left(print_header, nPos - 1) .. ".luac"; end files_sel = Dialog.FileBrowse(false, "Compile As", compile_dest_folder, "Compiled LUA Files (*.luac, *.out)|*.luac;*.out|", compile_file_name, "luac", false, false); -- check for user cancel if (files_sel[1] == nil) then Page.SetFocus("input_source"); return; end if (files_sel[1] == "CANCEL") then Page.SetFocus("input_source"); return; end -- create new default save as path path_parts = String.SplitPath(files_sel[1]); compile_dest_folder = path_parts.Drive .. path_parts.Folder; -- check for existing file if (File.DoesExist(files_sel[1])) then dlg_msg = "A file by this name already exists.\r\n\r\n" .. files_sel[1] .. "\r\n\r\nDo you want to overwrite this file?"; answer = Dialog.Message("Overwrite Existing File?", dlg_msg, MB_YESNOCANCEL, MB_ICONQUESTION, 0); if (answer ~= IDYES) then Page.SetFocus("input_source"); return; else File.Delete(files_sel[1], false, false, true, nil); end end -- create the temp file if (save_input_source() == false) then Page.SetFocus("input_source"); return; end -- finally, compile it --File.Run("AutoPlay\\Docs\\LuaCompile.exe", "-o \"" .. files_sel[1] .. "\" \"" .. _SourceFolder .. "\\" .. source_temp_filepath .. "\"", "", SW_SHOWNORMAL, true); RunSilent.Exec(_SourceFolder .. "\\AutoPlay\\Docs\\LuaCompile.exe", "-o \"" .. files_sel[1] .. "\" \"" .. _SourceFolder .. "\\" .. source_temp_filepath .. "\""); -- successful, so prompt to open the output folder if (File.DoesExist(files_sel[1]) == true) then hWnd = Application.GetWndHandle(); sTitle = " Finished"; sMsg = "Your file has been successfully compiled.\n\n" .. "" .. path_parts.Filename .. path_parts.Extension .. "\n\n"; sButtons = "OK"; sIcon = "ICON_CUSTOM"; sIcon_File = _SourceFolder .. "\\AutoPlay\\Icons\\ams_compiled_code.ico"; sCheckText = " Open Output Folder"; nFont_Size = 10; nText_Color = "-1"; sFont_Bold = "YES"; sHide_Title_Bar = "NO"; sStyle = "NORMAL"; nBG_Color = "-1"; nWidth = 350; nHeight = 120; result = DLL.CallFunction("AutoPlay\\DLLs\\xDialog_Message.dll", "Show_Msg", "\""..sTitle.."\",\""..sMsg.."\",\""..sCheckText.."\",\""..sButtons.."\",\""..sIcon.."\",\""..sIcon_File.."\",\""..nFont_Size.."\",\""..sFont_Bold.."\",\""..nBG_Color.."\",\""..nText_Color.."\",\""..sStyle.."\",\""..sHide_Title_Bar.."\",\""..nWidth.."\",\""..nHeight.."\",\""..hWnd.."\"", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL) nPos = String.Find(result, "|", 1, false) if nPos == -1 then sClicked = result else sClicked = String.Left(result, nPos - 1) sChecked = String.Mid(result, nPos + 1, 11) end if (sChecked == "CHECKED") then File.ExploreFolder(compile_dest_folder); else Page.SetFocus("input_source"); end else Dialog.Message("Compile Error", "The file could not be compiled.\r\n\r\n" .. files_sel[1] .. ""); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btn Compile As...Verdana,lbl_visit_ams_resource_center 3On Click3 File.Open("http://www.amsresourcecenter.com/"); On Right-ClickOn EnterOn LeaveVisit the AMS Resource CenterVerdanapage_output_settings$AutoPlay\Images\frame_blue_w_tab.png  On Preload Page.StartTimer(1000); -- auto startup startup_folder = Shell.GetFolder(SHF_STARTUP_COMMON) .. "\\"; link_name = String.Replace(appNameOriginal(), "_", " "); link_filepath = startup_folder .. link_name .. ".lnk"; if (File.DoesExist(link_filepath) == true) then Button.SetState("chk_startup", 1); else Button.SetState("chk_startup", 0); end -- code type for i = 1, ComboBox.GetCount("cbo_code_type") do if (ComboBox.GetItemText("cbo_code_type", i) == conv_category) then ComboBox.SetSelected("cbo_code_type", i); break; end end -- html and line numbers if (convert_to_html == true) then Button.SetState("chk_convert_to_html", 1); else Button.SetState("chk_convert_to_html", 0); end if (number_lines == true) then Button.SetState("chk_number_lines", 1); else Button.SetState("chk_number_lines", 0); end -- font size fontsize = String.ToNumber(html_fontsize); ComboBox.SetSelected("cbo_fontsize", fontsize - 5); -- comments if (comment_bold == true) then Button.SetState("chk_comment_bold", 1); end if (comment_italic == true) then Button.SetState("chk_comment_italic", 1); end if (comment_bold == false) then Button.SetState("chk_comment_bold", 0); end if (comment_italic == false) then Button.SetState("chk_comment_italic", 0); end color_str = String.Right(comment_color, 6); Shape.SetFillColor("box_comment_color", Math.HexColorToNumber(color_str)); -- keywords if (keyword_bold == true) then Button.SetState("chk_keyword_bold", 1); end if (keyword_italic == true) then Button.SetState("chk_keyword_italic", 1); end if (keyword_bold == false) then Button.SetState("chk_keyword_bold", 0); end if (keyword_italic == false) then Button.SetState("chk_keyword_italic", 0); end color_str = String.Right(keyword_color, 6); Shape.SetFillColor("box_keyword_color", Math.HexColorToNumber(color_str)); -- punctuation if (punctuation_bold == true) then Button.SetState("chk_punctuation_bold", 1); end if (punctuation_italic == true) then Button.SetState("chk_punctuation_italic", 1); end if (punctuation_bold == false) then Button.SetState("chk_punctuation_bold", 0); end if (punctuation_italic == false) then Button.SetState("chk_punctuation_italic", 0); end color_str = String.Right(punctuation_color, 6); Shape.SetFillColor("box_punctuation_color", Math.HexColorToNumber(color_str)); -- strings if (quoted_bold == true) then Button.SetState("chk_quoted_bold", 1); end if (quoted_italic == true) then Button.SetState("chk_quoted_italic", 1); end if (quoted_bold == false) then Button.SetState("chk_quoted_bold", 0); end if (quoted_italic == false) then Button.SetState("chk_quoted_italic", 0); end color_str = String.Right(quoted_color, 6); Shape.SetFillColor("box_quoted_color", Math.HexColorToNumber(color_str)); On Show* page_current = "page_output_settings"; On CloseOn Timer' if (Clipboard.GetText() == duplicate_msg) then Clipboard.CopyText(""); Application.Restore(); wdwCenterToScreen(Application.GetWndHandle()); parms = Application.GetWndHandle(); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "BringWindowToTop", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "SetForegroundWindow", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "SetFocus", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); end  number e_Channel, string e_StateOn Audiocnumber e_WindowWidth, number e_WindowHeight, number e_PageWidth, number e_PageHeight, number e_TypeOn Sizenumber e_ID, table e_ItemInfoOn Menunumber e_Key, table e_ModifiersOn Key%number e_Type, number e_X, number e_YOn Mouse Buttonnumber e_X, number e_Y On Mouse Move27img_bkg1On ClickOn Right-ClickOn EnterOn LeaveAutoPlay\Images\web_sim.png Kbtn_help9ROn ClickH if (page_current ~= "page_help") then Page.Jump("page_help"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btnHelpVerdanabtn_output_previewc9ROn Click\ if (page_current ~= "page_output_preview") then Page.Jump("page_output_preview"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btnOutput PreviewVerdanabtn_output_settings9^ROn Click^ if (page_current ~= "page_output_settings") then Page.Jump("page_output_settings"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012.btnOutput SettingsVerdanabtn_source_codeA9ROn ClickL if (page_current ~= "page_source") then Page.Jump("page_source"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btn Source CodeVerdana,lbl_title_shadow@ +On ClickOn Right-ClickOn EnterOn LeaveAMS Code PrettyVerdana, lbl_titleA ,On ClickOn Right-ClickOn EnterOn LeaveAMS Code PrettyVerdana7imgExit(Exit ApplicationOn Clicka if (app_autostart == true) then hWnd = Application.GetWndHandle(); sTitle = " Exit Application?"; sMsg = "This program was started with Windows.\n\n" .. "Would you rather just minimize it to the system tray?\n\n"; sButtons = "YES_NO_CANCEL"; sIcon = "ICON_QUESTION"; sIcon_File = ""; sCheckText = "NONE"; nFont_Size = 10; nText_Color = "-1"; sFont_Bold = "YES"; sHide_Title_Bar = "NO"; sStyle = "NORMAL"; nBG_Color = "-1"; nWidth = 350; nHeight = 150; result = DLL.CallFunction("AutoPlay\\DLLs\\xDialog_Message.dll", "Show_Msg", "\""..sTitle.."\",\""..sMsg.."\",\""..sCheckText.."\",\""..sButtons.."\",\""..sIcon.."\",\""..sIcon_File.."\",\""..nFont_Size.."\",\""..sFont_Bold.."\",\""..nBG_Color.."\",\""..nText_Color.."\",\""..sStyle.."\",\""..sHide_Title_Bar.."\",\""..nWidth.."\",\""..nHeight.."\",\""..hWnd.."\"", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL) if (result == "YES") then Application.Minimize(); return end end Audio.Load(CHANNEL_BACKGROUND, _SourceFolder .. "\\AutoPlay\\Audio\\mfm_Close.wav", true, false); Application.Sleep(750); Application.Exit(); On Right-ClickOn Enter tProperties = Image.GetProperties("imgExit"); tProperties.ImageFile = "AutoPlay\\Images\\" .. "exit_yellow_light.png"; Image.SetProperties("imgExit", {ImageFile=tProperties.ImageFile}); On Leave tProperties = Image.GetProperties("imgExit"); tProperties.ImageFile = "AutoPlay\\Images\\" .. "exit_blue.png"; Image.SetProperties("imgExit", {ImageFile=tProperties.ImageFile}); AutoPlay\Images\exit_blue.png dAutoPlay\Audio\mfm_Close.wav7 imgMinimize)#Minimize Application to System TrayOn Click Application.Minimize(); On Right-ClickOn Enter tProperties = Image.GetProperties("imgMinimize"); tProperties.ImageFile = _SourceFolder .. "\\AutoPlay\\Images\\" .. "minimize_yellow_light.png"; Image.SetProperties("imgMinimize", {ImageFile=tProperties.ImageFile}); On Leave tProperties = Image.GetProperties("imgMinimize"); tProperties.ImageFile = _SourceFolder .. "\\AutoPlay\\Images\\" .. "minimize_blue.png"; Image.SetProperties("imgMinimize", {ImageFile=tProperties.ImageFile}); !AutoPlay\Images\minimize_blue.png dAutoPlay\Audio\mfm_Rollup.wav,lbl_visit_ams_forums }On Click3 File.Open("http://www.indigorose.com/forums/"); On Right-ClickOn EnterOn LeaveVisit Indigo Rose AMS ForumsVerdanabtn_save2Z{On Clickb settings_save(); hWnd = Application.GetWndHandle(); sTitle = " Settings Saved"; sMsg = "Your current settings been successfully saved.\n\n" .. "These will be the new startup settings for this program.\n\n"; sButtons = "OK"; sIcon = "ICON_EXCLAMATION"; sIcon_File = ""; sCheckText = "NONE"; nFont_Size = 10; nText_Color = "-1"; sFont_Bold = "YES"; sHide_Title_Bar = "NO"; sStyle = "NORMAL"; nBG_Color = "-1"; nWidth = 350; nHeight = 150; result = DLL.CallFunction("AutoPlay\\DLLs\\xDialog_Message.dll", "Show_Msg", "\""..sTitle.."\",\""..sMsg.."\",\""..sCheckText.."\",\""..sButtons.."\",\""..sIcon.."\",\""..sIcon_File.."\",\""..nFont_Size.."\",\""..sFont_Bold.."\",\""..nBG_Color.."\",\""..nText_Color.."\",\""..sStyle.."\",\""..sHide_Title_Bar.."\",\""..nWidth.."\",\""..nHeight.."\",\""..hWnd.."\"", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL) On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btn Save SettingsVerdana btn_defaultsZJ{On Click\ conv_category = "All LUA Code"; restore_defaults(); Page.Jump("page_output_settings"); On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btnRestore DefaultsVerdanachk_convert_to_htmlCPOn Click state = Button.GetState("chk_convert_to_html"); --state = Math.Abs(state - 1); --Button.SetState("chk_convert_to_html", state); if (state == 0) then convert_to_html = false; end if (state == 1) then convert_to_html = true; end On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdana,lbl_convert_to_htmlUXOn Click state = Button.GetState("chk_convert_to_html"); state = Math.Abs(state - 1); Button.SetState("chk_convert_to_html", state); if (state == 0) then convert_to_html = false; end if (state == 1) then convert_to_html = true; end On Right-ClickOn EnterOn Leave#Convert to HTML (otherwise BB Code)Verdanachk_number_linesCPOn Click state = Button.GetState("chk_number_lines"); --state = Math.Abs(state - 1); --Button.SetState("chk_number_lines", state); if (state == 0) then number_lines = false; end if (state == 1) then number_lines = true; end On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdana,lbl_number_linesUAOn Click state = Button.GetState("chk_number_lines"); state = Math.Abs(state - 1); Button.SetState("chk_number_lines", state); if (state == 0) then number_lines = false; end if (state == 1) then number_lines = true; end On Right-ClickOn EnterOn Leave!Number Output Lines (left margin)VerdanaCAutoPlayComboBoxObject cbo_fontsizeanumber e_Selection On SelectY fontsize = ComboBox.GetSelected("cbo_fontsize") + 5; html_fontsize = fontsize .. ""; number e_Key, table e_ModifiersOn KeyOn FocusVerdana  CListBoxItem6̀7̀8̀9̀10̀11̀12̀13̀14̀15̀16̀17̀18,lbl_html_fontsizeOn ClickOn Right-ClickOn EnterOn Leave Font Size:Verdanachk_comment_boldCP On Click state = Button.GetState("chk_comment_bold"); --state = Math.Abs(state - 1); --Button.SetState("chk_comment_bold", state); if (state == 0) then comment_bold = false; end if (state == 1) then comment_bold = true; end On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdana,lbl_comment_boldU'On Click state = Button.GetState("chk_comment_bold"); state = Math.Abs(state - 1); Button.SetState("chk_comment_bold", state); if (state == 0) then comment_bold = false; end if (state == 1) then comment_bold = true; end On Right-ClickOn EnterOn Leave Comments BoldVerdanachk_comment_italicC2P?On Click state = Button.GetState("chk_comment_italic"); --state = Math.Abs(state - 1); --Button.SetState("chk_comment_italic", state); if (state == 0) then comment_italic = false; end if (state == 1) then comment_italic = true; end On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdana,lbl_comment_italicU2FOn Click state = Button.GetState("chk_comment_italic"); state = Math.Abs(state - 1); Button.SetState("chk_comment_italic", state); if (state == 0) then comment_italic = false; end if (state == 1) then comment_italic = true; end On Right-ClickOn EnterOn LeaveComments ItalicVerdanaCAutoPlayPluginObject(box_comment_colorCQP^On ClickL color_str = String.Right(comment_color, 6); nColor = xqColor.Choose(color_str); Shape.SetFillColor("box_comment_color", nColor); comment_color = "#" .. xqColor.ToHex(nColor); --[[ color_str = String.Right(comment_color, 6); tblColorInfo = ColorDialog.Show(Math.HexColorToNumber(color_str)); if (tblColorInfo) then nDecimal = tblColorInfo.Decimal; nRed = tblColorInfo.Red; nGreen = tblColorInfo.Green; nBlue = tblColorInfo.Blue; sHex = tblColorInfo.Hex; Shape.SetFillColor("box_comment_color", nDecimal); comment_color = "#" .. sHex; end ]]On EnterOn LeaveShape\Shape.apo1,0,0,1,0,16777215,7,7,lbl_comment_colorUQeOn ClickL color_str = String.Right(comment_color, 6); nColor = xqColor.Choose(color_str); Shape.SetFillColor("box_comment_color", nColor); comment_color = "#" .. xqColor.ToHex(nColor); --[[ color_str = String.Right(comment_color, 6); tblColorInfo = ColorDialog.Show(Math.HexColorToNumber(color_str)); if (tblColorInfo) then nDecimal = tblColorInfo.Decimal; nRed = tblColorInfo.Red; nGreen = tblColorInfo.Green; nBlue = tblColorInfo.Blue; sHex = tblColorInfo.Hex; Shape.SetFillColor("box_comment_color", nDecimal); comment_color = "#" .. sHex; end ]]On Right-ClickOn EnterOn LeaveComments ColorVerdana,lbl_output_settings2On ClickOn Right-ClickOn EnterOn LeaveOutput Settings:Verdana,lbl_tipROn ClickOn Right-ClickOn EnterOn Leave8(settings are for this session unless you Save Settings)Verdanachk_keyword_boldCPOn Click state = Button.GetState("chk_keyword_bold"); --state = Math.Abs(state - 1); --Button.SetState("chk_keyword_bold", state); if (state == 0) then keyword_bold = false; end if (state == 1) then keyword_bold = true; end On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdana,lbl_keyword_boldUOn Click state = Button.GetState("chk_keyword_bold"); state = Math.Abs(state - 1); Button.SetState("chk_keyword_bold", state); if (state == 0) then keyword_bold = false; end if (state == 1) then keyword_bold = true; end On Right-ClickOn EnterOn Leave Keywords BoldVerdanachk_keyword_italicCPOn Click state = Button.GetState("chk_keyword_italic"); --state = Math.Abs(state - 1); --Button.SetState("chk_keyword_italic", state); if (state == 0) then keyword_italic = false; end if (state == 1) then keyword_italic = true; end On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdana,lbl_keyword_italicUOn Click state = Button.GetState("chk_keyword_italic"); state = Math.Abs(state - 1); Button.SetState("chk_keyword_italic", state); if (state == 0) then keyword_italic = false; end if (state == 1) then keyword_italic = true; end On Right-ClickOn EnterOn LeaveKeywords ItalicVerdana(box_keyword_colorCPOn ClickL color_str = String.Right(keyword_color, 6); nColor = xqColor.Choose(color_str); Shape.SetFillColor("box_keyword_color", nColor); keyword_color = "#" .. xqColor.ToHex(nColor); --[[ color_str = String.Right(keyword_color, 6); tblColorInfo = ColorDialog.Show(Math.HexColorToNumber(color_str)); if (tblColorInfo) then nDecimal = tblColorInfo.Decimal; nRed = tblColorInfo.Red; nGreen = tblColorInfo.Green; nBlue = tblColorInfo.Blue; sHex = tblColorInfo.Hex; Shape.SetFillColor("box_keyword_color", nDecimal); keyword_color = "#" .. sHex; end ]]On EnterOn LeaveShape\Shape.apo1,0,0,1,0,16777215,7,7,lbl_keyword_colorUOn ClickL color_str = String.Right(keyword_color, 6); nColor = xqColor.Choose(color_str); Shape.SetFillColor("box_keyword_color", nColor); keyword_color = "#" .. xqColor.ToHex(nColor); --[[ color_str = String.Right(keyword_color, 6); tblColorInfo = ColorDialog.Show(Math.HexColorToNumber(color_str)); if (tblColorInfo) then nDecimal = tblColorInfo.Decimal; nRed = tblColorInfo.Red; nGreen = tblColorInfo.Green; nBlue = tblColorInfo.Blue; sHex = tblColorInfo.Hex; Shape.SetFillColor("box_keyword_color", nDecimal); keyword_color = "#" .. sHex; end ]]On Right-ClickOn EnterOn LeaveKeywords ColorVerdana,lbl_punctuation_bold('On Click state = Button.GetState("chk_punctuation_bold"); state = Math.Abs(state - 1); Button.SetState("chk_punctuation_bold", state); if (state == 0) then punctuation_bold = false; end if (state == 1) then punctuation_bold = true; end On Right-ClickOn EnterOn LeavePunctuation BoldVerdanachk_punctuation_bold On Click state = Button.GetState("chk_punctuation_bold"); --state = Math.Abs(state - 1); --Button.SetState("chk_punctuation_bold", state); if (state == 0) then punctuation_bold = false; end if (state == 1) then punctuation_bold = true; end On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdanachk_punctuation_italic2?On Click state = Button.GetState("chk_punctuation_italic"); --state = Math.Abs(state - 1); --Button.SetState("chk_punctuation_italic", state); if (state == 0) then punctuation_italic = false; end if (state == 1) then punctuation_italic = true; end On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdana,lbl_punctuation_italic2,FOn Click state = Button.GetState("chk_punctuation_italic"); state = Math.Abs(state - 1); Button.SetState("chk_punctuation_italic", state); if (state == 0) then punctuation_italic = false; end if (state == 1) then punctuation_italic = true; end On Right-ClickOn EnterOn LeavePunctuation ItalicVerdana(box_punctuation_colorQ^On Clickf color_str = String.Right(punctuation_color, 6); nColor = xqColor.Choose(color_str); Shape.SetFillColor("box_punctuation_color", nColor); punctuation_color = "#" .. xqColor.ToHex(nColor); --[[ color_str = String.Right(punctuation_color, 6); tblColorInfo = ColorDialog.Show(Math.HexColorToNumber(color_str)); if (tblColorInfo) then nDecimal = tblColorInfo.Decimal; nRed = tblColorInfo.Red; nGreen = tblColorInfo.Green; nBlue = tblColorInfo.Blue; sHex = tblColorInfo.Hex; Shape.SetFillColor("box_punctuation_color", nDecimal); punctuation_color = "#" .. sHex; end ]] On EnterOn LeaveShape\Shape.apo1,0,0,1,0,16777215,7,7,lbl_punctuation_colorQ-eOn Clickf color_str = String.Right(punctuation_color, 6); nColor = xqColor.Choose(color_str); Shape.SetFillColor("box_punctuation_color", nColor); punctuation_color = "#" .. xqColor.ToHex(nColor); --[[ color_str = String.Right(punctuation_color, 6); tblColorInfo = ColorDialog.Show(Math.HexColorToNumber(color_str)); if (tblColorInfo) then nDecimal = tblColorInfo.Decimal; nRed = tblColorInfo.Red; nGreen = tblColorInfo.Green; nBlue = tblColorInfo.Blue; sHex = tblColorInfo.Hex; Shape.SetFillColor("box_punctuation_color", nDecimal); punctuation_color = "#" .. sHex; end ]] On Right-ClickOn EnterOn LeavePunctuation ColorVerdanachk_quoted_boldOn Click state = Button.GetState("chk_quoted_bold"); --state = Math.Abs(state - 1); --Button.SetState("chk_quoted_bold", state); if (state == 0) then quoted_bold = false; end if (state == 1) then quoted_bold = true; end On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdana,lbl_quoted_boldOn Click state = Button.GetState("chk_quoted_bold"); state = Math.Abs(state - 1); Button.SetState("chk_quoted_bold", state); if (state == 0) then quoted_bold = false; end if (state == 1) then quoted_bold = true; end On Right-ClickOn EnterOn Leave Strings BoldVerdanachk_quoted_italicOn Click state = Button.GetState("chk_quoted_italic"); --state = Math.Abs(state - 1); --Button.SetState("chk_quoted_italic", state); if (state == 0) then quoted_italic = false; end if (state == 1) then quoted_italic = true; end On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdana,lbl_quoted_italic On Click state = Button.GetState("chk_quoted_italic"); state = Math.Abs(state - 1); Button.SetState("chk_quoted_italic", state); if (state == 0) then quoted_italic = false; end if (state == 1) then quoted_italic = true; end On Right-ClickOn EnterOn LeaveStrings ItalicVerdana(box_quoted_colorOn ClickH color_str = String.Right(quoted_color, 6); nColor = xqColor.Choose(color_str); Shape.SetFillColor("box_quoted_color", nColor); quoted_color = "#" .. xqColor.ToHex(nColor); --[[ color_str = String.Right(quoted_color, 6); tblColorInfo = ColorDialog.Show(Math.HexColorToNumber(color_str)); if (tblColorInfo) then nDecimal = tblColorInfo.Decimal; nRed = tblColorInfo.Red; nGreen = tblColorInfo.Green; nBlue = tblColorInfo.Blue; sHex = tblColorInfo.Hex; Shape.SetFillColor("box_quoted_color", nDecimal); quoted_color = "#" .. sHex; end ]] On EnterOn LeaveShape\Shape.apo1,0,0,1,0,16777215,7,7,lbl_quoted_colorOn ClickH color_str = String.Right(quoted_color, 6); nColor = xqColor.Choose(color_str); Shape.SetFillColor("box_quoted_color", nColor); quoted_color = "#" .. xqColor.ToHex(nColor); --[[ color_str = String.Right(quoted_color, 6); tblColorInfo = ColorDialog.Show(Math.HexColorToNumber(color_str)); if (tblColorInfo) then nDecimal = tblColorInfo.Decimal; nRed = tblColorInfo.Red; nGreen = tblColorInfo.Green; nBlue = tblColorInfo.Blue; sHex = tblColorInfo.Hex; Shape.SetFillColor("box_quoted_color", nDecimal); quoted_color = "#" .. sHex; end ]] On Right-ClickOn EnterOn Leave Strings ColorVerdana,lbl_visit_ams_resource_center 3On Click% File.Open("http://66.34.42.62/"); On Right-ClickOn EnterOn LeaveVisit the AMS Resource CenterVerdana chk_startupcpOn Click% state = Button.GetState("chk_startup"); --state = Math.Abs(state - 1); --Button.SetState("chk_startup", state); -- prep for link startup_folder = Shell.GetFolder(SHF_STARTUP_COMMON) .. "\\"; link_name = String.Replace(appNameOriginal(), "_", " "); -- delete the shortcut link if (state == 0) then File.Delete(startup_folder .. link_name .. ".lnk"); app_autostart = false; end -- create the shortcut link if (state == 1) then Shell.CreateShortcut(startup_folder, link_name, appPathOriginal() .. appNameOriginal() .. ".exe", "/tray", "", "", 0, SW_SHOWNORMAL, nil); -- display message hWnd = Application.GetWndHandle(); sTitle = " Automatic Startup Enabled"; sMsg = "This program will now start automatically with your computer.\n\n" .. "It will start in the system tray as an icon like the one on left.\n\n"; sButtons = "OK"; sIcon = "ICON_CUSTOM"; sIcon_File = _SourceFolder .. "\\AutoPlay\\Icons\\ams_code_pretty_large.ico"; sCheckText = "NONE"; nFont_Size = 10; nText_Color = "-1"; sFont_Bold = "YES"; sHide_Title_Bar = "NO"; sStyle = "NORMAL"; nBG_Color = "-1"; nWidth = 350; nHeight = 150; result = DLL.CallFunction("AutoPlay\\DLLs\\xDialog_Message.dll", "Show_Msg", "\""..sTitle.."\",\""..sMsg.."\",\""..sCheckText.."\",\""..sButtons.."\",\""..sIcon.."\",\""..sIcon_File.."\",\""..nFont_Size.."\",\""..sFont_Bold.."\",\""..nBG_Color.."\",\""..nText_Color.."\",\""..sStyle.."\",\""..sHide_Title_Bar.."\",\""..nWidth.."\",\""..nHeight.."\",\""..hWnd.."\"", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL) end On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdana, lbl_startupbvOn Click! state = Button.GetState("chk_startup"); state = Math.Abs(state - 1); Button.SetState("chk_startup", state); -- prep for link startup_folder = Shell.GetFolder(SHF_STARTUP_COMMON) .. "\\"; link_name = String.Replace(appNameOriginal(), "_", " "); -- delete the shortcut link if (state == 0) then File.Delete(startup_folder .. link_name .. ".lnk"); app_autostart = false; end -- create the shortcut link if (state == 1) then Shell.CreateShortcut(startup_folder, link_name, appPathOriginal() .. appNameOriginal() .. ".exe", "/tray", "", "", 0, SW_SHOWNORMAL, nil); -- display message hWnd = Application.GetWndHandle(); sTitle = " Automatic Startup Enabled"; sMsg = "This program will now start automatically with your computer.\n\n" .. "It will start in the system tray as an icon like the one on left.\n\n"; sButtons = "OK"; sIcon = "ICON_CUSTOM"; sIcon_File = _SourceFolder .. "\\AutoPlay\\Icons\\ams_code_pretty_large.ico"; sCheckText = "NONE"; nFont_Size = 10; nText_Color = "-1"; sFont_Bold = "YES"; sHide_Title_Bar = "NO"; sStyle = "NORMAL"; nBG_Color = "-1"; nWidth = 350; nHeight = 150; result = DLL.CallFunction("AutoPlay\\DLLs\\xDialog_Message.dll", "Show_Msg", "\""..sTitle.."\",\""..sMsg.."\",\""..sCheckText.."\",\""..sButtons.."\",\""..sIcon.."\",\""..sIcon_File.."\",\""..nFont_Size.."\",\""..sFont_Bold.."\",\""..nBG_Color.."\",\""..nText_Color.."\",\""..sStyle.."\",\""..sHide_Title_Bar.."\",\""..nWidth.."\",\""..nHeight.."\",\""..hWnd.."\"", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL) end On Right-ClickOn EnterOn Leave%Run AMS Code Pretty at System StartupVerdana,lbl_fontsize_tipeOn ClickOn Right-ClickOn EnterOn Leave (see help)VerdanaȀ cbo_code_typenumber e_Selection On Select6 conv_category = ComboBox.GetText("cbo_code_type"); number e_Key, table e_ModifiersOn KeyOn FocusVerdanà All LUA Codè Function List̀Function List Sorted̀INI FilèXML File, lbl_code_typeOn ClickOn Right-ClickOn EnterOn Leave Code Type:Verdanapage_output_preview$AutoPlay\Images\frame_blue_w_tab.png  On Preload Page.StartTimer(1000); -- set html toggle if (convert_to_html == true) then Button.SetState("chk_convert_to_html", 1); else Button.SetState("chk_convert_to_html", 0); end -- conversion type Label.SetText("lbl_code_type", "[" .. conv_category .. "]"); -- toggle enabled states as needed if (convert_to_html == false) then Button.SetEnabled("btn_save", false); Button.SetEnabled("btn_print", false); Button.SetEnabled("btn_browser", false); Input.SetEnabled("inp_print_header", false); Input.SetVisible("inp_print_header", false); Label.SetVisible("lbl_print_header", false); Label.SetVisible("lbl_tip", true); Label.SetVisible("lbl_output_as", true); else Button.SetEnabled("btn_save", true); Button.SetEnabled("btn_print", true); Button.SetEnabled("btn_browser", true); Input.SetEnabled("inp_print_header", true); Input.SetVisible("inp_print_header", true); Label.SetVisible("lbl_print_header", true); Label.SetVisible("lbl_tip", false); Label.SetVisible("lbl_output_as", true); end On Show -- display processing msg page_current = "page_output_preview"; Web.LoadURL("web_browser", html_path .. html_file_processing); Application.Sleep(500); -- prettify code file_contents = TextFile.ReadToTable(source_temp_filepath); if (error_test("File Access Error", source_temp_filepath) ~= 0) then return; end file_contents = pretty_lines(file_contents); -- display prettified code html_out = TextFile.ReadToString(html_path .. html_file_template); if (error_test("File Access Error", html_path .. html_file_template) ~= 0) then return; end html_out = String.Replace(html_out, "[HERE_CODE]", file_contents); TextFile.WriteFromString(html_path .. html_file_dest, html_out, false); if (error_test("File Creation Error", html_path .. html_file_dest) ~= 0) then return; end -- set label text if (convert_to_html == true) then Label.SetText("lbl_output_as", "Output as HTML:"); else Label.SetText("lbl_output_as", "Output as BB Code:"); end -- set header input text Input.SetText("inp_print_header", print_header); -- finally, display it Web.LoadURL("web_browser", html_path .. html_file_dest); Page.SetFocus("web_browser"); On CloseOn Timer' if (Clipboard.GetText() == duplicate_msg) then Clipboard.CopyText(""); Application.Restore(); wdwCenterToScreen(Application.GetWndHandle()); parms = Application.GetWndHandle(); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "BringWindowToTop", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "SetForegroundWindow", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "SetFocus", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); end  number e_Channel, string e_StateOn Audiocnumber e_WindowWidth, number e_WindowHeight, number e_PageWidth, number e_PageHeight, number e_TypeOn Sizenumber e_ID, table e_ItemInfoOn Menunumber e_Key, table e_ModifiersOn Key%number e_Type, number e_X, number e_YOn Mouse Buttonnumber e_X, number e_Y On Mouse Movebtn_help9ROn ClickH if (page_current ~= "page_help") then Page.Jump("page_help"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btnHelpVerdanabtn_output_previewc9ROn Click\ if (page_current ~= "page_output_preview") then Page.Jump("page_output_preview"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012.btnOutput PreviewVerdanabtn_output_settings9^ROn Click^ if (page_current ~= "page_output_settings") then Page.Jump("page_output_settings"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btnOutput SettingsVerdanabtn_source_codeA9ROn ClickL if (page_current ~= "page_source") then Page.Jump("page_source"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btn Source CodeVerdana,lbl_title_shadow@ +On ClickOn Right-ClickOn EnterOn LeaveAMS Code PrettyVerdana, lbl_titleA ,On ClickOn Right-ClickOn EnterOn LeaveAMS Code PrettyVerdana7imgExit(Exit ApplicationOn Clicka if (app_autostart == true) then hWnd = Application.GetWndHandle(); sTitle = " Exit Application?"; sMsg = "This program was started with Windows.\n\n" .. "Would you rather just minimize it to the system tray?\n\n"; sButtons = "YES_NO_CANCEL"; sIcon = "ICON_QUESTION"; sIcon_File = ""; sCheckText = "NONE"; nFont_Size = 10; nText_Color = "-1"; sFont_Bold = "YES"; sHide_Title_Bar = "NO"; sStyle = "NORMAL"; nBG_Color = "-1"; nWidth = 350; nHeight = 150; result = DLL.CallFunction("AutoPlay\\DLLs\\xDialog_Message.dll", "Show_Msg", "\""..sTitle.."\",\""..sMsg.."\",\""..sCheckText.."\",\""..sButtons.."\",\""..sIcon.."\",\""..sIcon_File.."\",\""..nFont_Size.."\",\""..sFont_Bold.."\",\""..nBG_Color.."\",\""..nText_Color.."\",\""..sStyle.."\",\""..sHide_Title_Bar.."\",\""..nWidth.."\",\""..nHeight.."\",\""..hWnd.."\"", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL) if (result == "YES") then Application.Minimize(); return end end Audio.Load(CHANNEL_BACKGROUND, _SourceFolder .. "\\AutoPlay\\Audio\\mfm_Close.wav", true, false); Application.Sleep(750); Application.Exit(); On Right-ClickOn Enter tProperties = Image.GetProperties("imgExit"); tProperties.ImageFile = "AutoPlay\\Images\\" .. "exit_yellow_light.png"; Image.SetProperties("imgExit", {ImageFile=tProperties.ImageFile}); On Leave tProperties = Image.GetProperties("imgExit"); tProperties.ImageFile = "AutoPlay\\Images\\" .. "exit_blue.png"; Image.SetProperties("imgExit", {ImageFile=tProperties.ImageFile}); AutoPlay\Images\exit_blue.png dAutoPlay\Audio\mfm_Close.wav7 imgMinimize)#Minimize Application to System TrayOn Click Application.Minimize(); On Right-ClickOn Enter tProperties = Image.GetProperties("imgMinimize"); tProperties.ImageFile = _SourceFolder .. "\\AutoPlay\\Images\\" .. "minimize_yellow_light.png"; Image.SetProperties("imgMinimize", {ImageFile=tProperties.ImageFile}); On Leave tProperties = Image.GetProperties("imgMinimize"); tProperties.ImageFile = _SourceFolder .. "\\AutoPlay\\Images\\" .. "minimize_blue.png"; Image.SetProperties("imgMinimize", {ImageFile=tProperties.ImageFile}); !AutoPlay\Images\minimize_blue.png dAutoPlay\Audio\mfm_Rollup.wavCAutoPlayWebObject web_browser1 string e_URL On Navigate string e_URL On LoadedAutoPlay\HTML\processing.html, lbl_output_as2On ClickOn Right-ClickOn EnterOn Leave Output AsVerdanaBinp_print_header}number e_Key, table e_ModifiersOn Key5 print_header = Input.GetText("inp_print_header"); On FocusVerdana ,lbl_print_headerOn ClickOn Right-ClickOn EnterOn Leave Print Header:Verdanabtn_save2Z{On ClickM -- save it dialog if (output_dest_folder == "") then output_dest_folder = Shell.GetFolder(SHF_MYDOCUMENTS) .. "\\"; end output_file_name = "ams_code_pretty.html"; nPos = String.Find(print_header, ".lua"); if (nPos > 0) then output_file_name = String.Left(print_header, nPos - 1) .. ".html"; end files_sel = Dialog.FileBrowse(false, "Save As", output_dest_folder, "Source Files (*.html, *.htm, *.txt)|*.html;*.htm;*.txt|", output_file_name, "html", false, false); -- check for user cancel if (files_sel[1] == nil) then Page.SetFocus("web_browser"); return; end if (files_sel[1] == "CANCEL") then Page.SetFocus("web_browser"); return; end -- create new default save as path path_parts = String.SplitPath(files_sel[1]); output_dest_folder = path_parts.Drive .. path_parts.Folder; -- check for existing file if (File.DoesExist(files_sel[1])) then dlg_msg = "A file by this name already exists.\r\n\r\n" .. files_sel[1] .. "\r\n\r\nDo you want to overwrite this file?"; answer = Dialog.Message("Overwrite Existing File?", dlg_msg, MB_YESNOCANCEL, MB_ICONQUESTION, 0); if (answer ~= IDYES) then Page.SetFocus("web_browser"); return; end end -- prettify code file_contents = TextFile.ReadToTable(source_temp_filepath); if (error_test("File Access Error", source_temp_filepath) ~= 0) then return; end file_contents = pretty_lines(file_contents); -- replace macros in print_header print_header_final = print_header; print_header_final = String.Replace(print_header_final, "&filename_source", input_source_file); print_header_final = String.Replace(print_header_final, "&filename_dest", path_parts.Filename .. path_parts.Extension); print_header_final = String.Replace(print_header_final, "&filepath_source", input_source_folder .. "\\" ..input_source_file); print_header_final = String.Replace(print_header_final, "&filepath_dest", files_sel[1]); -- create the temp file html_out = TextFile.ReadToString(html_path .. html_file_template_save); if (error_test("File Access Error", html_path .. html_file_template_save) ~= 0) then return; end html_out = String.Replace(html_out, "[HERE_TITLE]", print_header_final); html_out = String.Replace(html_out, "[HERE_CODE]", file_contents); TextFile.WriteFromString(html_path .. html_file_dest_save, html_out, false); if (error_test("File Creation Error", html_path .. html_file_dest_save) ~= 0) then return; end -- finally, save it File.Copy(html_path .. html_file_dest_save, files_sel[1], false, true, false, true, nil); if (error_test("File Creation Error", html_path .. html_file_dest_save) ~= 0) then return; end -- succesful; so prompt to open the output folder hWnd = Application.GetWndHandle(); sTitle = " Finished"; sMsg = "Your file has been successfully created.\n\n" .. "" .. path_parts.Filename .. path_parts.Extension .. "\n\n"; sButtons = "OK"; sIcon = "ICON_CUSTOM"; sIcon_File = _SourceFolder .. "\\AutoPlay\\Icons\\ams_code_pretty_large.ico"; sCheckText = " Open Output Folder"; nFont_Size = 10; nText_Color = "-1"; sFont_Bold = "YES"; sHide_Title_Bar = "NO"; sStyle = "NORMAL"; nBG_Color = "-1"; nWidth = 350; nHeight = 120; result = DLL.CallFunction("AutoPlay\\DLLs\\xDialog_Message.dll", "Show_Msg", "\""..sTitle.."\",\""..sMsg.."\",\""..sCheckText.."\",\""..sButtons.."\",\""..sIcon.."\",\""..sIcon_File.."\",\""..nFont_Size.."\",\""..sFont_Bold.."\",\""..nBG_Color.."\",\""..nText_Color.."\",\""..sStyle.."\",\""..sHide_Title_Bar.."\",\""..nWidth.."\",\""..nHeight.."\",\""..hWnd.."\"", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL) nPos = String.Find(result, "|", 1, false) if nPos == -1 then sClicked = result else sClicked = String.Left(result, nPos - 1) sChecked = String.Mid(result, nPos + 1, 11) end if (sChecked == "CHECKED") then File.ExploreFolder(output_dest_folder); else Page.SetFocus("web_broswer"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btn Save As...Verdanabtn_copyZJ{On Click file_contents = TextFile.ReadToTable(source_temp_filepath); if (error_test("File Access Error", source_temp_filepath) ~= 0) then return; end file_contents = pretty_lines(file_contents); Clipboard.CopyText (file_contents); On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btn Copy OutputVerdana btn_printTZ{On Click9 -- prettify code file_contents = TextFile.ReadToTable(source_temp_filepath); if (error_test("File Access Error", source_temp_filepath) ~= 0) then return; end file_contents = pretty_lines(file_contents); -- replace macros in print_header print_header_final = print_header; if (String.Find(print_header_final, "&filename_source") > 0) then if (input_source_file ~= "") then print_header_final = String.Replace(print_header_final, "&filename_source", input_source_file); end end if (String.Find(print_header_final, "&filename_dest") > 0) then if (path_parts ~= nil) then print_header_final = String.Replace(print_header_final, "&filename_dest", path_parts.Filename .. path_parts.Extension); end end if (String.Find(print_header_final, "&filepath_source") > 0) then if ((input_source_file ~= "") and (input_source_folder ~= "")) then print_header_final = String.Replace(print_header_final, "&filepath_source", String.AbbreviateFilePath(input_source_folder .. "\\" ..input_source_file, 79)); end end if (String.Find(print_header_final, "&filepath_dest") > 0) then if (files_sel ~= nil) then print_header_final = String.Replace(print_header_final, "&filepath_dest", String.AbbreviateFilePath(files_sel[1], 79)); end end -- create the temp file html_out = TextFile.ReadToString(html_path .. html_file_template_print); if (error_test("File Access Error", html_path .. html_file_template_print) ~= 0) then return; end html_out = String.Replace(html_out, "[HERE_TITLE]", print_header_final); html_out = String.Replace(html_out, "[HERE_CODE]", file_contents); TextFile.WriteFromString(html_path .. html_file_dest_print, html_out, false); if (error_test("File Creation Error", html_path .. html_file_dest_print) ~= 0) then return; end -- print it MSIE_PageSetup_Change("&w", "AMS Code Pretty - printed on &D at &t &bpage &p of &P", ".75", "1.0", ".5", ".5"); File.Run(_SystemFolder .. "\\rundll32.exe", _SystemFolder .. "\\mshtml.dll,PrintHTML \"" .. _SourceFolder .. "\\" .. html_path .. html_file_dest_print .. "\""); Page.SetFocus("web_browser"); On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btn Print OutputVerdana btn_browserZl{On Click -- prettify code file_contents = TextFile.ReadToTable(source_temp_filepath); if (error_test("File Access Error", source_temp_filepath) ~= 0) then return; end file_contents = pretty_lines(file_contents); -- replace macros in print_header print_header_final = print_header; if (String.Find(print_header_final, "&filename_source") > 0) then if (input_source_file ~= "") then print_header_final = String.Replace(print_header_final, "&filename_source", input_source_file); end end if (String.Find(print_header_final, "&filename_dest") > 0) then if (path_parts ~= nil) then print_header_final = String.Replace(print_header_final, "&filename_dest", path_parts.Filename .. path_parts.Extension); end end if (String.Find(print_header_final, "&filepath_source") > 0) then if ((input_source_file ~= "") and (input_source_folder ~= "")) then print_header_final = String.Replace(print_header_final, "&filepath_source", String.AbbreviateFilePath(input_source_folder .. "\\" ..input_source_file, 79)); end end if (String.Find(print_header_final, "&filepath_dest") > 0) then if (files_sel ~= nil) then print_header_final = String.Replace(print_header_final, "&filepath_dest", String.AbbreviateFilePath(files_sel[1], 79)); end end -- create the temp file html_out = TextFile.ReadToString(html_path .. html_file_template_save); if (error_test("File Access Error", html_path .. html_file_template_save) ~= 0) then return; end html_out = String.Replace(html_out, "[HERE_TITLE]", print_header_final); html_out = String.Replace(html_out, "[HERE_CODE]", file_contents); TextFile.WriteFromString(html_path .. html_file_dest_save, html_out, false); if (error_test("File Creation Error", html_path .. html_file_dest_save) ~= 0) then return; end -- finally, display it File.Copy(html_path .. html_file_dest_save, _TempFolder .. "\\" .. html_file_dest_save, false, true, false, true, nil); File.Open(_TempFolder .. "\\" .. html_file_dest_save); On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btnOpen in BrowserVerdana,lbl_visit_ams_forums }On Click3 File.Open("http://www.indigorose.com/forums/"); On Right-ClickOn EnterOn LeaveVisit Indigo Rose AMS ForumsVerdana,lbl_tipOn ClickOn Right-ClickOn EnterOn Leave*(this code will paste nicely in the forum)Verdana,lbl_visit_ams_resource_center 3On Click% File.Open("http://66.34.42.62/"); On Right-ClickOn EnterOn LeaveVisit the AMS Resource CenterVerdanachk_convert_to_htmldqOn Click state = Button.GetState("chk_convert_to_html"); --state = Math.Abs(state - 1); --Button.SetState("chk_convert_to_html", state); if (state == 0) then convert_to_html = false; end if (state == 1) then convert_to_html = true; end Page.Jump("page_output_preview"); On Right-ClickOn EnterOn Leave%AutoPlay\Buttons\mfmCheckbox_Blue.btnVerdana,lbl_convert_to_htmlcwOn Click state = Button.GetState("chk_convert_to_html"); state = Math.Abs(state - 1); Button.SetState("chk_convert_to_html", state); if (state == 0) then convert_to_html = false; end if (state == 1) then convert_to_html = true; end Page.Jump("page_out_preview");On Right-ClickOn EnterOn LeaveHTMLVerdana, lbl_code_type1On ClickOn Right-ClickOn EnterOn Leave(All LUA Code)Verdana page_help$AutoPlay\Images\frame_blue_w_tab.png  On Preload Page.StartTimer(1000); On Show page_current = "page_help"; Web.LoadURL("web_browser", html_path .. html_help_file); html_help_file = "help_overview.html"; Page.SetFocus("web_browser"); On CloseOn Timer' if (Clipboard.GetText() == duplicate_msg) then Clipboard.CopyText(""); Application.Restore(); wdwCenterToScreen(Application.GetWndHandle()); parms = Application.GetWndHandle(); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "BringWindowToTop", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "SetForegroundWindow", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); DLL.CallFunction( _SystemFolder .. "\\User32.dll", "SetFocus", parms, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); end  number e_Channel, string e_StateOn Audiocnumber e_WindowWidth, number e_WindowHeight, number e_PageWidth, number e_PageHeight, number e_TypeOn Sizenumber e_ID, table e_ItemInfoOn Menunumber e_Key, table e_ModifiersOn Key%number e_Type, number e_X, number e_YOn Mouse Buttonnumber e_X, number e_Y On Mouse Movebtn_help9ROn ClickH if (page_current ~= "page_help") then Page.Jump("page_help"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012.btnHelpVerdanabtn_output_previewc9ROn Click\ if (page_current ~= "page_output_preview") then Page.Jump("page_output_preview"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btnOutput PreviewVerdanabtn_output_settings9^ROn Click^ if (page_current ~= "page_output_settings") then Page.Jump("page_output_settings"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btnOutput SettingsVerdanabtn_source_codeA9ROn ClickL if (page_current ~= "page_source") then Page.Jump("page_source"); end On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\31_1012b.btn Source CodeVerdana,lbl_title_shadow@ +On ClickOn Right-ClickOn EnterOn LeaveAMS Code PrettyVerdana, lbl_titleA ,On ClickOn Right-ClickOn EnterOn LeaveAMS Code PrettyVerdana7imgExit(Exit ApplicationOn Clicka if (app_autostart == true) then hWnd = Application.GetWndHandle(); sTitle = " Exit Application?"; sMsg = "This program was started with Windows.\n\n" .. "Would you rather just minimize it to the system tray?\n\n"; sButtons = "YES_NO_CANCEL"; sIcon = "ICON_QUESTION"; sIcon_File = ""; sCheckText = "NONE"; nFont_Size = 10; nText_Color = "-1"; sFont_Bold = "YES"; sHide_Title_Bar = "NO"; sStyle = "NORMAL"; nBG_Color = "-1"; nWidth = 350; nHeight = 150; result = DLL.CallFunction("AutoPlay\\DLLs\\xDialog_Message.dll", "Show_Msg", "\""..sTitle.."\",\""..sMsg.."\",\""..sCheckText.."\",\""..sButtons.."\",\""..sIcon.."\",\""..sIcon_File.."\",\""..nFont_Size.."\",\""..sFont_Bold.."\",\""..nBG_Color.."\",\""..nText_Color.."\",\""..sStyle.."\",\""..sHide_Title_Bar.."\",\""..nWidth.."\",\""..nHeight.."\",\""..hWnd.."\"", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL) if (result == "YES") then Application.Minimize(); return end end Audio.Load(CHANNEL_BACKGROUND, _SourceFolder .. "\\AutoPlay\\Audio\\mfm_Close.wav", true, false); Application.Sleep(750); Application.Exit(); On Right-ClickOn Enter tProperties = Image.GetProperties("imgExit"); tProperties.ImageFile = "AutoPlay\\Images\\" .. "exit_yellow_light.png"; Image.SetProperties("imgExit", {ImageFile=tProperties.ImageFile}); On Leave tProperties = Image.GetProperties("imgExit"); tProperties.ImageFile = "AutoPlay\\Images\\" .. "exit_blue.png"; Image.SetProperties("imgExit", {ImageFile=tProperties.ImageFile}); AutoPlay\Images\exit_blue.png dAutoPlay\Audio\mfm_Close.wav7 imgMinimize)#Minimize Application to System TrayOn Click Application.Minimize(); On Right-ClickOn Enter tProperties = Image.GetProperties("imgMinimize"); tProperties.ImageFile = _SourceFolder .. "\\AutoPlay\\Images\\" .. "minimize_yellow_light.png"; Image.SetProperties("imgMinimize", {ImageFile=tProperties.ImageFile}); On Leave tProperties = Image.GetProperties("imgMinimize"); tProperties.ImageFile = _SourceFolder .. "\\AutoPlay\\Images\\" .. "minimize_blue.png"; Image.SetProperties("imgMinimize", {ImageFile=tProperties.ImageFile}); !AutoPlay\Images\minimize_blue.png dAutoPlay\Audio\mfm_Rollup.wav,lbl_visit_ams_forums }On Click3 File.Open("http://www.indigorose.com/forums/"); On Right-ClickOn EnterOn LeaveVisit Indigo Rose AMS ForumsVerdana web_browser1 string e_URL On Navigate string e_URL On LoadedAutoPlay\HTML\help_blank.html btn_overview2Z{On Click html_help_file = "help_overview.html"; Web.LoadURL("web_browser", html_path .. html_help_file); Page.SetFocus("web_browser"); On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btnOverviewVerdana btn_wizardZJ{On Click html_help_file = "help_wizard_usage.html"; Web.LoadURL("web_browser", html_path .. html_help_file); Page.SetFocus("web_browser"); On Right-Click hWnd = Application.GetWndHandle(); sTitle = " Thank You !!!"; sMsg = "Thank you for trying this program. We hope you find it useful.\n\n" .. "And .. thank you Worm and Dermot for your great add-ons. You guys are the wizards.\n\n"; sButtons = "OK"; sIcon = "ICON_CUSTOM"; sIcon_File = _SourceFolder .. "\\AutoPlay\\Icons\\ams_code_pretty_large.ico"; sCheckText = "NONE"; nFont_Size = 10; nText_Color = "-1"; sFont_Bold = "YES"; sHide_Title_Bar = "NO"; sStyle = "NORMAL"; nBG_Color = "-1"; nWidth = 350; nHeight = 175; result = DLL.CallFunction("AutoPlay\\DLLs\\xDialog_Message.dll", "Show_Msg", "\""..sTitle.."\",\""..sMsg.."\",\""..sCheckText.."\",\""..sButtons.."\",\""..sIcon.."\",\""..sIcon_File.."\",\""..nFont_Size.."\",\""..sFont_Bold.."\",\""..nBG_Color.."\",\""..nText_Color.."\",\""..sStyle.."\",\""..sHide_Title_Bar.."\",\""..nWidth.."\",\""..nHeight.."\",\""..hWnd.."\"", DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL) On EnterOn LeaveAutoPlay\Buttons\10_1012.btn Wizard UsageVerdana btn_aboutTZ{On Click html_help_file = "help_about.html"; Web.LoadURL("web_browser", html_path .. html_help_file); Page.SetFocus("web_browser"); On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btnAboutVerdana btn_creditsZl{On Click html_help_file = "help_credits.html"; Web.LoadURL("web_browser", html_path .. html_help_file); Page.SetFocus("web_browser"); On Right-ClickOn EnterOn LeaveAutoPlay\Buttons\10_1012.btnCreditsVerdana,lbl_help2^On Click if (System.IsKeyDown(72) == true) or (System.IsKeyDown(85) == true) then File.Open("AutoPlay\\Docs\\amscp_update_history.txt"); end On Right-ClickOn EnterOn LeaveHelp:Verdana,lbl_visit_ams_resource_center 3On Click% File.Open("http://66.34.42.62/"); On Right-ClickOn EnterOn LeaveVisit the AMS Resource CenterVerdana,lbl_ref_topicsLOn ClickOn Right-ClickOn EnterOn LeaveReference Topics:Verdana,lbl_ref_coding_styleOn Click html_help_file = "help_coding_style.html"; Web.LoadURL("web_browser", html_path .. html_help_file); Page.SetFocus("web_browser"); On Right-ClickOn EnterOn Leave CODING STYLEVerdana,lbl_ref_ams_sitesVOn Click html_help_file = "help_ams_sites.html"; Web.LoadURL("web_browser", html_path .. html_help_file); Page.SetFocus("web_browser"); On Right-ClickOn EnterOn Leave AMS SITESVerdana