Skip to content
This repository was archived by the owner on Feb 28, 2022. It is now read-only.

Commit f62442e

Browse files
committed
- replace Script::Debug::Wait(); with waitPauseProcess(); because it not compiled under x32 platform
- at ret command it back to row index=0 -
1 parent 0fb4e4a commit f62442e

File tree

7 files changed

+112
-105
lines changed

7 files changed

+112
-105
lines changed

AdvancedScript/AdvancedScript.vcxproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,6 @@
229229
<DependentUpon>MainForm.h</DependentUpon>
230230
</EmbeddedResource>
231231
</ItemGroup>
232-
<ItemGroup>
233-
<None Include="licenses.licx" />
234-
</ItemGroup>
235232
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
236233
<ImportGroup Label="ExtensionTargets">
237234
</ImportGroup>

AdvancedScript/AdvancedScript.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,4 @@
193193
<Filter>Resource Files</Filter>
194194
</EmbeddedResource>
195195
</ItemGroup>
196-
<ItemGroup>
197-
<None Include="licenses.licx" />
198-
</ItemGroup>
199196
</Project>

AdvancedScript/MainForm.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,8 @@ namespace AdvancedScript {
492492
}
493493
else
494494
{
495-
Script::Debug::Wait();
495+
//Script::Debug::Wait(); // problem in compile under x32 platform
496+
waitPauseProcess();
496497
}
497498
}
498499
else
@@ -501,7 +502,9 @@ namespace AdvancedScript {
501502
}
502503
else
503504
{
504-
Script::Debug::Wait();
505+
//Script::Debug::Wait();
506+
waitPauseProcess();
507+
505508
}
506509
}
507510
else
@@ -513,6 +516,8 @@ namespace AdvancedScript {
513516
}
514517
FileVariableTreeView();
515518
if (reten_) { /// it mean it hit ret command
519+
DGV1->Rows[0]->Selected = true;
520+
ScriptargumentClass::Scriptargument_->setLineNumber(0);
516521
reten_ = false;
517522
Run = false;
518523
}

AdvancedScript/Parser.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ bool CheckexcutedCmd(String^ cmd_);
1212
String^ findHexValue(String^ input, String^% oldvalue_);
1313
String^ resolveString(String^ input, int% commaCount);
1414
String^ argumentValue(String^ argument, String^% OldValue_);
15-
String^ GetArgValueByType(String^ argument, VarType type_);
16-
String^ StrAnalyze(String^ input, VarType type_);
15+
String^ GetArgValueByType(String^ argument, VarType type_, bool Add0x=false);
16+
String^ StrAnalyze(String^ input, VarType type_,bool Add0x=false);
1717
String^ returnSpaces(int SpaceNum);
1818
String^ replaceValueBetweenBrackets(String^ input_);
1919
//script test

