當前位置:首頁 » 編程軟體 » QX雲腳本

QX雲腳本

發布時間: 2023-06-09 12:58:33

1. 按鍵精靈腳本如何適應不同的解析度

游戲中的解析度,和系統的屏幕解析度,其實是兩個東西。並不是你修改了系統屏幕解析度為1920*1080,游戲的解析度就會改成1920*1080。

當然有些游戲,你調整它的解析度的時候,會相應的修改你的系統解析度。但是這個並不是所有的游戲都這樣流氓的。

游戲解析度和系統屏幕解析度區分:

圖1-1920*1080解析度下窗口的大小637.441

圖2-1280*720解析度下窗口的大小637.441

當游戲窗口固定的時候(游戲的解析度固定時),你調整系統的屏幕解析度,其實只是肉眼中圖標變大了。實際上,游戲窗口的解析度並沒有變。

如上圖,一個是系統解析度1920*1080的屏幕解析度,一個是1280*720的屏幕解析度,看起來好像軟體變大了。其實在軟體這個窗口的大小是沒有變的,只是視覺誤差。從上圖的客戶區大小的數值就可以看出來。

游戲解析度改變,游戲圖標等比放大

解決方法:不同的解析度各製作一套對應的圖。調用各解析度,相對應的圖。

有些游戲,游戲解析度修改之後,游戲界面圖標會等比的放大縮小。這種情況,游戲圖標大小會變,位置也會變。由於各個游戲商使用的圖像處理引擎不盡相同,所以根據等比差來進行相對坐標計算是不實際的,這種情況,只能每種游戲解析度都做一套游戲圖標截圖。

解決辦法:霸王硬上弓,腳本直接修改游戲窗體解析度,固定窗口大小。

2. 如何在windows中編寫R程序包

在Windows環境下如何編寫R程序包,即生成供linux環境編譯運行的tar.gz文件,也生成供windows下使用的.zip文件呢?其實並不復雜,只要下載一些工具軟體,按照相應的步驟填寫相應的「表格」,繼而運行一些簡單的指令,就可以生成R的程序包了。

編寫R程序包通常包括以下幾步:

(1) 工具軟體Rtools的安裝和備選軟體的安裝。
(2) r腳本的准備,也就是用來生成程序包的函數腳本。
(3) 利用R中自帶的package.skeleton()函數,生成製作包所需要的Description 文件和幫助文件幫助文件.rd。
(4) 編輯該函數生成的Description 文件和幫助文件.rd
(5) 在windows cmd的命令行中輸入相應的命令,生成zip文件或者.tar.gz

下面我們來一起建立只有一個函數的R程序包,來詳細說明:

一 工具軟體安裝和配置
製作r包的工具軟體包括Rtools,HTML編譯器,MikTeX 或Cte等(備選軟體不一定要安裝):

1 工具軟體安裝
(1)Rtools(製作R包的主要工具)
Rtools是在windows下製作R包的一系列工具,其中包括
1) CYGWIN 在Windows下模擬UNIX環境
2) MinGW編譯器,可用來編譯C和Fortran語言。
3) Perl
下載地址: http://www.murdoch-sutherland.com/Rtools/

(2) 微軟HTML編譯器(備選):

用來從源文件生成HTML格式的幫助文件
下載地址:http://go.microsoft.com/fwlink/?LinkId=14188

(3) MikTeX 或CteX(備選)
用來生成PDF格式的幫助文件
下載地址:http://www.miktex.org/ www.ctex.org/
分別按照要求安裝好。

2 設置文件啟動路徑:
我的電腦>屬性>高級>環境變數>系統變數 PATH一項,點擊「編輯」,檢查是否具有以下路徑,如果沒有,需要手工添加:
c:\Rtools\bin;c:\Rtools\perl\bin;c:\Rtools\MinGW\bin; C:\CTEX\MiKTeX\miktex\bin;C:\CTEX\CTeX\ctex\bin;C:\CTEX\CTeX\cct\bin;C:\CTEX\CTeX\ty\bin;C:\CTEX\Ghostscript\gs8.64\bin;C:\CTEX\GSview\gsview;C:\CTEX\WinEdt;C:\Program Files\R\R-2.9.0\bin\;
設置啟動路徑的目的是在cmd命令行可以直接調用相應的exe文件。

如果只是簡單製作一個個人使用的包,只需將c:\Rtools\bin;c:\Rtools\perl\bin;c:\Rtools\MinGW\bin; 添加到系統路徑即可

二 R腳本的准備
假如現在我們已經有了一個編好的R函數,用來給出回歸的精確結果,存成了r腳本的格式,文件名為linmod.r
其內容如下所示,那麼該如何製作R程序包呢?

