window.alt1={ //Gets the left bound of all screens, usually 0, but can be negative with multiple screens. screenX:undefined, //Gets the Top bound of all screens, usually 0, but can be negative with multiple screens. screenY:undefined, //Gets the width of the union of all srceens. screenWidth:undefined, //Gets the height of the union of all srceens. screenHeight:undefined, //Gets a string represention of the current version of Alt1. version:undefined, //Gets a integer that represents the current version. (major * 1000 * 1000 + minor * 1000 + build) 1.2.3 -> 1002003. versionint:undefined, //Gets the maximum amount of bytes that can be transfered in a single function call. The wrapper library uses this to split up large image transfers. maxtransfer:undefined, //Gets the name of the current skin. skinName:undefined, //Gets whether desktop capture is being used instead of directX capture. compatEnabled:undefined, //Gets the adviced minimum time between screen captures captureInterval:undefined, //Gets the position of the mouse is it is inside the runescape client, use a1lib.mousePosition() for an object with {x,y}. (x=r>>16, y=r&0xFFFF) //[Gamestate] permission required. mousePosition:undefined, //Gets the X-coord of the runescape client area when rs is linked. Use rsLinked to determine if rs is linked. rsX:undefined, //Gets the Y-coord of the runescape client area when rs is linked. Use rsLinked to determine if rs is linked. rsY:undefined, //Gets the width of the runescape client area when rs is linked. Use rsLinked to determine if rs is linked. rsWidth:undefined, //Gets the height of the runescape client area when rs is linked. Use rsLinked to determine if rs is linked. rsHeight:undefined, //Gets the DPI scaling level of the rs window in windows 8.1 or 10, returns 0 when the rs window is not linked. rsScaling:undefined, //Gets if the runescape window is currently detected by Alt1. rsLinked:undefined, //Gets if the current page is handled as an installed app. permissionInstalled:undefined, //Gets is the current page has gamestate permission. permissionGameState:undefined, //Gets is the current page has overlay permission. permissionOverlay:undefined, //Gets is the current page has pixel permission permissionPixel:undefined, //Gets information about how the app was opened, this includes the recognised text and regex matches if opened by pressing alt+1. //[Installed] permission required. openInfo:undefined, //Gets the time in milliseconds since the last click in the runescape window. //[Gamestate] permission required. rsLastActive:undefined, //[Depricated] Use alt1.interfaceFound('xpcounter') instead. Gets whether the positions of the xp counter has been found //[Gamestate] permission required. xpCounterFound:undefined, } alt1.identifyApp=function(jsonstr){ ///<summary> ///Use this function to tell Alt1 about this app, it will update a set of safe app preferences if the app is installed, or show a button for the user to install the app if the app isn't installed yet.<br/> ///This function requires a json encoded string of an object containing information about the app. Check the examples for more information. ///</summary> ///<parameter name="jsonstr" type="String">String</parameter> ///<returns type="System.Void">System.Void</returns> }; alt1.identifyAppUrl=function(url){ ///<summary> ///Tells Alt1 to fetch identification information from the given url. The file should contain a json encoded object to be passed to the identifyApp function. ///</summary> ///<parameter name="url" type="String">String</parameter> ///<returns type="System.Void">System.Void</returns> }; alt1.openBrowser=function(url){ ///<summary> ///Opens the specified link in the default browser. ///</summary> ///<parameter name="url" type="String">String</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.clearTooltip=function(){ ///<summary> ///Removes the tooltip.<br/> ///[Installed] permission required. ///</summary> ///<returns type="System.Void">System.Void</returns> }; alt1.clearBinds=function(){ ///<summary> ///Cleans up all tasks for this app on Alt1, it stops pixel event listeners and removes possible cursor tooltips.<br/> ///[Installed] permission required. ///</summary> ///<returns type="System.Void">System.Void</returns> }; alt1.deleteStream=function(callback){ ///<summary> ///Stops a pixel event listener.<br/> ///[Installed] permission required. ///</summary> ///<parameter name="callback" type="String">String</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.openPopup=function(address,width,height){ ///<summary> ///[depricated, use window.open() instead][Experimental] Opens a seprate popup window with the specified size and url. This window is not linked to it parent window like normal js popups, which means you will have to communicate with it through localStorage. There is an extensive wrapper function that handles communication in the library.<br/> ///[Installed] permission required. ///</summary> ///<parameter name="address" type="String">String</parameter> ///<parameter name="width" type="Int32">Int32</parameter> ///<parameter name="height" type="Int32">Int32</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.setTooltip=function(tooltip){ ///<summary> ///Sets a tooltip with specified text that chases the cursor. It can be removed by calling this function again with an empty string or using the clearTooltip function.<br/> ///[Overlay] permission required. ///</summary> ///<parameter name="tooltip" type="String">String</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.overLayRect=function(color,x,y,w,h,time,lineWidth){ ///<summary> ///Overlays a rectangle on the screen. Color is a 8bpp rgba int which can be created using the mixcolor function in the library. Time is in milliseconds.<br/> ///[Overlay] permission required. ///</summary> ///<parameter name="color" type="Int32">Int32</parameter> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<parameter name="w" type="Int32">Int32</parameter> ///<parameter name="h" type="Int32">Int32</parameter> ///<parameter name="time" type="Int32">Int32</parameter> ///<parameter name="lineWidth" type="Int32">Int32</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.overLayText=function(str,color,size,x,y,time){ ///<summary> ///Overlays some text on the screen. Color is a 8bpp rgba int which can be created using the mixcolor function in the library. Time is in milliseconds.<br/> ///[Overlay] permission required. ///</summary> ///<parameter name="str" type="String">String</parameter> ///<parameter name="color" type="Int32">Int32</parameter> ///<parameter name="size" type="Int32">Int32</parameter> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<parameter name="time" type="Int32">Int32</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.overLayLine=function(color,width,x1,y1,x2,y2,time){ ///<summary> ///Overlays a line on the screen. Color is a 8bpp rgba int which can be created using the mixcolor function in the library. Time is in milliseconds.<br/> ///[Overlay] permission required. ///</summary> ///<parameter name="color" type="Int32">Int32</parameter> ///<parameter name="width" type="Int32">Int32</parameter> ///<parameter name="x1" type="Int32">Int32</parameter> ///<parameter name="y1" type="Int32">Int32</parameter> ///<parameter name="x2" type="Int32">Int32</parameter> ///<parameter name="y2" type="Int32">Int32</parameter> ///<parameter name="time" type="Int32">Int32</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.overLayClearGroup=function(group){ ///<summary> ///Removes all overlay with given group name from screen. You can give overlays a group by calling the overlaySetGroup function before drawing<br/> ///[Overlay] permission required. ///</summary> ///<parameter name="group" type="String">String</parameter> ///<returns type="System.Void">System.Void</returns> }; alt1.overLaySetGroup=function(group){ ///<summary> ///Set the group name of all following draw overlay calls untill called again with a different name. Groups can be used remove overlays again.<br/> ///[Overlay] permission required. ///</summary> ///<parameter name="group" type="String">String</parameter> ///<returns type="System.Void">System.Void</returns> }; alt1.xpRiseListener=function(callback){ ///<summary> ///Calling this function will make Alt1 start looking for xp rises on the screen. The callback function will be called with the detected xp string whenever a xp rise is found. The function has to be accessible in the global scope with the specified callback string.<br/> ///[Gamestate] permission required. ///</summary> ///<parameter name="callback" type="String">String</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.xpCounterListener=function(callback){ ///<summary> ///Calling this function will make Alt1 start looking for the xp counters on the screen. The callback function will be called periodically with an object containing information about the xp counters.<br/> ///[Gamestate] permission required. ///</summary> ///<parameter name="callback" type="String">String</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.resetAreaListeners=function(){ ///<summary> ///Resets the cached position of interfaces in rs. Call this function if the user moves his interfaces around and the positions are no longer valid. This is also automatically called internally when the rs window is resized.<br/> ///[Gamestate] permission required. ///</summary> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.interfaceFound=function(interfaceName){ ///<summary> ///Gets whether the location of the specified interface is known<br/> ///[Gamestate] permission required. ///</summary> ///<parameter name="interfaceName" type="String">String</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.interfaceSearching=function(interfaceName){ ///<summary> ///Gets whether alt1 is currently searching the interface in the client.<br/> ///[Gamestate] permission required. ///</summary> ///<parameter name="interfaceName" type="String">String</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.FindInterface=function(interfaceName){ ///<summary> ///Will search the game pixels for an interface, a interfacefound or interfacenotfound event will fire when it is complete. Returns if alt1 is searching the interface after the call.<br/> ///[Gamestate] permission required. ///</summary> ///<parameter name="interfaceName" type="String">String</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.ReadInterface=function(interfaceName,data){ ///<summary> ///Reads the interface of the screen if it has been found and returns a json object describing the interface state. Optional data argument to pass to the reading function. Call Searchinterface first. returns 'null' on fail.<br/> ///[Gamestate] permission required. ///</summary> ///<parameter name="interfaceName" type="String">String</parameter> ///<parameter name="data" type="String">String</parameter> ///<returns type="System.String">System.String</returns> }; alt1.readInterfaceStart=function(interfaceName,data){ ///<summary> ///Starts reading an interface of the screen. The alt1.events.interfaceread event will be called with the interface data when finished. A request id is returned that will also be included in the event data.<br/> ///[Gamestate] permission required. ///</summary> ///<parameter name="interfaceName" type="String">String</parameter> ///<parameter name="data" type="String">String</parameter> ///<returns type="System.Int32">System.Int32</returns> }; alt1.getRegion=function(x,y,w,h){ ///<summary> ///[Internal, use alt1lib] Returns a string containing pixel data about the specified region inside the rs window. The string is base64 encoded 8bpp argb buffer of the requested image.<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<parameter name="w" type="Int32">Int32</parameter> ///<parameter name="h" type="Int32">Int32</parameter> ///<returns type="System.String">System.String</returns> }; alt1.streamRegion=function(callback,x,y,w,h){ ///<summary> ///[depricated, periodically call getRegion instead]<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="callback" type="String">String</parameter> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<parameter name="w" type="Int32">Int32</parameter> ///<parameter name="h" type="Int32">Int32</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.bindRegion=function(x,y,w,h){ ///<summary> ///[Internal, use alt1lib] Binds a region of the rs window in memory to apply functions to it without having to transfer it to the browser. This function returns a identifier to be used in subsequent 'bind-' calls. This id is currently always 1 as only one bound image is allowed.<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<parameter name="w" type="Int32">Int32</parameter> ///<parameter name="h" type="Int32">Int32</parameter> ///<returns type="System.Int32">System.Int32</returns> }; alt1.bindScreenRegion=function(x,y,w,h){ ///<summary> ///[Internal, use alt1lib] Same as bindRegion, but uses screen coordinates and can see pixels outside of rs. This method is much slower per call.<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<parameter name="w" type="Int32">Int32</parameter> ///<parameter name="h" type="Int32">Int32</parameter> ///<returns type="System.Int32">System.Int32</returns> }; alt1.bindGetRegion=function(id,x,y,w,h){ ///<summary> ///[Internal, use alt1lib] Returns a rubregion of the bound image as base64 encoded 8bpp abgr buffer.<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="id" type="Int32">Int32</parameter> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<parameter name="w" type="Int32">Int32</parameter> ///<parameter name="h" type="Int32">Int32</parameter> ///<returns type="System.String">System.String</returns> }; alt1.bindReadString=function(id,fontname,x,y){ ///<summary> ///Tries to read a antialised string on the bound image, with the given font. The color of text will be detected and chosen from a set of preset colors. Valid font names are currently 'chat','chatmono' and 'xpcounter'. This function returns an empty string on failure.<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="id" type="Int32">Int32</parameter> ///<parameter name="fontname" type="String">String</parameter> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<returns type="System.String">System.String</returns> }; alt1.bindReadColorString=function(id,fontname,color,x,y){ ///<summary> ///Same as bindReadString, however requires an extra color argument. The color is a 8bpp rgba color int that can be mixed with the a1lib.mixcolor function. The should be the base color, or brightest color in the to be detected text.<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="id" type="Int32">Int32</parameter> ///<parameter name="fontname" type="String">String</parameter> ///<parameter name="color" type="Int32">Int32</parameter> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<returns type="System.String">System.String</returns> }; alt1.bindReadStringEx=function(id,x,y,args){ ///<summary> ///Same as bindReadString, however allows extra arguments in an object. Possible arguments and default values:<br/> ///bool allowgap=false - scan empty space for more text after reading text<br/> ///string fontname=chatfont - the font to detect<br/> ///int[] colors=[~20 standard colors] - array of color ints to detect<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="id" type="Int32">Int32</parameter> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<parameter name="args" type="String">String</parameter> ///<returns type="System.String">System.String</returns> }; alt1.addOCRFont=function(name,jsonFont){ ///<summary> ///[Incomplete] Adds a font for ocr, this font can be used in the bindReadString functions. The jsonfont can be generated from an image using a generator, please contant me if you plan to use this.<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="name" type="String">String</parameter> ///<parameter name="jsonFont" type="String">String</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.test=function(data){ ///<summary> ///No info available about this method. ///</summary> ///<parameter name="data" type="String">String</parameter> ///<returns type="System.String">System.String</returns> }; alt1.bindReadRightClickString=function(id,x,y){ ///<summary> ///Reads rightlcick menu text, this function is very fragile and is different from the other readText functions. It requires an exact baseline y coord.<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="id" type="Int32">Int32</parameter> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<returns type="System.String">System.String</returns> }; alt1.bindGetPixel=function(id,x,y){ ///<summary> ///Retrieves a single pixel from the bound image, this is not a required method as it is very slow<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="id" type="Int32">Int32</parameter> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<returns type="System.Int32">System.Int32</returns> }; alt1.bindFindSubImg=function(id,imgstr,imgwidth,x,y,w,h){ ///<summary> ///[Internal, use alt1lib] Finds the given subimage in the bound image. This function is way quicker than possible in js. imgstr is a base64 encoded 8bpp bgra image buffer. imgwidth is the width of the image, this is required to decode the image. x,y,w,h defines the area in the bound image to be searched.<br/> ///[Pixel] permission required. ///</summary> ///<parameter name="id" type="Int32">Int32</parameter> ///<parameter name="imgstr" type="String">String</parameter> ///<parameter name="imgwidth" type="Int32">Int32</parameter> ///<parameter name="x" type="Int32">Int32</parameter> ///<parameter name="y" type="Int32">Int32</parameter> ///<parameter name="w" type="Int32">Int32</parameter> ///<parameter name="h" type="Int32">Int32</parameter> ///<returns type="System.String">System.String</returns> }; alt1.Help=function(){ ///<summary> ///Need help about help? ///</summary> ///<returns type="System.String">System.String</returns> }; alt1.helpProp=function(propname){ ///<summary> ///This function returns information about a single property with the given name. ///</summary> ///<parameter name="propname" type="String">String</parameter> ///<returns type="System.String">System.String</returns> }; alt1.helpFull=function(){ ///<summary> ///Returns a html document with documentation about every function and property exposed. ///</summary> ///<returns type="System.String">System.String</returns> }; alt1.helpIntelliSense=function(){ ///<summary> ///Returns a file that can be used to add the alt1 api to Visual Studio IntelliSense ///</summary> ///<returns type="System.String">System.String</returns> }; alt1.ToString=function(){ ///<summary> ///No info available about this method. ///</summary> ///<returns type="System.String">System.String</returns> }; alt1.Equals=function(obj){ ///<summary> ///No info available about this method. ///</summary> ///<parameter name="obj" type="Object">Object</parameter> ///<returns type="System.Boolean">System.Boolean</returns> }; alt1.GetHashCode=function(){ ///<summary> ///No info available about this method. ///</summary> ///<returns type="System.Int32">System.Int32</returns> }; alt1.GetType=function(){ ///<summary> ///No info available about this method. ///</summary> ///<returns type="System.Type">System.Type</returns> };