AdvancedScript/Register_UnRegister_Commands.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void registerCommand(const char* command, CBPLUGINCOMMAND cbCommand, bool debugo
7676
//////////////////////////////////////////////////////// WE NEED to fill this List of Template's at fist load
7777
void RegisterCommands(PLUG_INITSTRUCT* initStruct)
7878
{
79-
_plugin_logputs(Str2ConstChar(Environment::NewLine + "[AdvancedScript 2.5 beta] || Coded By AhmadMansoor /exetools "));
79+
_plugin_logputs(Str2ConstChar(Environment::NewLine + "[AdvancedScript 2.8 ] || Coded By AhmadMansoor /exetools "));
8080
_plugin_logputs(Str2ConstChar(Environment::NewLine));
8181

8282
registerCommand("Scriptw", cbMainForm, false);
@@ -192,8 +192,11 @@ static bool test(int argc, char* argv[]) {
192192
memcpy(xc, l, sizeof(l));
193193
Script::Memory::WriteByte(Script::Register::Get(Script::Register::R8), xc[0]);*/
194194

195-
ScriptFunList::VarList[0]->ResizeArr(10);
196-
195+
//ScriptFunList::VarList[0]->ResizeArr(10);
196+
unsigned char x; // = new char[MAX_STRING_SIZE];
197+
String^ d = StringFormatInline_Str("{rip");
198+
duint h = Hex2duint(d);
199+
x = Script::Memory::ReadByte(h);
197200

198201
return true;
199202

AdvancedScript/ScriptArgumentWindow.h

Lines changed: 97 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ using namespace System::Windows::Forms;
99

1010

1111
namespace ScriptWindowArg {
12-
12+
1313
ref class Scriptargument
1414
{
1515
private:
@@ -47,7 +47,7 @@ namespace ScriptWindowArg {
4747
"memdump",
4848
"writestr",*/
4949
"if",
50-
"goto"
50+
"goto"
5151
};
5252
return Array::IndexOf(CommandsArray_, input_->ToLower()); // if -1 then not found
5353
};
@@ -61,7 +61,7 @@ namespace ScriptWindowArg {
6161
}
6262
public:
6363
int GetMaxLine() {
64-
return MaxLine ;
64+
return MaxLine;
6565
}
6666
public:
6767
int GetLineNumber() {
@@ -106,7 +106,7 @@ namespace ScriptWindowArg {
106106
memdump,
107107
writestr,*/
108108
ifx,
109-
goto_
109+
goto_
110110
};
111111

112112
bool reten_ = false;
@@ -130,89 +130,89 @@ namespace ScriptWindowArg {
130130

131131
int CmdExist = ScriptargumentClass::Scriptargument_->isCommandsExist(cmd_->Trim());
132132
if (CmdExist >= 0) {
133-
char* argv = new char[50];
134-
strcpy(argv, Str2CharPTR(Line_));
133+
char* argv = new char[50];
134+
strcpy(argv, Str2CharPTR(Line_));
135135
switch (CmdExist)
136136
{
137-
/*case ScriptWindowArg::scriptw:
138-
break;
139-
case ScriptWindowArg::logxjustatbp:
140-
ret_ = ::cbLogxJustAtBP(0, &argv);
141-
break;
142-
case ScriptWindowArg::logxtemplatemanager:
143-
break;
144-
case ScriptWindowArg::logxwindow:
145-
break;
146-
case ScriptWindowArg::logx:
147-
ret_ = ::logx(0, &argv);
148-
break;
149-
case ScriptWindowArg::logxtrace:
150-
break;
151-
case ScriptWindowArg::strcompx:
152-
break;
153-
case ScriptWindowArg::varx:
154-
ret_ = Varx(0, &argv);
155-
break;
156-
case ScriptWindowArg::getx:
157-
ret_ = GetVarx(0, &argv);
158-
break;
159-
case ScriptWindowArg::printx:
160-
ret_ = GetVarx(0, &argv);
161-
break;
162-
case ScriptWindowArg::setx:
163-
ret_ = SetVarx(0, &argv);
164-
break;
165-
case ScriptWindowArg::movx:
166-
ret_ = ::Movx(0, &argv);
167-
break;
168-
case ScriptWindowArg::addx:
169-
ret_ = ::addx(0, &argv);
170-
break;
171-
case ScriptWindowArg::subx:
172-
ret_ = ::subx(0, &argv);
173-
break;
174-
case ScriptWindowArg::mulx:
175-
ret_ = ::mulx(0, &argv);
176-
break;
177-
case ScriptWindowArg::andx:
178-
ret_ = ::andx(0, &argv);
179-
break;
180-
case ScriptWindowArg::orx:
181-
ret_ = ::orx(0, &argv);
182-
break;
183-
case ScriptWindowArg::xorx:
184-
ret_ = ::xorx(0, &argv);
185-
break;
186-
case ScriptWindowArg::shlx:
187-
ret_ = ::shlx(0, &argv);
188-
break;
189-
case ScriptWindowArg::pushx:
190-
ret_ = ::pushx(0, &argv);
191-
break;
192-
case ScriptWindowArg::popx:
193-
ret_ = ::popx(0, &argv);
194-
break;
195-
case ScriptWindowArg::cmpx:
196-
ret_ = ::cmpx(0, &argv);
197-
break;
198-
case ScriptWindowArg::findx:
199-
ret_ = ::findx(0, &argv);
200-
break;
201-
case ScriptWindowArg::findallx:
202-
ret_ = ::findallx(0, &argv);
203-
break;
204-
case ScriptWindowArg::findallmemx:
205-
ret_ = ::findallmemx(0, &argv);
206-
break;
207-
case ScriptWindowArg::varxclear:
208-
ret_ = ::VarxClear(0, &argv);
209-
break;
210-
case ScriptWindowArg::memdump:
211-
ret_ = ::memdump(0, &argv);
212-
break;
213-
case ScriptWindowArg::writestr:
214-
ret_ = ::WriteStr(0, &argv);
215-
break;*/
137+
/*case ScriptWindowArg::scriptw:
138+
break;
139+
case ScriptWindowArg::logxjustatbp:
140+
ret_ = ::cbLogxJustAtBP(0, &argv);
141+
break;
142+
case ScriptWindowArg::logxtemplatemanager:
143+
break;
144+
case ScriptWindowArg::logxwindow:
145+
break;
146+
case ScriptWindowArg::logx:
147+
ret_ = ::logx(0, &argv);
148+
break;
149+
case ScriptWindowArg::logxtrace:
150+
break;
151+
case ScriptWindowArg::strcompx:
152+
break;
153+
case ScriptWindowArg::varx:
154+
ret_ = Varx(0, &argv);
155+
break;
156+
case ScriptWindowArg::getx:
157+
ret_ = GetVarx(0, &argv);
158+
break;
159+
case ScriptWindowArg::printx:
160+
ret_ = GetVarx(0, &argv);
161+
break;
162+
case ScriptWindowArg::setx:
163+
ret_ = SetVarx(0, &argv);
164+
break;
165+
case ScriptWindowArg::movx:
166+
ret_ = ::Movx(0, &argv);
167+
break;
168+
case ScriptWindowArg::addx:
169+
ret_ = ::addx(0, &argv);
170+
break;
171+
case ScriptWindowArg::subx:
172+
ret_ = ::subx(0, &argv);
173+
break;
174+
case ScriptWindowArg::mulx:
175+
ret_ = ::mulx(0, &argv);
176+
break;
177+
case ScriptWindowArg::andx:
178+
ret_ = ::andx(0, &argv);
179+
break;
180+
case ScriptWindowArg::orx:
181+
ret_ = ::orx(0, &argv);
182+
break;
183+
case ScriptWindowArg::xorx:
184+
ret_ = ::xorx(0, &argv);
185+
break;
186+
case ScriptWindowArg::shlx:
187+
ret_ = ::shlx(0, &argv);
188+
break;
189+
case ScriptWindowArg::pushx:
190+
ret_ = ::pushx(0, &argv);
191+
break;
192+
case ScriptWindowArg::popx:
193+
ret_ = ::popx(0, &argv);
194+
break;
195+
case ScriptWindowArg::cmpx:
196+
ret_ = ::cmpx(0, &argv);
197+
break;
198+
case ScriptWindowArg::findx:
199+
ret_ = ::findx(0, &argv);
200+
break;
201+
case ScriptWindowArg::findallx:
202+
ret_ = ::findallx(0, &argv);
203+
break;
204+
case ScriptWindowArg::findallmemx:
205+
ret_ = ::findallmemx(0, &argv);
206+
break;
207+
case ScriptWindowArg::varxclear:
208+
ret_ = ::VarxClear(0, &argv);
209+
break;
210+
case ScriptWindowArg::memdump:
211+
ret_ = ::memdump(0, &argv);
212+
break;
213+
case ScriptWindowArg::writestr:
214+
ret_ = ::WriteStr(0, &argv);
215+
break;*/
216216
case ScriptWindowArg::ifx:
217217
{
218218
String^ Line2Jmp_;
@@ -230,7 +230,7 @@ namespace ScriptWindowArg {
230230
ScriptargumentClass::Scriptargument_->setLineNumber(Line2Jmp);
231231
return true;
232232
}
233-
break;
233+
break;
234234
}
235235
case ScriptWindowArg::goto_: {
236236
String^ Line2Jmp_;
@@ -248,7 +248,7 @@ namespace ScriptWindowArg {
248248
ScriptargumentClass::Scriptargument_->setLineNumber(Line2Jmp);
249249
return true;
250250
}
251-
}
251+
}
252252
default: // case non of them begin with command
253253
ret_ = DbgCmdExecDirect(Str2ConstChar(Line_));
254254
break;
@@ -266,7 +266,7 @@ namespace ScriptWindowArg {
266266
else
267267
{
268268
ret_ = DbgCmdExecDirect(Str2ConstChar(Line_));
269-
Script::Debug::Wait();
269+
//Script::Debug::Wait();
270270
if (ret_) {
271271
ScriptargumentClass::Scriptargument_->setLineNumber(ScriptargumentClass::Scriptargument_->GetLineNumber() + 1);
272272
return ret_;
@@ -283,7 +283,7 @@ namespace ScriptWindowArg {
283283
else
284284
{
285285
ret_ = DbgCmdExecDirect(Str2ConstChar(Line_));
286-
Script::Debug::Wait();
286+
//Script::Debug::Wait();
287287
if (ret_) {
288288
ScriptargumentClass::Scriptargument_->setLineNumber(ScriptargumentClass::Scriptargument_->GetLineNumber() + 1);
289289
return ret_;
@@ -295,9 +295,16 @@ namespace ScriptWindowArg {
295295
}
296296
return ret_;
297297
}
298-
298+
299299
return ret_;
300300

301301
}
302302

303+
void waitPauseProcess() {
304+
while (!_plugin_waituntilpaused()) {
305+
Application::DoEvents();
306+
}
307+
308+
}
309+
303310
}

AdvancedScript/licenses.licx

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)