linmod<- function(x, y)
{
## compute QR-decomposition of x
qx <- qr(x)
## compute (x'x)^(-1) x'y
coef <- solve.qr(qx, y)
## degrees of freedom and standard deviation of resials
df <- nrow(x)-ncol(x)
sigma2 <- sum((y - x%*%coef)^2)/df
## compute sigma^2 * (x'x)^-1
vcov <- sigma2 * chol2inv(qx$qr)
colnames(vcov) <- rownames(vcov) <- colnames(x)
list(coefficients = coef,
vcov = vcov,
sigma = sqrt(sigma2),
df = df)
}

三 R包框架的准備
1 生成准備文件
登陸R :開始>所有程序>R>R.2.9.0
(1)清除內存中的對象:
rm(list=ls())
(2)設定工作目錄,這里設定為 c:/pa
setwd("c:/pa")
(3)將製作包的源文件 linmod.r拷貝到c:/pa/文件夾下,
之後輸入:
package.skeleton(name="linmod",code_files="c:/pa/linmod.r")

此時,R控制台中顯示
Creating directories ...
Creating DESCRIPTION ...
Creating Read-and-delete-me ...
Saving functions and data ...
Making help files ...
Done.
Further steps are described in './linmod/Read-and-delete-me'.
>

可以看到c:/pa文件夾下新出現了一個linmod文件夾
該文件夾下的內容就是R包的框架,包括data文件夾,man文件夾,只要按要求將其填寫完整,再進行相應的編譯即可。
首先查看Read-and-delete-me文件
文件內容如下:

* Edit the help file skeletons in 'man', possibly combining help
files for multiple functions.
* Put any C/C++/Fortran code in 'src'.
* If you have compiled code, add a .First.lib() function in 'R' to
load the shared library.
* Run R CMD build to build the package tarball.
* Run R CMD check to check the package tarball.
Read "Writing R Extensions" for more information.

大致意思如下:
可以man文件夾下編輯幫助文件
C/C++/Fortran 的源代碼應該放入src文件夾下
需要在登錄時載入包
可以運行R CMD建立和檢查相應的包
查看更多信息,應該閱讀Writing R Extensions

2 編輯Description文件和rd文件
(1) Description文件的編輯
按照提示,填好各項

Package: linmod
Type: Package
Title: test for linear regression
Version: 1.0
Date: 2009-07-20
Author: helixcn
Maintainer: helixcn <[email protected]>
Description: To give the exactly results of linear regression.
License: GNU 2 or later
LazyLoad: yes

(2)man文件夾中.rd文件編輯
man文件夾中包含兩個文件 linmod.Rd和linmod-package.Rd,分別是對linmod()函數和linmod包的介紹,下面逐項填寫:

1) linmod.Rd
\name{linmod}
\Rdversion{1.1}
\alias{linmod}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
linear regression
}
\description{
to give the more exactly results of linear regression
}
\usage{
linmod(x, y)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{x}{
a numeric design matrix for the model
}
\item{y}{
a numeric vector of responses
}
}
\details{
%% ~~ If necessary, more details than the description above ~~
}
\value{

%% ~Describe the value returned
%% If it is a LIST, use
%% \item{comp1 }{Description of 'comp1'}
%% \item{comp2 }{Description of 'comp2'}
%% ...
}
\references{
Friedrich Leisch,2008 Creating R Packages: A Tutorial
}
\author{
helixcn
}
\note{
Please read Friedrich Leisch,2008
}
%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
%% ~~objects to See Also as \code{\link{help}}, ~~~
}
\examples{
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, y)
{
qx <- qr(x)
coef <- solve.qr(qx, y)
df <- nrow(x) - ncol(x)
sigma2 <- sum((y - x \%*\% coef)^2)/df
vcov <- sigma2 * chol2inv(qx$qr)
colnames(vcov) <- rownames(vcov) <- colnames(x)
list(coefficients = coef, vcov = vcov, sigma = sqrt(sigma2),
df = df)
}
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{ ~kwd1 }
\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line

2)linmod-package.Rd
\name{linmod-package}
\Rdversion{1.1}
\alias{linmod-package}
\alias{linmod}
\docType{package}
\title{Linear Regression Modification}
\description{to Give the more exactly output of linear regression rather than R default}
\details{
\tabular{ll}{
Package: \tab linmod\cr
Type: \tab Package\cr
Version: \tab 1.0\cr
Date: \tab 2009-07-20\cr
License: \tab GNU 2.0 or later\cr
LazyLoad: \tab yes\cr
}
~~The aim of the package was to give the more exactly output of linear regression~~ linmod~~
}
\author{helixcn
Maintainer: helixcn <[email protected]>}
\references{
Friedrich Leisch,2008,Creating R Packages: A Tutorial
}
\seealso{lm}
\examples{
data(cats, package="MASS")
mod1 <- linmod(Hwt~Bwt*Sex, data=cats)
mod1
summary(mod1)
}

