OK, great, thanks for that. I'll change the api back and test. Maybe this should be documented in the api.script?For giving parameters : "#$q#$s#$q-SP:%StartParameters%"
Thanks,
Galapo.
Posted 13 August 2007 - 06:55 AM
OK, great, thanks for that. I'll change the api back and test. Maybe this should be documented in the api.script?For giving parameters : "#$q#$s#$q-SP:%StartParameters%"
Posted 13 August 2007 - 11:52 AM
The parameter #4 is not good like this because it is specific to BuildModel and can't be tranlate for other Project like VistaPE
//------------Variables--------In Script.Projet-------For Function Add_Options----------%OptionShortcut%=Add_Options=Run,%API%,Shortcut_Options//------------Function Add_Options-----In Api.Script------------------------------------[Shortcut_Options]Set,"%shortcut_Parameters%",""Set,"%shortcut_IconFile%",""If,#1,NotEqual,,Set,"%shortcut_Parameters%","#$q#$s#$q-SP:#1"If,#2,NotEqual,,Set,"%shortcut_IconFile%","#$q#$s#$q-SF:#$pProgramFiles#$p\%programFolder%\#2#$q#$s#$q-SI:0"System,RefreshVarsSet,"%OptionShortcut%","%shortcut_Parameters%%shortcut_IconFile%"System,RefreshVars//--------------------------------------------------------------------------------------// Or like this with start mode but a little more long ://--------------------------------------------------------------------------------------[Shortcut_Options]Set,"%shortcut_Parameters%",""Set,"%shortcut_IconFile%",""Set,"%shortcut_Show%",""If,#1,NotEqual,,Set,"%shortcut_Parameters%","#$q#$s#$q-SP:#1"If,#2,NotEqual,,Set,"%shortcut_IconFile%","#$q#$s#$q-SF:#$pProgramFiles#$p\%programFolder%\#2#$q#$s#$q-SI:0"System,RefreshVarsRun,%API%,ShowOptions_#3Set,"%OptionShortcut%","%shortcut_Parameters%%shortcut_IconFile%%shortcut_Show%"System,RefreshVars[ShowOptions_][ShowOptions_1]Set,"%shortcut_Show%","#$q#$s#$q-SS:SW_SHOWNORMAL"System,RefreshVars[ShowOptions_2]Set,"%shortcut_Show%","#$q#$s#$q-SS:SW_SHOWMINIMIZED"System,RefreshVars[ShowOptions_3]Set,"%shortcut_Show%","#$q#$s#$q-SS:SW_SHOWMAXIMIZED"System,RefreshVars[ShowOptions_4]Set,"%shortcut_Show%","#$q#$s#$q-SS:SW_HIDE"System,RefreshVarsWhat do you think ?
Posted 13 August 2007 - 12:04 PM
Before giving my reply, a small complain:I hate these oversized post: They are difficult to read and more difficult to answer.The parameter #4 is not good like this because it is specific to BuildModel and can't be tranlate for other Project like VistaPE
So I propose a new Function Add_Options we call it before Add_Shortcut
In Add_Shortcut we replace the #4 by a variable %OptionShortcut%//------------Variables--------In Script.Projet-------For Function Add_Options----------%OptionShortcut%=Add_Options=Run,%API%,Shortcut_Options//------------Function Add_Options-----In Api.Script------------------------------------[Shortcut_Options]Set,"%shortcut_Parameters%",""Set,"%shortcut_IconFile%",""If,#1,NotEqual,,Set,"%shortcut_Parameters%","#$q#$s#$q-SP:#1"If,#2,NotEqual,,Set,"%shortcut_IconFile%","#$q#$s#$q-SF:#$pProgramFiles#$p\%programFolder%\#2#$q#$s#$q-SI:0"System,RefreshVarsSet,"%OptionShortcut%","%shortcut_Parameters%%shortcut_IconFile%"System,RefreshVars//--------------------------------------------------------------------------------------// Or like this with start mode but a little more long ://--------------------------------------------------------------------------------------[Shortcut_Options]Set,"%shortcut_Parameters%",""Set,"%shortcut_IconFile%",""Set,"%shortcut_Show%",""If,#1,NotEqual,,Set,"%shortcut_Parameters%","#$q#$s#$q-SP:#1"If,#2,NotEqual,,Set,"%shortcut_IconFile%","#$q#$s#$q-SF:#$pProgramFiles#$p\%programFolder%\#2#$q#$s#$q-SI:0"System,RefreshVarsRun,%API%,ShowOptions_#3Set,"%OptionShortcut%","%shortcut_Parameters%%shortcut_IconFile%%shortcut_Show%"System,RefreshVars[ShowOptions_][ShowOptions_1]Set,"%shortcut_Show%","#$q#$s#$q-SS:SW_SHOWNORMAL"System,RefreshVars[ShowOptions_2]Set,"%shortcut_Show%","#$q#$s#$q-SS:SW_SHOWMINIMIZED"System,RefreshVars[ShowOptions_3]Set,"%shortcut_Show%","#$q#$s#$q-SS:SW_SHOWMAXIMIZED"System,RefreshVars[ShowOptions_4]Set,"%shortcut_Show%","#$q#$s#$q-SS:SW_HIDE"System,RefreshVarsWhat do you think ?
Posted 13 August 2007 - 12:17 PM
So it's better to attach the fileI hate these oversized post: They are difficult to read and more difficult to answer.
When posting, people should look at the preview and use a code box if necessary!
Thank for the remarkNow we have 9 and I suggest to change buildModel to use
the enlarged number by splitting the current 4th arg.
Posted 13 August 2007 - 03:21 PM
I have a couple of issues with the creation of start menu shortcuts with the api in its current form. The example:
1. With the current api, a shortcut cannot be placed in the root of the programs folder in the start menu.
Add_Shortcut,StartMenu would place the shortcut in the folder from which the script is run, eg 'Productivity'. Hence I suggest
the adding of a fixed arguement if such a shortcut is desired. Something like: Add_Shortcut,StartMenu,StartMenu or
Add_Shortcut,StartMenu,StartMenuRoot.
2. A second related issue is that if a folder name is specified -- eg Add_Shortcut,StartMenu,%ProgramFolder% -- this folder cannot
be placed in the 'Productivity' folder unless this is explicitly specified as such: Add_Shortcut,StartMenu,Productivity\%ProgramFolder%.
But what if someone wants to place the script in a folder with a different name? They're stuck with the naming unless they edit the script.
Add_Shortcut,StartMenu,%Scriptdir%\%ProgramFolder% does not work (obviously), but possibly something of the sort should be allowed?
Regards,
Galapo.
[AddShortcut_StartMenu] If,#1,Equal,"",StrFormat,filename,%Scriptdir%,#1For me with VistaPE, the Sub-StartMenu becomes "VistaPE-Beta...".
If,"#1",Equal,"",Set,["Category/Sub-Menu Folder Variable"],"%ProgramTitle%.lnk"... seems more intuitive to me.
Posted 13 August 2007 - 07:09 PM
Add_Shortcut,StartMenu,.1. With the current api, a shortcut cannot be placed in the root of the programs folder in the start menu. Add_Shortcut,StartMenu would place the shortcut in the folder from which the script is run, eg 'Productivity'. Hence I suggest the adding of a fixed arguement if such a shortcut is desired. Something like: Add_Shortcut,StartMenu,StartMenu or Add_Shortcut,StartMenu,StartMenuRoot.
The api must be simple and fast2. A second related issue is that if a folder name is specified -- eg Add_Shortcut,StartMenu,%ProgramFolder% -- this folder cannot be placed in the 'Productivity' folder unless this is explicitly specified as such: Add_Shortcut,StartMenu,Productivity\%ProgramFolder%. But what if someone wants to place the script in a folder with a different name? They're stuck with the naming unless they edit the script. Add_Shortcut,StartMenu,%Scriptdir%\%ProgramFolder% does not work (obviously), but possibly something of the sort should be allowed?
Posted 13 August 2007 - 08:20 PM
Posted 14 August 2007 - 06:15 AM
Posted 14 August 2007 - 11:59 AM
Hi, all
I have converted the last api from LiveXP to VistaPE Beta
Look at my sigature, you will find the script.project modified and my last log file
I have marked in the file the 3 modified zone
Tested with Overdisk and some other App Script
Get 10 error but just for Hearts.script and mitec_msi.script with the function Require_files
Posted 24 August 2007 - 01:04 AM
I'd missed that -- thanks!Add_Shortcut,StartMenu,.
Just a point for #2 will place the shortcut in the root of the programs folder in the start menu
Posted 24 August 2007 - 01:10 AM
I've gotten around my issue, eg:2. A second related issue is that if a folder name is specified -- eg Add_Shortcut,StartMenu,%ProgramFolder% -- this folder cannot be placed in the 'Productivity' folder unless this is explicitly specified as such: Add_Shortcut,StartMenu,Productivity\%ProgramFolder%. But what if someone wants to place the script in a folder with a different name? They're stuck with the naming unless they edit the script. Add_Shortcut,StartMenu,%Scriptdir%\%ProgramFolder% does not work (obviously), but possibly something of the sort should be allowed.
[Interface]pCheckBox1="Add start menu shortcuts",1,3,43,72,168,18,TruepTextBox1="Start menu folder (blank for none):",1,0,43,112,168,21,Productivity\AutoItpBevel1=pBevel1,1,12,26,58,198,92[process]...If,%pCheckBox1%,Equal,True,Add_Shortcut,StartMenu,%pTextBox1%
Posted 24 August 2007 - 11:38 AM
Posted 24 August 2007 - 02:55 PM
Posted 24 August 2007 - 03:54 PM
That's wrong.Or having the same scripts written specifically for nativeEx and another one for VistaPE or even VistaCE?
Posted 24 August 2007 - 06:58 PM
That is right , I have tested and work very wellLet's repeat: I needed 15 minutes to implement the buildModel shortcut mechanism into VistaPE.
After that -due to shortcut- every nativeEx based script, without any change, could be included in VistaPE.
Posted 24 August 2007 - 07:27 PM
Posted 24 August 2007 - 07:27 PM
Posted 24 August 2007 - 07:57 PM
@Nuno,If the option to boot from RAM from vistaPE, nativePE, bartPEcore, wbXP and any other project is so urgent I volunter to bring API support to all of them over september - all routines are already present, it's only a matter of adapting the already existent functions inside each project.
Posted 24 August 2007 - 08:01 PM
No problem, but that would increase the (already big) number of variables > again some time more when loading the project.@psc
Is it possible that BuilModel write the %Workdir% variable in Script.project
How many time we use [ IniRead,"%ProjectInfo%","TargetPaths","Program_Files",%workDir% ] ?
For Api it is important because for each function we need it
for one script we can use it 10 time and i think that slow the process
Posted 24 August 2007 - 08:01 PM
Nuno, sorry, but if you wanna convince someone of the advantages of the api idea don't mention the api.scripts.Simple and flexible - take a look on the already available scripts..
Posted 24 August 2007 - 10:35 PM
Hi,PeterNo problem, but that would increase the (already big) number of variables > again some time more when loading the project.
%API%=%projectdir%\Basic\Build\api.script Api_Start=Run,%API%,Func_Init_Apiand in the api.script this
[Variables] %HIVE_BASE%=HKLM ... and all variables [Func_Init_Api] AddVariables,%API%,"Variables" IniRead,"%ProjectInfo%","TargetPaths","Program_Files",%workDir% System,RefreshVarsEach script need the api must initialise the api by the command Api_Start
Posted 25 August 2007 - 12:22 AM
[Variables]
%ScriptLog%=%ProjectDir%\Basic\Build\ScriptLog.Script
%AutoRunScript%=%ProjectDir%\Basic\Build\autoruns.Script
%ProcessUPX%=%ProjectDir%\Tools\processUPX.Script
%AutoRunFile%=%TargetDir%\I386\system32\autorun.cmd
%BuildModelScript%=%ProjectDir%\Basic\Build\4 - buildModel.Script
%ProjectInfo%=%ProjectDir%\ProjectInfo.ini
%EmptyHive%=%ProjectDir%\Basic\Build\EmptyHive.Script
%PreISOScript%=%ProjectDir%\Temp\Data\ISO-PreProcess.Script.txt
%PostISOScript%=%ProjectDir%\Temp\ISO-PostProcess.Script.txt
%shcTemp%=%ProjectDir%\Temp\shcTemp.ini
%HoJoPEexe%=HoJoPE.exe
%HoJoPEdir%=%ProjectDir%\Basic\Prebuild
%Debug%=0
%HoJoPELevel%=2
%RAMDriveLetter%=B:
%SettingsDrive%=B:
%ClearTarget%=1
%justCopy%=0
%RegTyp%=0x1
%bootfix%=True
%ActiveShell%=D:\WinBuilder\wb4\Projects\LiveXP\Basic\Shells\Explorer.Script
%ExplorerShortcut%=shc-model
%XobDir%=C:\WinBuilder\wb2\Target\LiveXP\Programas\Xoblite
%api%=%projectdir%\Basic\Build\api.script
Add_Shortcut=Run,%api%,AddShortcut
Require_File=run,%api%,expand_file
Unpack=Run,%api%,depack
%source_win%=%SourceDir%\I386
%target_win%=%targetDir%\I386
%source_sys%=%SourceDir%\I386
%target_sys%=%TargetDir%\I386\System32
%HIVE_HKLM%=%targetDir%\I386\System32\setupreg.hiv
%HIVE_HKCU%=%TargetDir%\i386\System32\Config\default
%HIVE_HKU%=%targetDir%\I386\System32\Config\software
%HIVE_BASE%=HKLM
%reg_temp%=wb-hive
%reg%\=%reg_temp%\
hive_load=run,%api%,reg_hiveload
hive_unload=run,%api%,reg_hiveunload
reg_add=RegWrite,"%HIVE_BASE%"
associate_file=run,%api%,do_associate
Posted 25 August 2007 - 08:29 AM
How would you run (using API) medEvil's Opera script on VistaPE without any changes?How would I run medEvil's Opera script on VistaPE without any changes?
As I explained, every of those shell scripts only has toAnd if for some crazy reason I start using xoblite, bblean, nu2menu, XPE shortcuts or anything else that appears along the road?
[Created] Program=shortcutParse Version=1.1.0 Copyright=(C) 2007 Peter Schlang Date=2007-Aug-13 094641015 [Shortcut] targetDir=C:\Dokumente und Einstellungen\Peter\Desktop\WB Archiv\Beta8\Target\LiveXP shortCutName=CD-Opera shortCutType=DE shortCutLocation= shortCutExe=%ProgramFiles%\CD-Opera\Opera.exe shortCutToolTip= shortCutParameters= shortCutShow= shortCutDir=%ProgramFiles%\CD-Opera shortCutHotKey= shortCutIconFile= shortCutIcon=0As you remember, nativeEx_barebone contains as a sample the xoblite script.
I'll work on that.Peter, the number of variables inside a script.project is quite considerable - there is also a need for cleaning a lot of variables that are only used by some scripts on the initial build steps and this impacts on the overall app scripts which don't really need them.
If the initial build scripts could write these build variables inside a specific section inside a build file and leave script.project clear from these variables then it would surely optimize script processing for all app scripts.
The variables defined for api scripts already define most common actions possible to do inside windows platforms - just missing the add service or register OCX/DLL file, other than that they can already be used to perform most needed functions to add a program to a project and they don't slow down my project processing considerably.
I also don't think that static paths for dynamic locations should be written inside script.project - what happens when we move a project to another directory or a source with another language? huh.gif
This was the reason why iniread was used instead of predefined location - but with some luck this can also be modified inside nativeEx - it's all a matter of imagination to find a flexible solution isn't it?
Posted 25 August 2007 - 10:01 AM
Posted 25 August 2007 - 11:10 AM
@Nuno
You've seem to forgotten that we (Peter) already invented a way to use different shells without problems with our scripts in march or april. So no need to reinvent the wheel here, imo.
Last i would like to ask something off topic, cause i can't reach you by PM.
Where have all the scripts gone that used to be in Downloads, when it was still sorted by categories like browser and stuff?
0 members, 0 guests, 0 anonymous users