------Other Commands-------
[Import] <-<< I wonder what this one does!
Format: Import {VBScript file}
or Import {Plug-in DLL file}
Description: Import a VBScript file or plug-in dll file. After imported, the functions in the VBScript file or plug-in can be used directly without VBSCall or Plugin command.
If you want to call a function in VBScript file or plug-in in VBScript block, you must use the Import command. The VBSCall or Plugin command is not supported.
Example:
Import "stdlib.vbs"
name=InputBox("Input your name please")
[VBSBegin]
Format: VBSBegin...VBSEnd
Description: Compose a VBScript block. You can use any VB Script statements(including condition branch, sub program call in VB Script) in the VBScript block, most of the Quick Macro commands are also supported in VBScript block.
[VBSEnd]
Format: VBSBegin...VBSEnd
Description: Compose a VBScript block. You can use any VB Script statements(including condition branch, sub program call in VB Script) in the VBScript block, most of the Quick Macro commands are also supported in VBScript block.
[VBS]
Format: VBS {VB Script statement}
Description: Execute a single line VB Script statement. The keyword 'VBS' can be omitted.
Notice: Only the single line VB Script statement is supported in this command. The multi-line VB Script statements such as If...EndIf,While...Wend are not supported.
[VBSCall]
Format: VBSCall {Extern VB Script function}
Description: Execute an extern VB Script function in a VB Script file. The mostly used VB Script file is the standard library 'stdlib.vbs', it includes many useful functions such as finding color or finding picture in the screen.
[Plugin] <-<< I wonder what this one does!
Format: Plugin {Plug-in name}.{Plug-in function}
Description: Call a function provided by a plug-in. Several plug-in files with complex functions will be included in Quick Macro.
[UserVar]
Format: UserVar {variable name}={default value} {comments}
Description: This command will provide a setup interface for the macro user.
Example:
UserVar var1=30 Use the red pill when the health value is lower than x%
UserVar var2=30 Use the blue pill when the magic value is lower than x%
The macro user can set the value of var1 and var2 in 'Macro properties', to define the working threshold for a auto-supply macro
------Stdio vbscript function-------
[VBSCall Delay]
VBSCall Delay(iMilliSecond)
[VBSCall FindCenterColor]
This function allows you to find the specified color from the center in a certain area of the screen and save the found coordinates into a variable
format
VBSCall Call FindCenterColor(left,top,right,bottom,c,x,y)
Find the point with the color of c from center to outside inside the area and save the coordinates into variables x and y
left,top,right,bottom are integers or integer variables,describing the left,top,right and bottom boundary lines
Color is character string like "0000FF". If not to get variable, don't forget to put it in double quotation marks
If the color has not been found, then the values for x and y will be put -1
for example
VBSCall Call FindCenterColor(0,0,800,600,"0000FF",x,y)
If x>=0 and y>=0
MoveTo x y
EndIf Find the point with the color of red ("0000FF") inside the area (0,0,800,600). If found, then move the mouse to this point
[VBSCall FindColor]
This function allows you to find the specified color in a certain area of the screen and save the found coordinates into a variable
format
VBSCall Call FindColor(left,top,right,bottom,c,x,y)
Find the points with the color of c from left to right and from top to bottom inside the area and save them into variables x and y
left,top,right,bottom are integers or integer variables,describing the left,top,right and bottom boundary lines
Color is character string like "0000FF". If not to get variable,don't forget to put it in double quotation marks
If the color has not been found,then the values for x and y will be put -1
for example
VBSCall Call FindColor(0,0,800,600,"0000FF",x,y)
If x>=0 and y>=0
MoveTo x y
EndIf Find the point with the color of red ("0000FF") inside the area (0,0,800,600). If found, then move the mouse to this point
[VBSCall FindColorEx]
This function will allow you fuzz find the specified color in a certain area of the screen and save the found coordinates into variables
format
VBSCall Call FindColorEx(left,top,right,bottom,c,type,similar,x ,y)
Find the point with the color of c inside the area and save the coordinates into variables x and y
left,top,right,bottom are integers or integer variables,describing the left,top,right and bottom boundary lines
Color is character string like "0000FF". If not to get variable, don't forget to put it in double quotation marks
type indicates find mode. 0 indicates find from top to bottom, from left to right; 1 indicates find from center to outside
similar indicated similarity, only select decimals between 0.3 and 1. The greater the numerical value is,the stricter it requires for similarity. It is recommended to select 0.8
If the color has not been found,then the values for x and y will be put -1
for example
VBSCall Call FindColorEx(0,0,800,600,"0000FF",1,0.8,x,y)
If x>=0 and y>=0
MoveTo x y
EndIf Find the point with the color close to red ("0000FF") from the center inside the area (0,0,800,600). If found,then move the mouse to this point
[VBSCall FindPic]
This function allows you to find the picture with the specified similarity in a certain area of the screen and save the coordinates into variables.
format
VBSCall Call FindPic(left,top,right,bottom,filename,similar,x,y )
Find the bmp file named filename from left to right and then from top to bottom inside the area and save the found coordinated into variables x and y
left,top,right,bottom are integers or integer variables, describing the left,top,right and bottom boundary lines of the area
filename is a picture in bmp format. You need to pick it by yourself. 24-bit is preferable. Set the edge a single color
similar indicates similarity, select decimals between 0.5 and 1. The greater the numerical value is, the stricter it requires for picture similarity and the faster the speed is. It is recommended to select 0.9
If the picture has not been found, then the values for x and y will be put -1
It is recommended to use the picture with single-color edge as shown in the following picture. The QQ picture on the right works much better than the one on the left
[Only registered and activated users can see links. Click Here To Register...]
for example
VBSCall Call FindPic(0,0,1023,767,"1.bmp",0.9,x,y)
If x>=0 and y>=0
MoveTo x y
EndIf Find inside the area (0,0,1023,767) the place similar to the picture in file 1.bmp. If found, then move the mouse to this place
[VBSCall GetCursorPos]
This function allows you get the current mouse position and save it into a variable
format
VBSCall Call GetCursorPos(x,y)
x and y are integer variable, representing x coordinate and y coordinate of the current mouse respectively
You can name a variable at will, not just limited to x and y
for example
VBSCall Call GetCursorPos(mx,my) Put x coordinate and y coordinate of the current mouse position into variables mx and my
[VBSCall GetPixelColor]
This function allows you to get the point color of the specified position and save it into a variable
format
color=GetPixelColor(x,y)
Save the color of the point (x,y) into character string variable color
x and y are integers or integer variables
for example
VBSCall Call GetCursorPos(x,y)
color=GetPixelColor(x,y)
VBSCall Call MessageBox(color) get the current point color and popup a message box to display it
[VBSCall GetScreenResolution]
VBSCall GetScreenResolution(cx,cy)
Save the screen resolutioni to cx and cy variable
[VBSCall InputBox]
This function allows a popup "Input" message box for script users to input some characters
format
x=InputBox(Words prompting the user, for example "Please input password")
Save the information input by the user into variable x
If the prompt information is not a variable, don't forget to put it in double quotation marks
for example
x=InputBox("Please input password")
MessageBox(x) Let users input password and display it
[VBSCall MessageBox]
This function will allow a popup message box in your script and the text in the message box can be variables!
format
VBSCall Call MessageBox(text in message box)
If the text in the message box is not a variable,don't forget to put it in double quotation marks
for example
VBSCall Call MessageBox(CStr(i))Change variable i content into character string and display it
[VBSCall ReadMemory] <-<< I wonder what this one does! :rolleyes:
This function allows you to get the value of the specified memory address of the current active program and save it to variables
format
VBSCall Call ReadMemory(the memory address expressed in hexadecimal integer,read type,value)
Memory address is hexadecimal integer like &H400000,which can be found in game modification tools. Don't forget to add &H which indicates hexadecimal
"read type" can be 0,1 or 2,indicating read one byte, one integer and one long integer respectively
The value read can be stored in the value of long integer variables
for example
VBSCall Call ReadMemory(&h400000,2,val)
MessageBox(CStr(val)) Read a long integer from memory address 400000 and display it
[VBSCall RunApp]
With this function, you can boot a local program or open a file very conveniently
format
VBSCall Call RunApp(the program or file to be run)
If the program path is not a variable, don't forget to put it in double quotation marks
for example
VBSCall Call RunApp("notepad.exe") Run Windows notepad program
[VBSCall SayString]
SayString(Prompt)
[VBSCall SetCursorPos]
VBSCall SetCursorPos(CursorX,CursorY)
[VBSCall GetCursorShape]
This function allows you to get current cursor shape character and save as an integer variable
format
shape=GetCursorShape(Reserved:please keep zero)
Get current cursor shape character as an integer, which usually be used for comparation
for example
VBSCall shape=GetCursorShape(0)
If shape=old_shape
VBSCall MessageBox(shape)
EndIf
Get current cursor shape and compare with variable old_shape the end line(Don't skip over this line)
|