四 通過cmd創建R包

開始>運行>cmd
鍵入 cd c:\pa\ 將工作目錄轉移到c:/pa下

鍵入 Rcmd build --binary linmod 製作window zip包
鍵入 Rcmd build linmod 製作linux平台下可運行的tar.gz包
命令運行完之後可以發現,在c:/pa/文件夾下分別生成了linmod.zip和linmod.tar.gz壓縮包。

注意R CMD 系列命令是在windows控制台下運行,而非R控制台

參考網址
[1]http://www.robjhyndman.com/researchtips/building-r-packages-for-windows/
[2]http://cran.r-project.org/doc/contrib/Leisch-CreatingPackages.pdf
[3]http://faculty.chicagobooth.e/peter.rossi/research/bayes%20book/bayesm/Making%20R%20Packages%20Under%20Windows.pdf
[4]http://www.biostat.uni-hannover.de/teaching/fallstudien/schaarschmidt2.pdf

3. 按鍵精靈自動打怪腳本如何設置

[Script]
Plugin hwnd=Window.Foreground()
Import window.dll
VBSBegin
win=Window.Foreground()
client=Window.GetClientRect(win)
s=split(client,"|")
dx=s(0)
dy=s(1)
zx=s(2)
zy=s(3)
VBSEnd
Dim red,blue,bbred,redwait,bluewait,monwait,fqg,jb,a,b,c,k,q,s1,s2,s3,s4,s5,s6,s7,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10
t1=now:t2=now:t3=now:t4=now:t5=now:t6=now:t7=now:a=0:b=0:c=0:q=0
UserVar fqg=DropList{防搶怪:0|不防搶怪:1}=0 防搶怪設置
UserVar jb=DropList{不撿包:0|自動撿包:1}=0 是否撿物
UserVar s1=2 門派普攻F1間隔(秒)
UserVar s2=20 單體攻擊F2間隔(秒)
UserVar s3=20 單體攻擊F3間隔(秒)
UserVar s4=25 怒氣攻擊F4間隔(秒)
UserVar s5=80 自定技能F5間隔(秒)
UserVar s6=60 BB技能F6間隔(秒)
UserVar s7=10 狀態技能F7間隔(分)
UserVar red=DropList{30%:30|50%:50|70%:70}=1 血少於%加血F8
UserVar blue=DropList{30%:30|50%:50|70%:70}=0 藍少於%加藍F9
UserVar bbred=DropList{沒有出戰:0|20%:20|30%:30|50%:50}=2 寵少於%加血F10
UserVar redwait=1 紅葯冷卻時間(秒)
UserVar bluewait=1 藍葯冷卻時間(秒)
UserVar monwait=100 尋怪延時(毫秒)
PutAttachment .\plugin *.dll
Rem 開始
Delay monwait
Gosub 驗證碼
Gosub 找怪
If fqg=0
IfColor dx+369,dy+31,1E252A,2
Goto 開始
EndIf
EndIf
Rem 繼續殺怪
Gosub 判斷血藍狀態
Gosub BB血狀態
Gosub 殺怪
Rem End
EndScript
Sub 驗證碼
Rem 再次報警
VBSCall FindPic(0,50,600,550,"Attachment:\yz1.bmp",0.9,x,y)
If x>0 and y>0
Plugin SimPlayer.ring(19)
//使用了聲音插件,需要自己去官網下載
Delay 2000
EndIf
While x>0
VBSCall FindPic(0,300,600,550,"Attachment:\20S.bmp",0.9,x,y)
If x>=0 and y>=0
IfColor x+17,y+9-k,FFFFFF,0
KeyPress 27 1
Delay 1000
MoveTo dx+446,dy+315
Delay 1000
LeftClick 1
Goto End
EndIf
Else
Goto 再次報警
EndIf
EndWhile
Return 驗證碼
Sub 判斷血藍狀態
IfColor red/100*120+66+dx,dy+31,222222,2
a=a+1
Else
EndIf
IfColor blue/100*120+66+dx dy+37 222222 2
b=b+1
Else
EndIf
Return 判斷血藍狀態
Sub BB血狀態
If bbred>0
IfColor bbred+91+dx dy+69 111111 2
c=c+1
EndIf
EndIf
Return BB血狀態
Sub 找怪
KeyDown 1,1
Delay 10
KeyPress 9,1
Delay 10
KeyUp 1,1
Delay 10
Return 找怪
Sub 殺怪
IfColor dx+247,dy+31,0019FF,2
IfColor dx+261,dy+31,0011ff,2
Gosub 技能
Else
KeyPress 12 1
Delay 1000
EndIf
Goto 繼續殺怪
Else
If jb=1
Gosub 撿包
Else
Goto 開始
EndIf
EndIf
Return 殺怪
Sub 怒氣判斷
IfColor qx+126,qy+43,00ffff,2
q=1
EndIf
IfColor qx+188,qy+43,00ffff,2
q=2
EndIf
Return 怒氣判斷
Sub 技能
Goto 開始
If DateDiff("s",t1,now)>=s1
KeyPress 12 1
t1=now
Delay 100
EndIf
IfColor dx+261,dy+31,0011ff,2
If DateDiff("s",t2,now)>=s2
Delay 500
KeyPress 113 1
t2=now
Delay 500
EndIf
Else
EndIf
IfColor dx+261,dy+31,0011ff,2
If DateDiff("s",t3,now)>=s3
Delay 500
KeyPress 114 1
t3=now
Delay 500
EndIf
Else
EndIf
Gosub 怒氣判斷
IfColor dx+261,dy+31,0011ff,2
If DateDiff("s",t4,now)>=s4 and q>=1
Delay 500
KeyPress 115 1
t4=now:q=q-1
Delay 500
EndIf
Else
EndIf
IfColor dx+261,dy+31,0011ff,2
If DateDiff("s",t5,now)>=s5
Delay 500
KeyPress 116 1
t5=now
Delay 500
EndIf
Else
EndIf
IfColor dx+261,dy+31,0011ff,2
If DateDiff("s",t6,now)>=s6
KeyPress 117 1
t6=now
Delay 100
EndIf
EndIf
If DateDiff("n",t7,now)>=s7
MoveTo dx+36,dy+35
LeftClick 1
Delay 100
KeyPress 118 1
t7=now
Delay 100
KeyDown 17,1
Delay 10
KeyPress 9,1
Delay 10
KeyUp 17,1
Delay 10
EndIf
If DateDiff("s",t8,now)>=redwait and a>=1
KeyPress 119 1
t8=now:a=0
Delay 500
EndIf
If DateDiff("s",t9,now)>=bluewait and b>=1
KeyPress 120 1
t9=now:b=0
Delay 500
EndIf
If DateDiff("s",t10,now)>=1 and c>=1
KeyPress 121 1
t10=now
c=0
Delay 500
EndIf
Return 技能
Sub 撿包
Dim v,i,n,d,l,m,a1,b1,a2,b2,shape,x0,y0,k1,k2,x1,y1
l=20:m=2:a1=dx+286:b1=dy+200:a2=dx+486:b2=dy+400:x0=dx+366:y0=dy+300:d=954439560
If x0-a1>=a2-x0
n=a1
Else
n=x0-(a2-x0)
EndIf
Rem 開始搜索
v=l
i=m
x1=x0:y1=y0-v
While x1>=n
k1=0:k2=v
For 2
For i
x1=x1+k1:y1=y1+k2
If x1>=a1 and x1<=a2 and y1>=b1 and y1<=b2
MoveTo x1,y1
Delay 2
VBSCall shape=GetCursorShape(0)
If shape=d
Delay 50
RightClick 1
Delay 400
Goto 開始
EndIf
EndIf
EndFor
k1=v:k2=0
EndFor
i=i+1:v=v*(-1)
EndWhile
Goto 開始
Return 撿包

