PDA

View Full Version : On the problem of modifying the black box script


Gaara_GAMA
13-03-2018, 00:02
How to modify based on Black_Box_Script_By_Kurutucu_V1.8 from Main(precomp.0.43).iss to increase the Chinese path hint and click the logo event to have a custom size information box before jumping to the web page?

I have copied the logo click event information box, but the size is not the same size as the original copy.

I'm sorry, I can't express problems in English, so I used Baidu to translate my question.
21309

rinaldo
13-03-2018, 01:07
maybe this can interest you

Gaara_GAMA
13-03-2018, 04:46
maybe this can interest you

But this example is not the kind of effect I want, or thank you for your answer. Can you look at my black box script if you can? I don't know where to increase the hint of the Chinese directory is not available
21314

maybe this can interest you
My script has the question of the screenshot, and if you have time, can you implement the size of the form on the right side of the screenshot from this script? This script I got rid of music and Slideshow & Video

rinaldo
13-03-2018, 07:28
procedure LogoLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
MsgBox((' »¶Ó*ʹÓÃGBTС×éϵÁÐ×÷Æ·')+ #13#10#13#10 +(
'GBTС×é³ÉÁ¢ÓÚ2004Äê2Ô£¬´ó¼Ò¶¼ÊDZ¾×ÅÈȰ®ÓÎÏ·Ëù³ÉÁ ¢µÄÖÆ×÷ÓÎϷС×顣С×é')+ #13 +(
'µÄÓ²Å̰æÆäÓŵãѹËõ±ÈÂʸߡ¢ÎÞÑ˸Öʰ桢ÎÞ¹ã¸æ²å¼ þ¡¢ÕûºÏÁË×îеÄÉý¼¶²¹¶¡')+ #13 +(
'¼°DLCÄÚÈÝ¡¢×Ô´øÓÎÏ·²¹¶¡Ð޸Ĺ¥ÂԵȣ¬²âÊÔÑϽ÷¡¢ÎÞ³¥ ·ÖÏí£¬Ò»Ö±ÎªÐí¶àÍæ¼ÒËù')+ #13 +(
'ÈȰ®×·Åõ¡£')+ #13#13 +(
'GBTС×é·¢²¼µÄ×ÊÔ´Öڶ࣬¸÷´óÓÎÏ·ÍøÕ¾ºÍÂÛ̳£¬¶¼Óдó Á¿×ªÔØ¡£±»Íæ¼Ò³ÆÎª£º¡°')+ #13 +(
'¹úÄÚ×î¾ßÊղؼÛÖµ¡±µÄÓÎÏ·ÖÆ×÷С×é.')+ #13#13 +(
'GBTС×éǰºó³ÉÔ±¹²¼ÆÈýÊ®ÓàÈË£¬Ö÷ÒªÒÔÖÐÎÄÓÎÏ··âװΪ Ö÷£¬Ð¡×éµÄÖ÷Òª³ÉÔ±')+ #13 +(
'renxufeng£¨ÏãË®£©£¬´ÓBTÖ®¼Ò¿ªÊ¼×ö°æÖ÷¡¢×ܰ桢³ÇÖ÷ ¡¢ÏÖÈÎΪӰ¿ÕµÄ³¬°æ£¬')+ #13 +(
'Ëû´øÁì²¢ÍÆ¹ãС×éÆð׏¦²»¿ÉûµÄ×÷ÓÃ.')+ #13#13 +(
'ÖÆ×÷µÄÓÎÏ·´ó´óССÓÚǧ¿îÖ÷Á÷×÷Æ·£¨Ö÷Òª´ú±í×÷£ºÐùÔ ¯½£ÏµÁС¢Ïɽ£ÏµÁС¢¼«Æ·')+ #13 +(
'ϵÁС¢¹íÆüϵÁС¢¹ÅĹÀöӰϵÁС¢Éú»¯Î£»úϵÁС¢Ê¹ÃüÕ Ù»½ÏµÁеȣ©¡£')+ #13#13 +(
'С×é³ÉÁ¢ÒÔǰÊÇBTÖ®¼Ò£¬Ä¿Ç°¾*¹ý¸Ä¶à´Î°æÃûΪӰ¿Õ£¬Ï ÖÔٴλָ´ÎªBTÖ®¼ÒÓò')+ #13#10 +(
'Ãû¡£ÁíÍâÍæ¼ÒÒ²¿ÉÒÔͨ¹ýGBTС×éµÄÓÎÏ·¿Õ¼äÀ´¶¨ÆÚ²é¿´ ×îеÄÓÎÏ·×ÊÔ´ÏÂÔØ¡£')+ #13#13 +(
'С×éÖ÷Òª³ÉÔ±£ºÏãË®¡¢Jojo531¡¢ 1ove¡¢ µØÓü¿þÀÜʦ¡¢ÐÞÁËÍõһƽ¡¢¶ñ¹í¡¢²»ÏÂ')+ #13 +(
'Ñ©µÄ¶¬Ì졢СС¢ hebaoxiong¡¢ÉñÕß¡¢ s010154¡¢Billyo¡¢ÀÏÂóÄ£ÐÍ¡¢Â̹âÉ*')+ #13 +(
'ÁÖ¡¢²×º£¡¢Ð¡Àî×Ó¡¢²»ËÀ±ð¼§¡¢Æ¤Æ¤¡¢ÑªÖñ¡¢Ð¡ÓСŠ֡¢Ä«Ó㡢СС¡¢ºï×Ó¡¢»Æ')+ #13 +(
'ºÓÀïµÄÕ¨¸â¡¢Ð¡Íõ¡¢ºÚÒø¡¢ÄûÃÊÃ۲衢TMSLiuµÈ¡£')+ #13#13#13 +(
'GBTС×é´ó±¾Óª£º')+ #13#13 +(
'Ô*´´·¢²¼Çø£ºhttps//www.gscq.me/forum-3.htm')+ #13 +(
'С×éÓÎÏ·¿Õ¼ä£ºhttp://renxufeng.ys168.com/'), mbConfirmation, MB_OK);
ShellExec('open', '{#AppURL}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)
end;


change $50 to MB_OK

Gaara_GAMA
14-03-2018, 11:11
procedure LogoLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
MsgBox((' »¶Ó*ʹÓÃGBTС×éϵÁÐ×÷Æ·')+ #13#10#13#10 +(
'GBTС×é³ÉÁ¢ÓÚ2004Äê2Ô£¬´ó¼Ò¶¼ÊDZ¾×ÅÈȰ®ÓÎÏ·Ëù³ÉÁ ¢µÄÖÆ×÷ÓÎϷС×顣С×é')+ #13 +(
'µÄÓ²Å̰æÆäÓŵãѹËõ±ÈÂʸߡ¢ÎÞÑ˸Öʰ桢ÎÞ¹ã¸æ²å¼ þ¡¢ÕûºÏÁË×îеÄÉý¼¶²¹¶¡')+ #13 +(
'¼°DLCÄÚÈÝ¡¢×Ô´øÓÎÏ·²¹¶¡Ð޸Ĺ¥ÂԵȣ¬²âÊÔÑϽ÷¡¢ÎÞ³¥ ·ÖÏí£¬Ò»Ö±ÎªÐí¶àÍæ¼ÒËù')+ #13 +(
'ÈȰ®×·Åõ¡£')+ #13#13 +(
'GBTС×é·¢²¼µÄ×ÊÔ´Öڶ࣬¸÷´óÓÎÏ·ÍøÕ¾ºÍÂÛ̳£¬¶¼Óдó Á¿×ªÔØ¡£±»Íæ¼Ò³ÆÎª£º¡°')+ #13 +(
'¹úÄÚ×î¾ßÊղؼÛÖµ¡±µÄÓÎÏ·ÖÆ×÷С×é.')+ #13#13 +(
'GBTС×éǰºó³ÉÔ±¹²¼ÆÈýÊ®ÓàÈË£¬Ö÷ÒªÒÔÖÐÎÄÓÎÏ··âװΪ Ö÷£¬Ð¡×éµÄÖ÷Òª³ÉÔ±')+ #13 +(
'renxufeng£¨ÏãË®£©£¬´ÓBTÖ®¼Ò¿ªÊ¼×ö°æÖ÷¡¢×ܰ桢³ÇÖ÷ ¡¢ÏÖÈÎΪӰ¿ÕµÄ³¬°æ£¬')+ #13 +(
'Ëû´øÁì²¢ÍÆ¹ãС×éÆð׏¦²»¿ÉûµÄ×÷ÓÃ.')+ #13#13 +(
'ÖÆ×÷µÄÓÎÏ·´ó´óССÓÚǧ¿îÖ÷Á÷×÷Æ·£¨Ö÷Òª´ú±í×÷£ºÐùÔ ¯½£ÏµÁС¢Ïɽ£ÏµÁС¢¼«Æ·')+ #13 +(
'ϵÁС¢¹íÆüϵÁС¢¹ÅĹÀöӰϵÁС¢Éú»¯Î£»úϵÁС¢Ê¹ÃüÕ Ù»½ÏµÁеȣ©¡£')+ #13#13 +(
'С×é³ÉÁ¢ÒÔǰÊÇBTÖ®¼Ò£¬Ä¿Ç°¾*¹ý¸Ä¶à´Î°æÃûΪӰ¿Õ£¬Ï ÖÔٴλָ´ÎªBTÖ®¼ÒÓò')+ #13#10 +(
'Ãû¡£ÁíÍâÍæ¼ÒÒ²¿ÉÒÔͨ¹ýGBTС×éµÄÓÎÏ·¿Õ¼äÀ´¶¨ÆÚ²é¿´ ×îеÄÓÎÏ·×ÊÔ´ÏÂÔØ¡£')+ #13#13 +(
'С×éÖ÷Òª³ÉÔ±£ºÏãË®¡¢Jojo531¡¢ 1ove¡¢ µØÓü¿þÀÜʦ¡¢ÐÞÁËÍõһƽ¡¢¶ñ¹í¡¢²»ÏÂ')+ #13 +(
'Ñ©µÄ¶¬Ì졢СС¢ hebaoxiong¡¢ÉñÕß¡¢ s010154¡¢Billyo¡¢ÀÏÂóÄ£ÐÍ¡¢Â̹âÉ*')+ #13 +(
'ÁÖ¡¢²×º£¡¢Ð¡Àî×Ó¡¢²»ËÀ±ð¼§¡¢Æ¤Æ¤¡¢ÑªÖñ¡¢Ð¡ÓСŠ֡¢Ä«Ó㡢СС¡¢ºï×Ó¡¢»Æ')+ #13 +(
'ºÓÀïµÄÕ¨¸â¡¢Ð¡Íõ¡¢ºÚÒø¡¢ÄûÃÊÃ۲衢TMSLiuµÈ¡£')+ #13#13#13 +(
'GBTС×é´ó±¾Óª£º')+ #13#13 +(
'Ô*´´·¢²¼Çø£ºhttps//www.gscq.me/forum-3.htm')+ #13 +(
'С×éÓÎÏ·¿Õ¼ä£ºhttp://renxufeng.ys168.com/'), mbConfirmation, MB_OK);
ShellExec('open', '{#AppURL}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)
end;


change $50 to MB_OK

But after changing OK, the information box will be the same size as the left side of the first floor, instead of the size of the right side of the screenshot. How can I change the size of the right side of the screenshots?

The other question is how to fix the files under the _CommonRedist in setup-1.bin or setup-2.bin where the black box script component installs it

rinaldo
14-03-2018, 16:14
I can not follow you with the msgbox, try other solutions like:

#Define Skin "setup.cjstyles"

[Setup]
AppName=InfoForm
AppVerName=InfoForm
CreateAppDir=no

[Files]
#ifdef Skin
Source: Files\ISSkin\{#Skin}; DestDir: "{app}"; Attribs: hidden system; Flags: ignoreversion;
Source: Files\ISSkin\ISSkin.dll; DestDir: "{app}"; Attribs: hidden system; Flags: ignoreversion;
#endif

[Languages]
Name: eng; MessagesFile: Languages\English.isl

[Code ]
var
InfoForm: TSetupForm;
InfoBtn: TButton;

#ifdef Skin
procedure LoadSkin(lpszPath: PAnsiChar; lpszIniFileName: PAnsiChar); external 'LoadSkin@{tmp}\isskin.dll stdcall delayload';
procedure UnloadSkin; external 'UnloadSkin@{tmp}\isskin.dll stdcall delayload';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external '[email protected] stdcall';
#endif

procedure CloseForm(Sender: TObject);
begin
InfoForm.Close;
end;

procedure FormOnClick(Sender: TObject);
var Ok: TButton;
begin
InfoForm := CreateCustomForm();
try
with InfoForm do
begin
ClientWidth := ScaleX(390);
ClientHeight := ScaleY(300);
BorderIcons := [];
Caption := SetupMessage(msgInformationTitle);
CenterInsideControl(WizardForm, False);
end;
Ok := TButton.Create(InfoForm);
with Ok do
begin
Parent := InfoForm;
SetBounds(ScaleX(300), ScaleY(265), ScaleX(75), ScaleY(23));
Caption := SetupMessage(msgButtonOk);
OnClick:=@CloseForm;
end;
with TLabel.Create(InfoForm) do
begin
Parent := InfoForm;
Font.Size := 100;
Font.Style := [fsBold];
Font.Name:='Arial';
Font.Color := $FFFFFF;
Caption:='TEST';
end;
finally
end;
InfoForm.ShowModal;
end;

procedure InitializeWizard();
begin
with WizardForm do begin
NextButton.SetBounds(0,0,0,0);
BackButton.SetBounds(0,0,0,0);

InfoBtn := TButton.Create(WizardForm);
InfoBtn.Caption := 'Info';
InfoBtn.Parent := WizardForm;
InfoBtn.SetBounds(5,327,75,23);
InfoBtn.OnClick := @FormOnClick;
end;
end;

function InitializeSetup(): Boolean;
begin
#ifdef Skin
ExtractTemporaryFile('isskin.dll');
ExtractTemporaryFile('{#Skin}');
LoadSkin(ExpandConstant('{tmp}\{#Skin}'), '');
#endif
Result := True;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
#ifdef Skin
FileCopy(ExpandConstant('{tmp}\ISSkin.dll'),Expand Constant('{app}\Uninstall\ISSkin.dll'),False);
FileCopy(ExpandConstant('{tmp}\{#Skin}'),ExpandCon stant('{app}\Uninstall\{#Skin}'),False);
#endif
end;

procedure DeinitializeSetup();
begin
#ifdef Skin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}') ),0);
UnloadSkin;
#endif
end;

Gaara_GAMA
15-03-2018, 09:57
I can not follow you with the msgbox, try other solutions like:

#Define Skin "setup.cjstyles"

[Setup]
AppName=InfoForm
AppVerName=InfoForm
CreateAppDir=no

[Files]
#ifdef Skin
Source: Files\ISSkin\{#Skin}; DestDir: "{app}"; Attribs: hidden system; Flags: ignoreversion;
Source: Files\ISSkin\ISSkin.dll; DestDir: "{app}"; Attribs: hidden system; Flags: ignoreversion;
#endif

[Languages]
Name: eng; MessagesFile: Languages\English.isl

[Code ]
var
InfoForm: TSetupForm;
InfoBtn: TButton;

#ifdef Skin
procedure LoadSkin(lpszPath: PAnsiChar; lpszIniFileName: PAnsiChar); external 'LoadSkin@{tmp}\isskin.dll stdcall delayload';
procedure UnloadSkin; external 'UnloadSkin@{tmp}\isskin.dll stdcall delayload';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external '[email protected] stdcall';
#endif

procedure CloseForm(Sender: TObject);
begin
InfoForm.Close;
end;

procedure FormOnClick(Sender: TObject);
var Ok: TButton;
begin
InfoForm := CreateCustomForm();
try
with InfoForm do
begin
ClientWidth := ScaleX(390);
ClientHeight := ScaleY(300);
BorderIcons := [];
Caption := SetupMessage(msgInformationTitle);
CenterInsideControl(WizardForm, False);
end;
Ok := TButton.Create(InfoForm);
with Ok do
begin
Parent := InfoForm;
SetBounds(ScaleX(300), ScaleY(265), ScaleX(75), ScaleY(23));
Caption := SetupMessage(msgButtonOk);
OnClick:=@CloseForm;
end;
with TLabel.Create(InfoForm) do
begin
Parent := InfoForm;
Font.Size := 100;
Font.Style := [fsBold];
Font.Name:='Arial';
Font.Color := $FFFFFF;
Caption:='TEST';
end;
finally
end;
InfoForm.ShowModal;
end;

procedure InitializeWizard();
begin
with WizardForm do begin
NextButton.SetBounds(0,0,0,0);
BackButton.SetBounds(0,0,0,0);

InfoBtn := TButton.Create(WizardForm);
InfoBtn.Caption := 'Info';
InfoBtn.Parent := WizardForm;
InfoBtn.SetBounds(5,327,75,23);
InfoBtn.OnClick := @FormOnClick;
end;
end;

function InitializeSetup(): Boolean;
begin
#ifdef Skin
ExtractTemporaryFile('isskin.dll');
ExtractTemporaryFile('{#Skin}');
LoadSkin(ExpandConstant('{tmp}\{#Skin}'), '');
#endif
Result := True;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
#ifdef Skin
FileCopy(ExpandConstant('{tmp}\ISSkin.dll'),Expand Constant('{app}\Uninstall\ISSkin.dll'),False);
FileCopy(ExpandConstant('{tmp}\{#Skin}'),ExpandCon stant('{app}\Uninstall\{#Skin}'),False);
#endif
end;

procedure DeinitializeSetup();
begin
#ifdef Skin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}') ),0);
UnloadSkin;
#endif
end;

Thank you for your script sample for my first question.

But I don't know how to modify the DirectX, Framework and vc++ paths on the black box script to the _CommonRedist folder path in setup-1.bin or setup-2.bin. Can you tell me how to modify it? In addition, I have seen other people's installation package install game crack patch options. How can this be implemented in black box scripts? Let me send a screenshot to show you how this option is modified in the black box script.
21359

rinaldo
15-03-2018, 15:23
:rolleyes:
let's do it, show a script with the functions you would like to implement and I will understand better