11 #include "ui_mainwindow.h"
17 #include <qcoreapplication.h>
19 #include <QKeyEventTransition>
21 #include <QtGui/QMouseEvent>
25 #include <QApplication>
28 #include <QVariantList>
29 #include <QDesktopServices>
30 #include <QMessageBox>
41 path=QCoreApplication::applicationDirPath();
42 QString cmdStr=
"Regsvr32"+path+
"/dm.dll /s";
44 process.start(
"cmd",QStringList()<<
"/c"<<cmdStr);
45 process.waitForStarted();
46 process.waitForFinished();
55 HWND hq=FindWindow(L
"Qt5QWindowIcon",L
"seer");
56 qDebug()<<
"hq"<<(int)hq;
58 test=GetWindow(test,2);
59 test=GetWindow(test,5);
60 test=GetWindow(test,5);
61 test=GetWindow(test,5);
62 test=GetWindow(test,5);
63 test=GetWindow(test,5);
64 test=GetWindow(test,5);
91 allpath=QCoreApplication::applicationDirPath();
95 QSettings *configIniWrite =
new QSettings(
allpath+
"/set.ini", QSettings::IniFormat);
97 qDebug()<<
"agree"<<configIniWrite->value(
"agree").toString();
98 if(configIniWrite->value(
"agree").toString()!=
"true")
104 delete configIniWrite;
107 qDebug()<<
"atosuccess";
117 ui->axWidget->setControl(QString::fromUtf8(
"{8856F961-340A-11D0-A96B-00C04FD705A2}"));
118 ui->axWidget->setProperty(
"DisplayAlerts",
false);
119 ui->axWidget->setProperty(
"DisplayScrollBars",
true);
120 QString webstr=QString(
"http://seer.61.com/play.shtml");
121 ui->axWidget->dynamicCall(
"Navigate(const QString&)",webstr);
135 connect(
ui->action,SIGNAL(triggered()),
this,SLOT(
FreshSeer()));
136 connect(
ui->action_2,SIGNAL(triggered()),
this,SLOT(
Mute()));
137 connect(
ui->action_3,SIGNAL(triggered()),
this,SLOT(
unMute()));
139 connect(
ui->action_5,SIGNAL(triggered()),
this,SLOT(
speedopen()));
141 connect(
ui->action_ie,SIGNAL(triggered()),
this,SLOT(
ClearCache()));
143 connect(
ui->action_8,SIGNAL(triggered()),
this,SLOT(
script_open()));
144 connect(
ui->action_9,SIGNAL(triggered()),
this,SLOT(
Openscript()));
147 connect(
ui->action_ce,SIGNAL(triggered()),
this,SLOT(
Opence()));
148 connect(
ui->action_fd,SIGNAL(triggered()),
this,SLOT(
Openfd()));
149 connect(
ui->action_cdk,SIGNAL(triggered()),
this,SLOT(
Inputcdk()));
150 connect(
ui->action_4,SIGNAL(triggered()),
this,SLOT(
PeakMode()));
151 connect(
ui->action_21,SIGNAL(triggered()),
this,SLOT(
seer_cal()));
155 connect(
ui->action_22,SIGNAL(triggered()),
this,SLOT(
slot_author()));
159 connect(
ui->bag_sk,SIGNAL(triggered()),
this,SLOT(
Changebag_sk()));
160 connect(
ui->bag_fs,SIGNAL(triggered()),
this,SLOT(
Changebag_fs()));
161 connect(
ui->bag_ld,SIGNAL(triggered()),
this,SLOT(
Changebag_ld()));
162 connect(
ui->bag_hd,SIGNAL(triggered()),
this,SLOT(
Changebag_hd()));
163 connect(
ui->bag_dy,SIGNAL(triggered()),
this,SLOT(
Changebag_dy()));
164 connect(
ui->bag_xa,SIGNAL(triggered()),
this,SLOT(
Changebag_xa()));
165 connect(
ui->bag_wl,SIGNAL(triggered()),
this,SLOT(
Changebag_wl()));
166 connect(
ui->bag_ys,SIGNAL(triggered()),
this,SLOT(
Changebag_ys()));
167 connect(
ui->bag_tz,SIGNAL(triggered()),
this,SLOT(
Changebag_tz()));
168 connect(
ui->bag_yy,SIGNAL(triggered()),
this,SLOT(
Changebag_yy()));
169 connect(
ui->bag_tq,SIGNAL(triggered()),
this,SLOT(
Changebag_tq()));
170 connect(
ui->bag_yh,SIGNAL(triggered()),
this,SLOT(
Changebag_yh()));
173 connect(
ui->actionyijian,SIGNAL(triggered()),
this,SLOT(
show_csp()));
182 connect(
ui->action_13,SIGNAL(triggered(
bool)),
n,SLOT(slot_startedTimer_clicked(
bool)));
183 connect(
ui->action_14,SIGNAL(triggered()),
this,SLOT(
dianfeng()));
184 connect(
this,SIGNAL(
sendcap(
bool)),
n,SLOT(slot_capture(
bool)));
185 connect(
this,SIGNAL(
sendtip(QString)),
n,SLOT(slot_tip(QString)));
186 connect(
n,SIGNAL(signal_fresh()),
this,SLOT(
FreshSeer()));
187 connect(
n,SIGNAL(signal_sb()),
this,SLOT(
slot_sb()));
189 qDebug()<<
"nono信号无问题";
192 QScreen *screen=QGuiApplication::primaryScreen ();
193 QRect mm=screen->availableGeometry() ;
194 int screen_width = mm.width();
195 int screen_height = mm.height();
196 n->move(50,screen_height-
n->height()-50);
197 this->setAttribute(Qt::WA_QuitOnClose,
true);
229 nam =
new QNetworkAccessManager(
this);
230 connect(
nam,SIGNAL(finished(QNetworkReply*)),
this,SLOT(
slot_new(QNetworkReply*)));
232 url.setUrl(
"http://jlhsmuseum.cn/news/test.json");
233 QNetworkRequest request;
235 request.setHeader(QNetworkRequest::ContentTypeHeader,QVariant(
"application/x-www-form-urlencoded"));
236 QNetworkReply* reply =
nam->get(request);
239 QFile::link(
allpath+
"/星小夜的seer登录器.exe", QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).append(
"/").append(
"星小夜的seer登录器.lnk"));
246 QNetworkReply::NetworkError err = reply->error();
248 if(err != QNetworkReply::NoError) {
249 qDebug() <<
"accFailed: " << reply->errorString();
252 QString str = reply->readAll();
254 QJsonParseError json_error;
255 QJsonDocument parse_doucment = QJsonDocument::fromJson(str.toUtf8(), &json_error);
256 QJsonObject obj = parse_doucment.object();
260 new_time=obj.take(
"time").toString();
262 new_news=obj.take(
"news").toString();
268 QMessageBox::about(NULL,
"tip",
"抱歉,星小夜登录器停止使用,如果非公告停止那么请检查网络连接");
272 QMessageBox::about(NULL,
"tip",
new_news);
278 QDesktopServices::openUrl(QUrl(
new_upurl));
320 HWND hq=(HWND)this->winId();
321 qDebug()<<
"hq"<<(int)hq;
322 test=GetWindow(hq,5);
323 test=GetWindow(test,2);
324 test=GetWindow(test,5);
325 test=GetWindow(test,5);
326 test=GetWindow(test,5);
327 test=GetWindow(test,5);
328 test=GetWindow(test,5);
329 test=GetWindow(test,5);
335 dm.setControl(
"dm.dmsoft");
339 QMessageBox::information(
this,
"this",
"关于绑定失败,请在群公告内查找解决方法[记得关闭杀毒软件],若不看公告,私聊星夜大概率会被拉黑");
341 QMessageBox::information(
this,
"this",
"错误代码:0,本错误请关闭所有杀毒软件,并用管理员模式启动");
343 QString tmp=
"错误代码:"+QString::number(
dm.
GetLastError())+
",可发送错误代码给星夜咨询错误问题";
344 QMessageBox::information(
this,
"this",tmp);
352 dm.
FindPic(0,0,1000,600,
"test.bmp",
"000000",0.8,0,x,y);
353 qDebug()<<x.toInt()<<y.toInt();
366 ui->axWidget->dynamicCall(
"Refresh(void)");
375 emit
sendtip(
"小赛尔,游戏静音成功啦,如果没有成功再按一次");
392 SetProcessWorkingSetSize(GetCurrentProcess(),-1,-1);
393 emit
sendtip(
"内存优化成功,如果还是卡顿建议刷新");
401 SetProcessWorkingSetSize(GetCurrentProcess(),-1,-1);
402 emit
sendtip(
"内存释放成功,如果还是卡顿建议刷新");
411 process.start(
"cmd",QStringList()<<
"/c"<<
"RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8");
412 process.waitForStarted();
413 process.waitForFinished();
414 emit
sendtip(
"ie缓存清理成功,如果还是卡顿建议刷新");
424 QString strPath =
allpath+
"/工具/ce6.8.exe";
425 pro.startDetached(strPath);
426 emit
sendtip(
"Cheatengine正在加载中,请不要用此工具做出不允许的事情哦");
435 QString strPath =
allpath+
"/工具/Fiddler/Fiddlerh.exe";
436 pro.startDetached(strPath);
437 emit
sendtip(
"fiddler正在加载中,请不要用此工具做出不允许的事情哦");
446 QString strPath =
allpath+
"/工具/录制/星小夜的键鼠录制工具.exe";
447 pro.startDetached(strPath);
448 emit
sendtip(
"鼠标录制器启动中,可以开始做你的脚本啦");
456 QMessageBox::information(NULL,
"this",
"开发中");
479 emit
sendtip(
"脚本已打开,本功能搜集自网络,星夜对本功能带来的一切后果概不负责");
489 s.move(this->x(),this->y()+this->height());
490 emit
sendtip(
"变速功能已开启,请正确合理地使用该功能哦");
501 emit
sendtip(
"一键更换时空成功啦,快看看换好的套装吧");
511 emit
sendtip(
"一键更换腐蚀者成功啦,快看看换好的套装吧");
521 emit
sendtip(
"一键更换零度成功啦,快看看换好的套装吧");
531 emit
sendtip(
"一键更换皇帝成功啦,快看看换好的套装吧");
541 emit
sendtip(
"一键更换毒液成功啦,快看看换好的套装吧");
551 emit
sendtip(
"一键更换笑傲成功啦,快看看换好的套装吧");
561 emit
sendtip(
"一键更换未来成功啦,快看看换好的套装吧");
571 emit
sendtip(
"一键更换元神成功啦,快看看换好的套装吧");
581 emit
sendtip(
"一键更换天尊成功啦,快看看换好的套装吧");
591 emit
sendtip(
"一键更换银翼成功啦,快看看换好的套装吧");
601 emit
sendtip(
"一键更换天启成功啦,快看看换好的套装吧");
611 emit
sendtip(
"一键更换浴火成功啦,快看看换好的套装吧");
640 while(
dm.
FindPic(18,11,526,316,
"查看个人信息.bmp",
"000000",0.8,0,x,y)==-1){
657 PostMessage(pid, WM_CHAR, c.unicode(), 0);
668 while(
dm.
FindPic(0,0,1000,600,
"装备选完.bmp",
"000000",0.8,0,x,y)==-1){
686 QString strPath =
allpath+
"/工具/自定义脚本工具.exe";
687 pro.startDetached(strPath);
688 emit
sendtip(
"自定义脚本工具加载中,发挥你的创意吧");
709 QString strPath =
allpath+
"/工具/赛尔数据计算器/赛尔数据计算器.exe";
710 pro.startDetached(strPath);
711 emit
sendtip(
"赛尔数值计算器正在加载中(by橙汁)");
726 QDesktopServices::openUrl(QUrl(
"https://www.bilibili.com/video/BV1qz411B7En"));
733 QDesktopServices::openUrl(QUrl(
"https://github.com/Starlitnightly/seer_logon"));
750 QMessageBox::about(NULL,
"help",
"作者:星夜\n"