voin_123 5 #253824 Posted February 22, 2015 Всем доброе утро !Парни кто сможет скинуть файлы чтоб при запуске мод пака писало игра запущена, закройте!!! Quote Share this post Link to post Short link Share on other sites
woole 5 #253833 Posted February 22, 2015 (edited) Всем доброе утро !Парни кто сможет скинуть файлы чтоб при запуске мод пака писало игра запущена, закройте!!! Код function NextButtonClick(CurPageID: Integer): Boolean; var ver:string; SomeVar:boolean; begin Result := True; case CurPageID of wpWelcome: if RunTask('WorldOfTanks.exe', False) then if MsgBox('Танки запущены. Закрыть?', mbConfirmation, MB_YESNO) = IDYES then KillTask('WorldOfTanks.exe') else Result := False; end; end; Edited February 22, 2015 by woole Quote Share this post Link to post Short link Share on other sites
Ekspoint 2,122 #253902 Posted February 22, 2015 Всем доброе утро !Парни кто сможет скинуть файлы чтоб при запуске мод пака писало игра запущена, закройте!!! #define ISTask "ISTask.dll" [Files] Source: dll\{#ISTask}; Flags: dontcopy [Code] Function KillTask(ExeFileName: ansistring): Integer; external 'KillTask@files:{#ISTask} stdcall delayload'; Function RunTask(FileName: ansistring; bFullpath: Boolean): Boolean; external 'RunTask@files:{#ISTask} stdcall delayload'; Function KillTaskRunTask: Boolean; begin if RunTask('WorldOfTanks.exe', false) then begin if MsgBoxEx(0, 'Игра World of Tanks запущена. Закрыть и продолжить установку?', 'Необходимо закрыть игру!', MB_YESNO or MB_ICONQUESTION, 0, 0) = idYes then begin KillTask('WorldOfTanks.exe'); end else begin KillTask('WorldOfTanks.tmp'); end; end; end; Quote Share this post Link to post Short link Share on other sites
Pokaritel_VBR 3 #253914 Posted February 22, 2015 Киньте скин какой-нить классный Quote Share this post Link to post Short link Share on other sites
woole 5 #253953 Posted February 22, 2015 Господа, не подскажите, как получить содержимое текстового файла из сети в переменную? Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #253959 Posted February 22, 2015 (edited) Господа, не подскажите, как получить содержимое текстового файла из сети в переменную? In the beginning... загружаешь файл, проверяешь его наличие. Затем: Procedure ReadFromDownlFile(); var Text: AnsiString; begin ExtractTemporaryFile('text.txt'); LoadStringFromFile(ExpandConstant('{tmp}\text.txt'), Text); end; И делаешь с Text уже всё, что нужно :) Edited February 22, 2015 by Kotyarko_O Quote Share this post Link to post Short link Share on other sites
woole 5 #253969 Posted February 22, 2015 (edited) In the beginning... загружаешь файл, проверяешь его наличие. Затем: Procedure ReadFromDownlFile(); var Text: AnsiString; begin ExtractTemporaryFile('text.txt'); LoadStringFromFile(ExpandConstant('{tmp}\text.txt'), Text); end; И делаешь с Text уже всё, что нужно :) Спасибо, попробую Кхм, а как скачать файл?) В самом начале Edited February 22, 2015 by woole Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #253976 Posted February 22, 2015 @woole, idp, itd.Есть ещё способ загрузки средствами инно, но рациональнее использовать вышеприведённые плагины. Quote Share this post Link to post Short link Share on other sites
voin_123 5 #254003 Posted February 22, 2015 Парни как возле кнопок (далее назад отмена) с левой стороны добавит картинку на которую будет играть музыка при установки? Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #254005 Posted February 22, 2015 Парни как возле кнопок (далее назад отмена) с левой стороны добавит картинку на которую будет играть музыка при установки? Bass + botva2. Quote Share this post Link to post Short link Share on other sites
voin_123 5 #254008 Posted February 22, 2015 Bass + botva2. скинь файлы 1 Quote Share this post Link to post Short link Share on other sites
Ekspoint 2,122 #254010 Posted February 22, 2015 скинь файлы в примерах есть Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #254012 Posted February 22, 2015 скинь файлы пфф Quote Share this post Link to post Short link Share on other sites
AtotIK 580 #254017 Posted February 22, 2015 скинь файлы Чего ещё сделать надо, хозяин? Quote Share this post Link to post Short link Share on other sites
voin_123 5 #254051 Posted February 22, 2015 Почему не отображет кнопку хотя музыка играет http://rghost.ru/7szFxzkvw 2 Quote Share this post Link to post Short link Share on other sites
Kaster62rus 3 #254142 Posted February 23, 2015 (edited) я имел введу дайте скрипт , такой , чтобы картинка была в самом инстоляторе , а не возле курсора Держи [setup]AppName=Моя программа AppVersion=1.5 AppPublisher=YURSHAT DefaultDirName={pf}\Моя программа [Languages] Name: "RU"; MessagesFile: "compiler:Languages\Russian.isl" [CustomMessages] RU.CompName1=Компонент 1 RU.CompName2=Компонент 2 RU.ComponentsInfo=Наведите курсор мыши на компонент, чтобы прочитать его описание. RU.ComponentsImgInfo=Наведите курсор мыши на компонент, чтобы посмотреть его превью. RU.CompDesc1=Описание первого компонента RU.CompDesc2=Описание второго компонента [Files] Source: "compiler:WizModernImage.bmp"; DestName: "CompDescImg1.bmp"; Flags: dontcopy Source: "compiler:WizModernImage-IS.bmp"; DestName: "CompDescImg2.bmp"; Flags: dontcopy [Types] Name: full; Description: Full installation; Flags: iscustom [Components] Name: comp1; Description: "{cm:CompName1}"; Types: full Name: comp2; Description: "{cm:CompName2}"; Types: full typeTComponentDesc = recordDescription: String;ImageName: String;Index: Integer;end; varCompDescs: array of TComponentDesc;CompDescPanel, CompDescImgPanel: TPanel;CompDescText: array[1..2] of TLabel;CompIndex, LastIndex: Integer;CompDescImg: TBitmapImage; procedure ShowCompDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea);vari: Integer;beginif Index = LastIndex then Exit;CompIndex := -1;for i := 0 to GetArrayLength(CompDescs) -1 dobeginif (CompDescs[i].Index = Index) thenbeginCompIndex := i;Break;end;end;if (CompIndex >= 0) and (Area = iaItem) thenbeginif not FileExists(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName) thenExtractTemporaryFile(CompDescs[CompIndex].ImageName);CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName);CompDescImg.Show; CompDescText[2].Caption := CompDescs[CompIndex].Description;CompDescText[2].Enabled := True;end elsebeginCompDescText[2].Caption := CustomMessage('ComponentsInfo');CompDescText[2].Enabled := False;CompDescImg.Hide;end;LastIndex := Index;end; procedure CompListMouseLeave(Sender: TObject);beginCompDescImg.Hide;CompDescText[2].Caption := CustomMessage('ComponentsInfo');CompDescText[2].Enabled := False;LastIndex := -1;end; procedure AddCompDescription(AIndex: Integer; ADescription: String; AImageName: String);vari: Integer;begini := GetArrayLength(CompDescs);SetArrayLength(CompDescs, i + 1);CompDescs[i].Description := ADescription;CompDescs[i].ImageName := AImageName;CompDescs[i].Index := AIndex - 1end; procedure InitializeWizard();beginWizardForm.SelectComponentsLabel.Hide;WizardForm.TypesCombo.Hide;WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(0), ScaleX(184), ScaleY(205));WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription;WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave; CompDescImgPanel := TPanel.Create(WizardForm);with CompDescImgPanel dobeginParent := WizardForm.SelectComponentsPage;SetBounds(ScaleX(192), ScaleY(0), ScaleX(225), ScaleY(120));BevelInner := bvLowered;end; CompDescText[1] := TLabel.Create(WizardForm);with CompDescText[1] dobeginParent := CompDescImgPanel;SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));AutoSize := False;WordWrap := True;Enabled := False;Caption := CustomMessage('ComponentsImgInfo');end; CompDescImg := TBitmapImage.Create(WizardForm);with CompDescImg dobeginParent := CompDescImgPanel;SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));Stretch := True;Hide;end; CompDescPanel := TPanel.Create(WizardForm);with CompDescPanel dobeginParent := WizardForm.SelectComponentsPage;SetBounds(ScaleX(192), ScaleY(125), ScaleX(225), ScaleY(80));BevelInner := bvLowered;end; CompDescText[2] := TLabel.Create(WizardForm);with CompDescText[2] dobeginParent := CompDescPanel;SetBounds(ScaleX(5), ScaleY(5), CompDescPanel.Width - ScaleX(10), CompDescPanel.Height - ScaleY(10));AutoSize := False;WordWrap := True;Enabled := False;Caption := CustomMessage('ComponentsInfo');end; AddCompDescription(1, CustomMessage('CompDesc1'), 'CompDescImg1.bmp');AddCompDescription(2, CustomMessage('CompDesc2'), 'CompDescImg2.bmp');end; Edited February 23, 2015 by Kaster62rus Quote Share this post Link to post Short link Share on other sites
Pokaritel_VBR 3 #254290 Posted February 23, 2015 Держи [setup]AppName=Моя программа AppVersion=1.5 AppPublisher=YURSHAT DefaultDirName={pf}\Моя программа [Languages] Name: "RU"; MessagesFile: "compiler:Languages\Russian.isl" [CustomMessages] RU.CompName1=Компонент 1 RU.CompName2=Компонент 2 RU.ComponentsInfo=Наведите курсор мыши на компонент, чтобы прочитать его описание. RU.ComponentsImgInfo=Наведите курсор мыши на компонент, чтобы посмотреть его превью. RU.CompDesc1=Описание первого компонента RU.CompDesc2=Описание второго компонента [Files] Source: "compiler:WizModernImage.bmp"; DestName: "CompDescImg1.bmp"; Flags: dontcopy Source: "compiler:WizModernImage-IS.bmp"; DestName: "CompDescImg2.bmp"; Flags: dontcopy [Types] Name: full; Description: Full installation; Flags: iscustom [Components] Name: comp1; Description: "{cm:CompName1}"; Types: full Name: comp2; Description: "{cm:CompName2}"; Types: full typeTComponentDesc = recordDescription: String;ImageName: String;Index: Integer;end; varCompDescs: array of TComponentDesc;CompDescPanel, CompDescImgPanel: TPanel;CompDescText: array[1..2] of TLabel;CompIndex, LastIndex: Integer;CompDescImg: TBitmapImage; procedure ShowCompDescription(Sender: TObject; X, Y, Index: Integer; Area: TItemArea);vari: Integer;beginif Index = LastIndex then Exit;CompIndex := -1;for i := 0 to GetArrayLength(CompDescs) -1 dobeginif (CompDescs[i].Index = Index) thenbeginCompIndex := i;Break;end;end;if (CompIndex >= 0) and (Area = iaItem) thenbeginif not FileExists(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName) thenExtractTemporaryFile(CompDescs[CompIndex].ImageName);CompDescImg.Bitmap.LoadFromFile(ExpandConstant('{tmp}\') + CompDescs[CompIndex].ImageName);CompDescImg.Show; CompDescText[2].Caption := CompDescs[CompIndex].Description;CompDescText[2].Enabled := True;end elsebeginCompDescText[2].Caption := CustomMessage('ComponentsInfo');CompDescText[2].Enabled := False;CompDescImg.Hide;end;LastIndex := Index;end; procedure CompListMouseLeave(Sender: TObject);beginCompDescImg.Hide;CompDescText[2].Caption := CustomMessage('ComponentsInfo');CompDescText[2].Enabled := False;LastIndex := -1;end; procedure AddCompDescription(AIndex: Integer; ADescription: String; AImageName: String);vari: Integer;begini := GetArrayLength(CompDescs);SetArrayLength(CompDescs, i + 1);CompDescs[i].Description := ADescription;CompDescs[i].ImageName := AImageName;CompDescs[i].Index := AIndex - 1end; procedure InitializeWizard();beginWizardForm.SelectComponentsLabel.Hide;WizardForm.TypesCombo.Hide;WizardForm.ComponentsList.SetBounds(ScaleX(0), ScaleY(0), ScaleX(184), ScaleY(205));WizardForm.ComponentsList.OnItemMouseMove:= @ShowCompDescription;WizardForm.ComponentsList.OnMouseLeave := @CompListMouseLeave; CompDescImgPanel := TPanel.Create(WizardForm);with CompDescImgPanel dobeginParent := WizardForm.SelectComponentsPage;SetBounds(ScaleX(192), ScaleY(0), ScaleX(225), ScaleY(120));BevelInner := bvLowered;end; CompDescText[1] := TLabel.Create(WizardForm);with CompDescText[1] dobeginParent := CompDescImgPanel;SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));AutoSize := False;WordWrap := True;Enabled := False;Caption := CustomMessage('ComponentsImgInfo');end; CompDescImg := TBitmapImage.Create(WizardForm);with CompDescImg dobeginParent := CompDescImgPanel;SetBounds(ScaleX(5), ScaleY(5), CompDescImgPanel.Width - ScaleX(10), CompDescImgPanel.Height - ScaleY(10));Stretch := True;Hide;end; CompDescPanel := TPanel.Create(WizardForm);with CompDescPanel dobeginParent := WizardForm.SelectComponentsPage;SetBounds(ScaleX(192), ScaleY(125), ScaleX(225), ScaleY(80));BevelInner := bvLowered;end; CompDescText[2] := TLabel.Create(WizardForm);with CompDescText[2] dobeginParent := CompDescPanel;SetBounds(ScaleX(5), ScaleY(5), CompDescPanel.Width - ScaleX(10), CompDescPanel.Height - ScaleY(10));AutoSize := False;WordWrap := True;Enabled := False;Caption := CustomMessage('ComponentsInfo');end; AddCompDescription(1, CustomMessage('CompDesc1'), 'CompDescImg1.bmp');AddCompDescription(2, CustomMessage('CompDesc2'), 'CompDescImg2.bmp');end;Благодарю! Quote Share this post Link to post Short link Share on other sites
mpmp 2 #254424 Posted February 24, 2015 Не получается: #define ISTask "ISTask.dll" [Files] Source: Files\{#ISTask}; Flags: dontcopy [code] //////////==== Проверка правилността на папката на играта - търси ехе файла на WoT ====\\ function NextButtonClick1(CurPageID: Integer): Boolean; begin Result := True; case CurPageID of wpSelectDir: if not FileExists(ExpandConstant('{app}\WorldOfTanks.exe')) then begin MsgBox('Неправилно указана папката на World of Tanks!', mbError, MB_OK); Result := False; end; end; end; //////////====| До тук са редовете за проверка правилността на папката на играта |====\\ //////====== запущенной игре function KillTask(ExeFileName: string): Integer; external 'KillTask@files:ISTaskU.dll stdcall'; function RunTask(FileName: string; bFullpath: Boolean): Boolean; external 'RunTask@files:ISTaskU.dll stdcall'; function InitializeSetup1(): Boolean; begin If RunTask('WorldOfTanks.exe', false) then begin if MsgBox('ВНИМАНИЕ!' #13 'НЕ рекомендуется устанавливать при запущенной игре.' #13 'Закрыть WorldOfTanks и продолжить установку?', mbError, mb_YesNo) = idYes then begin KillTask('WorldOfTanks.exe'); Result := True; end else Exit; end; Result := True; end; ////////////=== END запущенной игре Function InitializeSetup(): Boolean; begin InitializeSetup1(); InitializeWizard1(); Result := True; end; Quote Share this post Link to post Short link Share on other sites
Kotyarko_O 1,906 #254428 Posted February 24, 2015 @mpmp, 'Скрин:' 1 Quote Share this post Link to post Short link Share on other sites
Pokaritel_VBR 3 #254526 Posted February 24, 2015 (edited) Не получается: #define ISTask "ISTask.dll" [Files] Source: Files\{#ISTask}; Flags: dontcopy [code] //////////==== Проверка правилността на папката на играта - търси ехе файла на WoT ====\\ function NextButtonClick1(CurPageID: Integer): Boolean; begin Result := True; case CurPageID of wpSelectDir: if not FileExists(ExpandConstant('{app}\WorldOfTanks.exe')) then begin MsgBox('Неправилно указана папката на World of Tanks!', mbError, MB_OK); Result := False; end; end; end; //////////====| До тук са редовете за проверка правилността на папката на играта |====\\ //////====== запущенной игре function KillTask(ExeFileName: string): Integer; external 'KillTask@files:ISTaskU.dll stdcall'; function RunTask(FileName: string; bFullpath: Boolean): Boolean; external 'RunTask@files:ISTaskU.dll stdcall'; function InitializeSetup1(): Boolean; begin If RunTask('WorldOfTanks.exe', false) then begin if MsgBox('ВНИМАНИЕ!' #13 'НЕ рекомендуется устанавливать при запущенной игре.' #13 'Закрыть WorldOfTanks и продолжить установку?', mbError, mb_YesNo) = idYes then begin KillTask('WorldOfTanks.exe'); Result := True; end else Exit; end; Result := True; end; ////////////=== END запущенной игре Function InitializeSetup(): Boolean; begin InitializeSetup1(); InitializeWizard1(); Result := True; end; 2015-02-24_135519.png Добавь InitializeSetupДобавь InitializeSetup А у меня вот в чём проблема , было всё ок Edited February 24, 2015 by Pokaritel_VBR Quote Share this post Link to post Short link Share on other sites