diff --git a/bazaar/SysInfo/src.tpp/SysInfo$en-us.tpp b/bazaar/SysInfo/src.tpp/SysInfo$en-us.tpp index 825eb4054..0f5d554bc 100644 --- a/bazaar/SysInfo/src.tpp/SysInfo$en-us.tpp +++ b/bazaar/SysInfo/src.tpp/SysInfo$en-us.tpp @@ -11,55 +11,27 @@ topic "SysInfo function reference"; [b42;2 $$9,9#13035079074754324216151401829390:normal] [{_}%EN-US [s4;%- [*R6 SysInfo]&] -[s0;%- &] -[s4;%- &] -[s5;:Replace`(String`,String`,String`):%- [_^String^ String]_[* Replace]([_^String^ String]_ -[*@3 str], [_^String^ String]_[*@3 find], [_^String^ String]_[*@3 replace])&] -[s2; Returns the resulting String obtained by replacing in [%-*@3 str] -String [%-*@3 find] with [%-*@3 replace ]all the times that [%-*@3 find -]appears in [%-*@3 str].&] -[s3; &] -[s4;%- &] -[s5;:FormatLong`(long`):%- [_^String^ String]_[* FormatLong]([@(0.0.255) long]_[*@3 a])&] -[s2; Returns the long number [%-*@3 a ]converted into a String.&] -[s3; &] -[s4;%- &] -[s5;:SearchFile`(String`,String`,String`):%- [_^Array^ Array]<[_^String^ String]>_[* Search -File]([_^String^ String]_[*@3 dir], [_^String^ String]_[*@3 condFile], -[_^String^ String]_[*@3 text]_`=_`"`")&] -[s2; Returns an Array of Strings containing the file names with full -path of the files under folder [%-*@3 dir] that comply with condition -(with wildcards) [%-*@3 condFile] and that contain inside the text -[%-*@3 text].&] -[s3; &] -[s4;%- &] -[s5;:LoadFile`_Safe`(String`):%- [_^String^ String]_[* LoadFile`_Safe]([_^String^ String]_[*@3 f -ileName])&] -[s2; Same as LoadFile([%-*@3 fileName]) but it works in Posix for files -automatically generated by the OS.&] [s0; &] -[s0; U`+`+ LoadFile() functions prior to loading the file into a -String, get the length of the file to dimension the String that -will get the file. This is not valid for OS generated virtual -files where the file length returned by the OS is 0 (for example -files under folder /proc)&] [s0; &] -[s0; LoadFile`_Safe() just get the file bytes returned by the OS -until the file end.&] -[s3; &] -[s4;%- &] +[ {{10000@(128) [s0; [* Running files and commands]]}}&] +[s0; &] [s5;:GetExtExecutable`(const String`):%- [_^String^ String]_[* GetExtExecutable]([@(0.0.255) c onst]_[_^String^ String]_[*@3 ext])&] [s2; Gets the program that will open by default the files with extension [%-*@3 ext].&] -[s0; -|For example GetExtExecutable(`"html`") will return a String -with the name of the default internet browser.&] +[s0; &] +[s0; -|[/ Example:]&] +[s0; [/ -|GetExtExecutable(`"html`") `-> `"Firefox.exe`"]&] [s3; &] [s4;%- &] [s5;:LaunchFile`(const String`):%- [@(0.0.255) bool]_[* LaunchFile]([@(0.0.255) const]_[_^String^ S tring]_[*@3 file])&] [s2; Opens the file [%-*@3 file ]with the adecuated program defined in the OS by default.&] +[s0; &] +[s0; [/ -|Example:]&] +[s0; [/ -|LaunchFile(`"c:`\`\My spreadsheet.txt`"). It will open default +program (probably Notepad) with document `"My spreadsheet.txt`".]&] [s3; &] [s4;%- &] [s5;:LaunchCommand`(const char`*`,void`(`*`)`(String`&`)`):%- [@(0.0.255) int]_[* LaunchC @@ -67,26 +39,43 @@ ommand]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 cmd], [@(0.0.255) void]_(`*[ lBack])(String_`&))&] [s2; Launches command line program [%-*@3 cmd. readCallBack ]is a function to manage the program output.&] +[s0; -|Program launched has to be in .exe folder, referenced in the +OS default program folders or it has to be included the full +path in [%-*@3 cmd].&] [s2; Returns the command exit code .&] +[s0; -|&] +[s0; [/ -|Example:]&] +[s0; [/ -|LaunchCommand(`"mencoder film.mpg `-o film.avi`", MyHandler);]&] [s3; &] [s4;%- &] [s5;:LaunchCommand`(const char`*`,String`&`):%- [@(0.0.255) int]_[* LaunchCommand]([@(0.0.255) c onst]_[@(0.0.255) char]_`*[*@3 cmd], [_^String^ String]_`&[*@3 ret])&] [s2; Launches command line program [%-*@3 cmd. ret ]gets all the program output.&] +[s0; -|Program launched has to be in .exe folder, referenced in the +OS default program folders or it has to be included the full +path in [%-*@3 cmd].&] [s2; Returns the command exit code.&] +[s0; -|&] +[s0; [/ -|Example:]&] +[s0; [/ -|String strOutput;]&] +[s0; [/ -|LaunchCommand(`"mencoder film.mpg `-o film.avi`", strOutput);]&] [s3; &] [s4;%- &] [s5;:LaunchCommand`(const char`*`):%- [_^String^ String]_[* LaunchCommand]([@(0.0.255) cons t]_[@(0.0.255) char]_`*[*@3 cmd])&] [s2;%- [%% Launches command line program ][*@3 cmd.]&] +[s0; -|Program launched has to be in .exe folder, referenced in the +OS default program folders or it has to be included the full +path in [%-*@3 cmd].&] [s0; -|Returns the program output.&] -[s3; &] -[s4;%- &] -[s5;:DoEvents`(`):%- [@(0.0.255) void]_[* DoEvents]()&] -[s2; A ProcessEvents just for old Visual Basic programmers.&] -[s3;%- &] -[s4;%- &] +[s0; -|&] +[s0; [/ -|Example:]&] +[s0; [/ -|String strOutput `= LaunchCommand(`"mencoder film.mpg `-o +film.avi`");]&] +[s0; &] +[ {{10000@(128) [s0; [* Obtaining special folders]]}}&] +[s0;%- &] [s5;:GetDesktopFolder`(`):%- [_^String^ String]_[* GetDesktopFolder]()&] [s2; Gets the default Desktop folder path.&] [s3;%- &] @@ -138,7 +127,9 @@ t]_[@(0.0.255) char]_`*[*@3 cmd])&] [s5;:GetSystemFolder`(`):%- [_^String^ String]_[* GetSystemFolder]()&] [s2; Gets the default system files folder path.&] [s3;%- &] -[s4;%- &] +[s0; &] +[ {{10000@(128) [s0; [* Hardware, BIOS, OS and Distro info]]}}&] +[s0;%- &] [s5;:GetSystemInfo`(String`&`,String`&`,String`&`,int`&`):%- [@(0.0.255) void]_[* GetSyst emInfo]([_^String^ String]_`&[*@3 manufacturer], [_^String^ String]_`&[*@3 productName], [_^String^ String]_`&[*@3 version], [@(0.0.255) int]_`&[*@3 numberOfProcessors])&] @@ -161,6 +152,11 @@ emInfo]([_^String^ String]_`&[*@3 manufacturer], [_^String^ String]_`&[*@3 produ [s2; [%-*@3 identifier] is the core identifier&] [s2; [%-*@3 architecture] is the core architecture (32, 64)&] [s2; [%-*@3 speed].is the core speed in MHz.&] +[s0; &] +[s4;%- &] +[s5;:GetCpuSpeed`(`):%- [@(0.0.255) int]_[* GetCpuSpeed]()&] +[s2; Gets the real time main CPU speed in MHz.&] +[s0; -|This data is directly calculated by the function.&] [s3; &] [s4;%- &] [s5;:GetMemoryInfo`(int`&`,uint64`&`,uint64`&`,uint64`&`,uint64`&`,uint64`&`,uint64`&`):%- [@(0.0.255) b @@ -176,8 +172,82 @@ Phys], [_^uint64^ uint64]_`&[*@3 freePhys], [_^uint64^ uint64]_`&[*@3 totalPageF [s2; [%-*@3 freePageFile ]is the free paging file&] [s2; [%-*@3 totalVirtual ]is the total virtual memory&] [s2; [%-*@3 freeVirtual ]is the free virtual memory.&] +[s3; &] +[s4;%- &] +[s5;:GetOsInfo`(String`&`,String`&`,String`&`,String`&`,String`&`,String`&`,String`&`):%- [@(0.0.255) b +ool]_[* GetOsInfo]([_^String^ String]_`&[*@3 kernel], [_^String^ String]_`&[*@3 kerVersion], + [_^String^ String]_`&[*@3 kerArchitecture], [_^String^ String]_`&[*@3 distro], +[_^String^ String]_`&[*@3 distVersion], [_^String^ String]_`&[*@3 desktop], +[_^String^ String]_`&[*@3 deskVersion])&] +[s2; Gets many information to identify the operating system and Desktop +where the application is being run. &] +[s2; [%-*@3 kernel]: Kernel name&] +[s2; [%-*@3 kerVersion]: Kernel version&] +[s2; [%-*@3 kerArchitecture]: Kernel architecture&] +[s2; [%-*@3 distro]: Distro name&] +[s2; [%-*@3 distVersion]: Distro version&] +[s2; [%-*@3 desktop]: Desktop manager name&] +[s2; [%-*@3 deskVersion].: Desktop manager version&] +[s3; &] +[s4;%- &] +[s5;:GetDesktopManagerNew`(`):%- [_^String^ String]_[* GetDesktopManagerNew]()&] +[s2; A more complete version of GetDesktopManager() based on GetOsInfo().&] [s0; &] [s4;%- &] +[s5;:GetDriveList`(`):%- [_^Array^ Array]<[_^String^ String]>_[* GetDriveList]()&] +[s2; Returns an array with the paths to all drives, internal or external, +identified in the system.&] +[s3;%- &] +[s4;%- &] +[s5;:GetDriveSpace`(String`,uint64`&`,uint64`&`,uint64`&`):%- [@(0.0.255) bool]_[* GetDri +veSpace]([_^String^ String]_[*@3 drive], [_^uint64^ uint64]_`&[*@3 freeBytesUser], +[_^uint64^ uint64]_`&[*@3 totalBytesUser], [_^uint64^ uint64]_`&[*@3 totalFreeBytes])&] +[s2; Gets [%-*@3 drive] space.&] +[s2; [%-*@3 freeBytesUser]: Amount of free bytes available to the user&] +[s2; [%-*@3 totalBytesUser]: Size of drive visible for the user&] +[s2; [%-*@3 totalFreeBytes]: Amount of free bytes.&] +[s0; -|Returns false if drive is not mounted or it is not accessible&] +[s3; &] +[s4;%- &] +[s5;:GetDriveInformation`(String`,String`&`,String`&`,int`&`,String`&`):%- [@(0.0.255) b +ool]_[* GetDriveInformation]([_^String^ String]_[*@3 drive], [_^String^ String]_`&[*@3 type +], [_^String^ String]_`&[*@3 volume], [@(0.0.255) int]_`&[*@3 maxName], +[_^String^ String]_`&[*@3 fileSystem])&] +[s2; Gets [%-*@3 drive] information&] +[s2;%- [*@3 type]: Gets the type of the drive.&] +[s2;%- Available types are `"Hard`", `"Network`", `"Optical`", `"RAM`", +`"Removable`".&] +[s2;%- [*@3 volume]: Gets the name of the drive&] +[s2;%- [*@3 maxName]: Gets the maximum length permitted for a file name&] +[s2;%- [*@3 fileSystem]: Gets the drive formatting system.&] +[s0; -|Returns false if drive is not mounted or it is not accessible&] +[s3; &] +[s4;%- &] +[s5;:GetCompilerInfo`(String`&`,int`&`,String`&`):%- [@(0.0.255) void]_[* GetCompilerInfo +]([_^String^ String]_`&[*@3 name], [@(0.0.255) int]_`&[*@3 version], +[_^String^ String]_`&[*@3 date])&] +[s2; Returns compiling information, like compiler [%-*@3 name, ]compiler +[%-*@3 version] and program compilation [%-*@3 date].&] +[s3; &] +[s4;%- &] +[s5;:GetBatteryStatus`(bool`&`,int`&`,int`&`):%- [@(0.0.255) bool]_[* GetBatteryStatus]([@(0.0.255) b +ool]_`&[*@3 discharging], [@(0.0.255) int]_`&[*@3 percentage], [@(0.0.255) int]_`&[*@3 rema +iningMin])&] +[s2; Gets battery information like if it is [%-*@3 discharging] or +connected to the grid, [%-*@3 percentage] of charging where 100% +means full charge, and number of expected computer running minutes +in [%-*@3 remainingMin].&] +[s0; -|Returns true if the values got are valid.&] +[s3; &] +[s4;%- &] +[s5;:GetBatteryInfo`(bool`&`):%- [@(0.0.255) bool]_[* GetBatteryInfo]([@(0.0.255) bool]_`&[*@3 p +resent]_)&] +[s2; Gets if battery is [%-*@3 present ]or not.&] +[s0; -|Returns true if the values got are valid.&] +[s0; &] +[s0; &] +[ {{10000@(128) [s0; [* Process handling]]}}&] +[s4;%- &] [s5;:GetWindowsList`(Array``&`,Array``&`,Array``&`,Array``&`,Array``&`):%- [@(0.0.255) v oid]_[* GetWindowsList]([_^Array^ Array]<[@(0.0.255) long]>_`&[*@3 wid], [_^Array^ Array]<[@(0.0.255) long]>_`&[*@3 pid], [_^Array^ Array]<[_^String^ String]>_`&[*@3 n @@ -279,96 +349,19 @@ if possible.&] [s5;:ProcessExists`(long`):%- [@(0.0.255) bool]_[* ProcessExists]([@(0.0.255) long]_[*@3 pid]) &] [s2; Returns true if a process with handle [%-*@3 pid ]exists.&] -[s3; &] -[s4;%- &] -[s5;:GetOsInfo`(String`&`,String`&`,String`&`,String`&`,String`&`,String`&`,String`&`):%- [@(0.0.255) b -ool]_[* GetOsInfo]([_^String^ String]_`&[*@3 kernel], [_^String^ String]_`&[*@3 kerVersion], - [_^String^ String]_`&[*@3 kerArchitecture], [_^String^ String]_`&[*@3 distro], -[_^String^ String]_`&[*@3 distVersion], [_^String^ String]_`&[*@3 desktop], -[_^String^ String]_`&[*@3 deskVersion])&] -[s2; Gets many information to identify the operating system and Desktop -where the application is being run. &] -[s2; [%-*@3 kernel]: Kernel name&] -[s2; [%-*@3 kerVersion]: Kernel version&] -[s2; [%-*@3 kerArchitecture]: Kernel architecture&] -[s2; [%-*@3 distro]: Distro name&] -[s2; [%-*@3 distVersion]: Distro version&] -[s2; [%-*@3 desktop]: Desktop manager name&] -[s2; [%-*@3 deskVersion].: Desktop manager version&] -[s3; &] -[s4;%- &] -[s5;:GetDesktopManagerNew`(`):%- [_^String^ String]_[* GetDesktopManagerNew]()&] -[s2; A more complete version of GetDesktopManager() based on GetOsInfo().&] -[s3;%- &] -[s4;%- &] -[s5;:GetDriveList`(`):%- [_^Array^ Array]<[_^String^ String]>_[* GetDriveList]()&] -[s2; Returns an array with the paths to all drives, internal or external, -identified in the system.&] -[s3;%- &] -[s4;%- &] -[s5;:GetDriveSpace`(String`,uint64`&`,uint64`&`,uint64`&`):%- [@(0.0.255) bool]_[* GetDri -veSpace]([_^String^ String]_[*@3 drive], [_^uint64^ uint64]_`&[*@3 freeBytesUser], -[_^uint64^ uint64]_`&[*@3 totalBytesUser], [_^uint64^ uint64]_`&[*@3 totalFreeBytes])&] -[s2; Gets [%-*@3 drive] space.&] -[s2; [%-*@3 freeBytesUser]: Amount of free bytes available to the user&] -[s2; [%-*@3 totalBytesUser]: Size of drive visible for the user&] -[s2; [%-*@3 totalFreeBytes]: Amount of free bytes.&] -[s0; -|Returns false if drive is not mounted or it is not accessible&] -[s3; &] -[s4;%- &] -[s5;:GetDriveInformation`(String`,String`&`,String`&`,int`&`,String`&`):%- [@(0.0.255) b -ool]_[* GetDriveInformation]([_^String^ String]_[*@3 drive], [_^String^ String]_`&[*@3 type -], [_^String^ String]_`&[*@3 volume], [@(0.0.255) int]_`&[*@3 maxName], -[_^String^ String]_`&[*@3 fileSystem])&] -[s2; Gets [%-*@3 drive] information&] -[s2;%- [*@3 type]: Gets the type of the drive.&] -[s2;%- Available types are `"Hard`", `"Network`", `"Optical`", `"RAM`", -`"Removable`".&] -[s2;%- [*@3 volume]: Gets the name of the drive&] -[s2;%- [*@3 maxName]: Gets the maximum length permitted for a file name&] -[s2;%- [*@3 fileSystem]: Gets the drive formatting system.&] -[s0; -|Returns false if drive is not mounted or it is not accessible&] -[s3; &] [s4;%- &] [s5;:GetProcessId`(`):%- [@(0.0.255) long]_[* GetProcessId]()&] [s2; Gets actual running process handle.&] [s3;%- &] [s4;%- &] [s5;:Shutdown`(String`):%- [@(0.0.255) bool]_[* Shutdown]([_^String^ String]_[*@3 action])&] -[s2; Tries to logoff, reboot or shutdown the actual running process.&] +[s2; Tries to logoff, reboot or shutdown the actual running session.&] [s0; -|Actual valid [%-*@3 action ]values are `"logoff`", `"reboot`" and `"shutdown`".&] [s3; &] -[s4;%- &] -[s5;:BytesToKMGT`(uint64`):%- [_^String^ String]_[* BytesToKMGT]([_^uint64^ uint64]_[*@3 byte -s])&] -[s2; Converts an amount of bytes [%-*@3 bytes ]to the shortest String -possible.&] -[s3; &] -[s4;%- &] -[s5;:GetCompilerInfo`(String`&`,int`&`,String`&`):%- [@(0.0.255) void]_[* GetCompilerInfo -]([_^String^ String]_`&[*@3 name], [@(0.0.255) int]_`&[*@3 version], -[_^String^ String]_`&[*@3 date])&] -[s2; Returns compiling information, like compiler [%-*@3 name, ]compiler -[%-*@3 version] and program compilation [%-*@3 date].&] -[s3; &] -[s4;%- &] -[s5;:GetBatteryStatus`(bool`&`,int`&`,int`&`):%- [@(0.0.255) bool]_[* GetBatteryStatus]([@(0.0.255) b -ool]_`&[*@3 discharging], [@(0.0.255) int]_`&[*@3 percentage], [@(0.0.255) int]_`&[*@3 rema -iningMin])&] -[s2; Gets battery information like if it is [%-*@3 discharging] or -connected to the grid, [%-*@3 percentage] of charging where 100% -means full charge, and number of expected computer running minutes -in [%-*@3 remainingMin].&] -[s0; -|Returns true if the values got are valid.&] -[s3; &] -[s4;%- &] -[s5;:GetBatteryInfo`(bool`&`):%- [@(0.0.255) bool]_[* GetBatteryInfo]([@(0.0.255) bool]_`&[*@3 p -resent]_)&] -[s2; Gets if battery is [%-*@3 present ]or not.&] -[s0; -|Returns true if the values got are valid.&] -[s3; &] -[s4;%- &] +[s0; &] +[ {{10000@(128) [s0; [* Windows handling]]}}&] +[s0; &] [s5;:Window`_GetRect`(long`,long`&`,long`&`,long`&`,long`&`):%- [@(0.0.255) bool]_[* Wind ow`_GetRect]([@(0.0.255) long]_[*@3 windowId], [@(0.0.255) long]_`&[*@3 left], [@(0.0.255) long]_`&[*@3 top], [@(0.0.255) long]_`&[*@3 right], [@(0.0.255) long]_`&[*@3 bott @@ -386,8 +379,17 @@ ect]([@(0.0.255) long]_[*@3 windowId], [@(0.0.255) long]_[*@3 left], location in the screen in [%-*@3 left], [%-*@3 top], [%-*@3 right] and [%-*@3 bottom].&] [s2; -|Returns true if the window is relocated correctly..&] -[s3; &] +[s0; &] [s4;%- &] +[s5;:Window`_SaveCapture`(long`,String`):%- [@(0.0.255) bool]_[* Window`_SaveCapture]([@(0.0.255) l +ong]_[*@3 windowId], [_^String^ String]_[*@3 fileName])&] +[s2; Saves the image of the window with handle [%-*@3 windowId] to +the file with name [%-*@3 fileName].&] +[s0; -|In Posix systems the bitmap file format is .xwd&] +[s0; -|In Windows systems the bitmap file format is .bmp.&] +[s0; &] +[ {{10000@(128) [s0; [* Mouse and keyboard handling]]}}&] +[s3; &] [s5;:Mouse`_GetPos`(long`&`,long`&`):%- [@(0.0.255) bool]_[* Mouse`_GetPos]([@(0.0.255) lon g]_`&[*@3 x], [@(0.0.255) long]_`&[*@3 y])&] [s2; Gets the mouse position [%-*@3 x, y].in screen pixels where upper @@ -402,14 +404,6 @@ upper left vertex of window with window handle [%-*@3 windowId].&] [s0; -|Returns true if the operation has been done successfully.&] [s3; &] [s4;%- &] -[s5;:Window`_SaveCapture`(long`,String`):%- [@(0.0.255) bool]_[* Window`_SaveCapture]([@(0.0.255) l -ong]_[*@3 windowId], [_^String^ String]_[*@3 fileName])&] -[s2; Saves the image of the window with handle [%-*@3 windowId] to -the file with name [%-*@3 fileName].&] -[s0; -|In Posix systems the bitmap file format is .xwd&] -[s0; -|In Windows systems the bitmap file format is .bmp.&] -[s3; &] -[s4;%- &] [s5;:Mouse`_LeftClick`(`):%- [@(0.0.255) void]_[* Mouse`_LeftClick]()&] [s2; Simulates by software a mouse click with the left button as if it would have been done with the mouse.&] @@ -466,11 +460,23 @@ ool]_[*@3 caps], [@(0.0.255) bool]_[*@3 num], [@(0.0.255) bool]_[*@3 scroll])&] [s2; Sets the status of keys [%-*@3 caps ]lock, [%-*@3 num ]lock and [%-*@3 scroll] [%-*@3 ]lock.&] [s3; &] -[s4;%- &] -[s5;:GetCpuSpeed`(`):%- [@(0.0.255) int]_[* GetCpuSpeed]()&] -[s2; Gets the real time main CPU speed in MHz.&] -[s0; -|This data is directly calculated by the function.&] -[s3;%- &] +[s0; &] +[ {{10000@(128) [s0; [* Miscellaneous functions]]}}&] +[s0; &] +[s5;:LoadFile`_Safe`(String`):%- [_^String^ String]_[* LoadFile`_Safe]([_^String^ String]_[*@3 f +ileName])&] +[s2; Same as LoadFile([%-*@3 fileName]) but it works in Posix for files +automatically generated by the OS.&] +[s0; &] +[s0; U`+`+ LoadFile() functions prior to loading the file into a +String, get the length of the file to dimension the String that +will get the file. This is not valid for OS generated virtual +files where the file length returned by the OS is 0 (for example +files under folder /proc)&] +[s0; &] +[s0; LoadFile`_Safe() just get the file bytes returned by the OS +until the file end.&] +[s0; &] [s4;%- &] [s5;:FileCat`(const char`*`,const char`*`):%- [@(0.0.255) bool]_[* FileCat]([@(0.0.255) con st]_[@(0.0.255) char]_`*[*@3 file], [@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 appendFile]) @@ -478,5 +484,34 @@ st]_[@(0.0.255) char]_`*[*@3 file], [@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 [s2; Appends at the end of [%-*@3 file] the contents of file [%-*@3 appendFile]. [%-*@3 file] will be modified and [%-*@3 appendFile ]remains unchanged.&] [s0; -|Returns true if the operations has been done succesfully.&] +[s3;%- &] +[s4;%- &] +[s5;:Replace`(String`,String`,String`):%- [_^String^ String]_[* Replace]([_^String^ String]_ +[*@3 str], [_^String^ String]_[*@3 find], [_^String^ String]_[*@3 replace])&] +[s2; Returns the resulting String obtained by replacing in [%-*@3 str] +String [%-*@3 find] with [%-*@3 replace ]all the times that [%-*@3 find +]appears in [%-*@3 str].&] [s3; &] +[s4;%- &] +[s5;:FormatLong`(long`):%- [_^String^ String]_[* FormatLong]([@(0.0.255) long]_[*@3 a])&] +[s2; Returns the long number [%-*@3 a ]converted into a String.รง&] +[s0; &] +[s4;%- &] +[s5;:BytesToKMGT`(uint64`):%- [_^String^ String]_[* BytesToKMGT]([_^uint64^ uint64]_[*@3 byte +s])&] +[s2; Converts an amount of bytes [%-*@3 bytes ]to the shortest String +possible.&] +[s3; &] +[s4;%- &] +[s5;:DoEvents`(`):%- [@(0.0.255) void]_[* DoEvents]()&] +[s2; A ProcessEvents just for old Visual Basic programmers.&] +[s3; &] +[s4;%- &] +[s5;:SearchFile`(String`,String`,String`):%- [_^Array^ Array]<[_^String^ String]>_[* Search +File]([_^String^ String]_[*@3 dir], [_^String^ String]_[*@3 condFile], +[_^String^ String]_[*@3 text]_`=_`"`")&] +[s2; Returns an Array of Strings containing the file names with full +path of the files under folder [%-*@3 dir] that comply with condition +(with wildcards) [%-*@3 condFile] and that contain inside the text +[%-*@3 text].&] [s0; ] \ No newline at end of file diff --git a/bazaar/SysInfo/srcdoc.tpp/SysInfo$en-us.tpp b/bazaar/SysInfo/srcdoc.tpp/SysInfo$en-us.tpp index 68dc54d78..a52fedcd9 100644 --- a/bazaar/SysInfo/srcdoc.tpp/SysInfo$en-us.tpp +++ b/bazaar/SysInfo/srcdoc.tpp/SysInfo$en-us.tpp @@ -26,20 +26,20 @@ topic "SysInfo general description"; [s0; Functions to get information and handle Desktop, OS and hardware internals.&] [s0; &] -[s0; Includes functions to manage:&] +[s0; Includes functions for:&] [s0;0 &] -[s0;i150;O0; Special folders&] -[s0;i150;O0; System Info&] -[s0;i150;O0; Memory Info&] -[s0;i150;O0; OS Info&] -[s0;i150;O0; Distro Info&] -[s0;i150;O0; Default Exes&] -[s0;i150;O0; Drives Info&] -[s0;i150;O0; Launch File&] -[s0;i150;O0; Find and Kill Window&] -[s0;i150;O0; Windows List&] -[s0;i150;O0; Process List&] -[s0;i150;O0; Windows handling&] -[s0;i150;O0; Mouse handling&] -[s0;i150;O0; Keyboard handling&] +[s0;i150;O0; [^topic`:`/`/SysInfo`/src`/SysInfo`$en`-us`#GetExtExecutable`(const String`)^ R +unning files and commands]&] +[s0;i150;O0; [^topic`:`/`/SysInfo`/src`/SysInfo`$en`-us`#GetDesktopFolder`(`)^ Obtainin +g special folders]&] +[s0;i150;O0; [^topic`:`/`/SysInfo`/src`/SysInfo`$en`-us`#GetSystemInfo`(String`&`,String`&`,String`&`,int`&`)^ H +ardware, BIOS and OS info]&] +[s0;i150;O0; [^topic`:`/`/SysInfo`/src`/SysInfo`$en`-us`#GetWindowsList`(Array``&`,Array``&`,Array``&`,Array``&`,Array``&`)^ P +rocess handling]&] +[s0;i150;O0; [^topic`:`/`/SysInfo`/src`/SysInfo`$en`-us`#Window`_GetRect`(long`,long`&`,long`&`,long`&`,long`&`)^ W +indows handling]&] +[s0;i150;O0; [^topic`:`/`/SysInfo`/src`/SysInfo`$en`-us`#Mouse`_GetPos`(long`&`,long`&`)^ M +ouse and keyboard handling]&] +[s0;i150;O0; [^topic`:`/`/SysInfo`/src`/SysInfo`$en`-us`#LoadFile`_Safe`(String`)^ Misc +ellaneous functions]&] [s0; ] \ No newline at end of file diff --git a/bazaar/SysInfo/srcimp.tpp/SysInfo$en-us.tpp b/bazaar/SysInfo/srcimp.tpp/SysInfo$en-us.tpp index 2419ca6d8..1b9b636d5 100644 --- a/bazaar/SysInfo/srcimp.tpp/SysInfo$en-us.tpp +++ b/bazaar/SysInfo/srcimp.tpp/SysInfo$en-us.tpp @@ -25,8 +25,7 @@ topic "SysInfo implementation details"; [s2; SysInfo&] [s0; A goal in the design of these functions has been to avoid accessing external software not included internally in the OS by default.&] -[s5;i150;O0; Windows implementation does use of internal DLL and -wmic.&] +[s5;i150;O0; Windows implementation use internal DLL and wmic.&] [s0;i150;O0; Posix implementation uses X11 libraries and OS related utilities like mount and xdg.&] [s0; &] @@ -39,15 +38,15 @@ in Ubuntu can run properly in Fedora without recompiling.&] implementations it requires a level of hacking so all feedback will be acknowledged.&] [s0; &] +[s0; Here are enclosed the testing results divided in two tables:&] [s0; &] [ {{10000@(128) [s0; [* Testing results]]}}&] [s0; &] -[ {{769:769:769:769:769:769:769:769:769:769:769:769:772h1;@1 [s0; [0 Distro]] +[ {{833:833:833:833:833:833:833:833:833:833:833:837h1;@1 [s0; [0 Distro]] :: [s0; [0 Version]] :: [s0; [0 Architecture]] :: [s0; [0 Desktop]] :: [s0; [0 Version]] -:: [s0; [0 Tested]] :: [s0; [0 Comments]] :: [s0; [0 Special folders]] :: [s0; [0 System Info]] @@ -55,25 +54,11 @@ will be acknowledged.&] :: [s0; [0 OS Info]] :: [s0; [0 Distro Info]] :: [s0; [0 Default Exes]] -::@2 [s0; [0 Freesbie]] -:: [s0; [0 2.0]] -:: [s0; [0 32]] -:: [s0;0 ] -:: [s0;0 ] -:: [s0; [0 No]] -::@9 [s0; [0 Not possible to run without password]] -::@2 [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0; [0 Fedora]] +::@2 [s0; [0 Fedora]] :: [s0; [0 9]] :: [s0; [0 32]] :: [s0; [0 Gnome]] :: [s0; [0 2.22]] -:: [s0; [0 Yes]] :: [s0;0 ] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -86,7 +71,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Kde]] :: [s0; [0 4.0.3]] -:: [s0; [0 Yes]] :: [s0;0 ] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -94,51 +78,11 @@ will be acknowledged.&] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] -:: [s0; [0 Fluxbox]] -:: [s0; [0 7.10]] -:: [s0; [0 32]] -:: [s0;0 ] -:: [s0;0 ] -:: [s0; [0 No]] -::@9 [s0; [0 Live version not found]] -::@2 [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0; [0 Gentoo]] -:: [s0;0 ] -:: [s0; [0 32]] -:: [s0; [0 Xfce]] -:: [s0;0 ] -:: [s0; [0 No]] -::@9 [s0; [0 Not possible to mount internal or usb HD]] -::@2 [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0; [0 Knoppix]] -:: [s0; [0 5.11]] -:: [s0; [0 32]] -:: [s0; [0 Kde]] -:: [s0;0 ] -:: [s0; [0 No]] -::@9 [s0; [0 Old Glib version]] -::@2 [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] :: [s0; [0 Kubuntu]] :: [s0; [0 8.10]] :: [s0; [0 32]] :: [s0; [0 Kde]] :: [s0; [0 4.1.2]] -:: [s0; [0 Yes]] :: [s0;0 ] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -151,7 +95,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Kde]] :: [s0;0 ] -:: [s0; [0 Yes]] :: [s0;0 ] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -164,7 +107,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Gnome]] :: [s0; [0 2.24]] -:: [s0; [0 Yes]] :: [s0;0 ] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -177,7 +119,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Enlightenment]] :: [s0; [0 0.16]] -:: [s0; [0 Yes]] :: [s0;0 ] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -190,7 +131,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Gnome]] :: [s0; [0 2.22]] -:: [s0; [0 Yes]] :: [s0;0 ] ::@9 [s0; [0 Some not detected]] ::@2 [s0; [0 Ok]] @@ -203,7 +143,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Kde]] :: [s0; [0 4.0.4]] -:: [s0; [0 Yes]] :: [s0;0 ] ::@9 [s0; [0 Some not detected]] ::@2 [s0; [0 Ok]] @@ -211,25 +150,11 @@ will be acknowledged.&] ::@2 [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] -:: [s0; [0 Slackware]] -:: [s0;0 ] -:: [s0; [0 32]] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -::@9 [s0; [0 Live version not found]] -::@2 [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] :: [s0; [0 Slax]] :: [s0;0 ] :: [s0; [0 32]] :: [s0; [0 Kde]] :: [s0; [0 3.5.9]] -:: [s0; [0 Yes]] :: [s0;0 ] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -242,7 +167,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Gnome]] :: [s0; [0 2.22]] -:: [s0; [0 Yes]] :: [s0;0 ] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -255,7 +179,6 @@ will be acknowledged.&] :: [s0; [0 64]] :: [s0; [0 Gnome]] :: [s0; [0 2.22]] -:: [s0; [0 Yes]] :: [s0;0 ] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -268,7 +191,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Xfce]] :: [s0;0 ] -:: [s0; [0 Yes]] ::@9 [s0; [0 Partial test. Expected better results]] :: [s0; [0 Some not detected]] ::@2 [s0; [0 Ok]] @@ -281,7 +203,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Vista]] :: [s0;0 ] -:: [s0; [0 Yes]] :: [s0;0 ] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -294,7 +215,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 XP]] :: [s0;0 ] -:: [s0; [0 Yes]] :: [s0;0 ] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -304,34 +224,21 @@ will be acknowledged.&] :: [s0; [0 Ok]]}}&] [s0;0 &] [s0;%- &] -[ {{908:908:908:908:908:908:908:908:908:908:920h1;@1 [s0; [0 Distro]] +[ {{998:998:998:998:998:998:998:998:998:1018h1;@1 [s0; [0 Distro]] :: [s0; [0 Version]] :: [s0; [0 Architecture]] :: [s0; [0 Desktop]] :: [s0; [0 Version]] -:: [s0; [0 Tested]] :: [s0; [0 Drives Info]] :: [s0; [0 Launch File]] :: [s0; [0 Find and Kill Window]] :: [s0; [0 Windows List]] :: [s0; [0 Process List]] -::@2 [s0; [0 Freesbie]] -:: [s0; [0 2.0]] -:: [s0; [0 32]] -:: [s0;0 ] -:: [s0;0 ] -:: [s0; [0 No]] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0; [0 Fedora]] +::@2 [s0; [0 Fedora]] :: [s0; [0 9]] :: [s0; [0 32]] :: [s0; [0 Gnome]] :: [s0; [0 2.22]] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -342,51 +249,16 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Kde]] :: [s0; [0 4.0.3]] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] -:: [s0; [0 Fluxbox]] -:: [s0; [0 7.10]] -:: [s0; [0 32]] -:: [s0;0 ] -:: [s0;0 ] -:: [s0; [0 No]] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0; [0 Gentoo]] -:: [s0;0 ] -:: [s0; [0 32]] -:: [s0; [0 Xfce]] -:: [s0;0 ] -:: [s0; [0 No]] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0; [0 Knoppix]] -:: [s0; [0 5.11]] -:: [s0; [0 32]] -:: [s0; [0 Kde]] -:: [s0;0 ] -:: [s0; [0 No]] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] :: [s0; [0 Kubuntu]] :: [s0; [0 8.10]] :: [s0; [0 32]] :: [s0; [0 Kde]] :: [s0; [0 4.1.2]] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -397,7 +269,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Kde]] :: [s0;0 ] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -408,7 +279,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Gnome]] :: [s0; [0 2.24]] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -419,7 +289,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Enlightenment]] :: [s0; [0 0.16]] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -430,7 +299,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Gnome]] :: [s0; [0 2.22]] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -441,29 +309,16 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Kde]] :: [s0; [0 4.0.4]] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] -:: [s0; [0 Slackware]] -:: [s0;0 ] -:: [s0; [0 32]] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] -:: [s0;0 ] :: [s0; [0 Slax]] :: [s0;0 ] :: [s0; [0 32]] :: [s0; [0 Kde]] :: [s0; [0 3.5.9]] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -474,7 +329,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Gnome]] :: [s0; [0 2.22]] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -485,7 +339,6 @@ will be acknowledged.&] :: [s0; [0 64]] :: [s0; [0 Gnome]] :: [s0; [0 2.22]] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -496,7 +349,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Xfce]] :: [s0;0 ] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -507,7 +359,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 Vista]] :: [s0;0 ] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -518,7 +369,6 @@ will be acknowledged.&] :: [s0; [0 32]] :: [s0; [0 XP]] :: [s0;0 ] -:: [s0; [0 Yes]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] :: [s0; [0 Ok]] @@ -528,4 +378,48 @@ will be acknowledged.&] [s0; It seems OS CPU speed report is not reliable in Linux as it varies between program runs.&] [s0; The same error has been found in system reporting programs and -desktop cpu speed icons.] \ No newline at end of file +desktop cpu speed icons.&] +[s0; &] +[s0; &] +[s0; Next table includes the list of OS and Distros unsuccesfully +tried and the reason:&] +[s0; &] +[ {{10000@(128) [s0; [* OS and Distros not tested]]}}&] +[s0;%- &] +[ {{1665:1665:1665:1665:1665:1675h1;@1 [s0; [0 Distro]] +:: [s0; [0 Version]] +:: [s0; [0 Architecture]] +:: [s0; [0 Desktop]] +:: [s0; [0 Version]] +:: [s0; [0 Comments]] +::@2 [s0; [0 Freesbie]] +:: [s0; [0 2.0]] +:: [s0; [0 32]] +:: [s0;0 ] +:: [s0;0 ] +:: [s0; [$2;0 Not possible to run without password]] +:: [s0; [0 Fluxbox]] +:: [s0; [0 7.10]] +:: [s0; [0 32]] +:: [s0;0 ] +:: [s0;0 ] +:: [s0; [$2;0 Live version not found]] +:: [s0; [0 Gentoo]] +:: [s0;0 ] +:: [s0; [0 32]] +:: [s0; [0 Xfce]] +:: [s0;0 ] +:: [s0; [$2;0 Not possible to mount internal or usb HD]] +:: [s0; [0 Knoppix]] +:: [s0; [0 5.11]] +:: [s0; [0 32]] +:: [s0; [0 Kde]] +:: [s0;0 ] +:: [s0; [$2;0 Old Glib version]] +:: [s0; [0 Slackware]] +:: [s0;0 ] +:: [s0; [0 32]] +:: [s0;0 ] +:: [s0;0 ] +:: [s0; [$2;0 Live version not found]]}}&] +[s0;3%- ] \ No newline at end of file