4. 按鍵精靈如何使用如何用按鍵精靈做腳本

打開「xx瀏覽器」軟體,打開瀏覽器之後,下載「按鍵精靈」軟體,下載好「按鍵精靈」之後,面對製作腳本為導向,下載好「按鍵精靈」之後,面對製作腳本為導向,需要進行以下步驟操作:立即體驗-快速引導-第一次寫腳本-滑鼠左鍵連點然後提示著做完就好了。

熱點內容
騰訊雲伺服器購買網址 發布:2025-02-11 21:37:46 瀏覽:60
安卓電話視頻怎麼投電視上 發布:2025-02-11 21:32:27 瀏覽:18
易簽到源碼 發布:2025-02-11 21:31:03 瀏覽:498
編程班會 發布:2025-02-11 21:27:19 瀏覽:738
ubuntu編譯fortran 發布:2025-02-11 21:21:59 瀏覽:201
雲伺服器寬頻單位 發布:2025-02-11 20:48:11 瀏覽:538
安卓數據線公頭是哪個 發布:2025-02-11 20:45:42 瀏覽:812
網址原始密碼是什麼 發布:2025-02-11 20:33:52 瀏覽:72
怎麼創建伺服器我的世界網易 發布:2025-02-11 20:18:36 瀏覽:467
伺服器電腦與客戶端的連接 發布:2025-02-11 20:18:32 瀏覽:36