Source language: Translate to:

hpwControl Plugin - Early Preview for Feedback

Questions about NeoBook PlugIns

Moderator: Neosoft Support

hpwControl Plugin

Postby HPW » Fri Jan 16, 2004 1:25 pm

Just released hpwControl 1.14:

Action hpwLine - Now accept a 'All' as a line-number to read a whole file.
Action hpwLineNumber - Returns the linenumber where a string is first found in a string-list, now also in a file.
Action hpwAssoc - Get fields from a stringlist by keystring and offset, now also from a file.
HPW
 

hpwControl Plugin

Postby HPW » Sun Jan 18, 2004 1:42 am

Just released hpwControl 1.15:

Action hpwGetSubroutineList - Get a list of all subroutines in Pub.

Using the code posted by neosoft support here in the forum.
HPW
 

hpwControl Plugin

Postby HPW » Sat Mar 27, 2004 2:19 am

Just released hpwControl 1.16:

Action hpwLineProcess - Read lines from a file and perform a neoscript-action on each line.

Based on neosoft's idea here:

http://www.neosoftware.com/cgi-bin/ikon ... topic=1500
HPW
 

hpwControl Plugin

Postby HPW » Tue Apr 20, 2004 2:38 pm

Just released hpwControl 1.17:

Some ideas on type-checking for a typeless language:

hpwIsNumeric Check a string if it is numeric including , + .
hpwIsHex Check a string if it is Hex-Value
hpwIsAlpha Check a string if it is Alpha-String
hpwIsAlphaNumeric Check a string if it is Alpha-Numeric-String
hpwIsInteger Check a string if it is Integer
hpwIsFloat Check a string if it is Float
hpwIsDate Check a string if it is a Date
hpwIsTime Check a string if it is a Time
hpwIsMailURL Check a string if it is a Mail-URL
hpwIsIP Check a string if it is a IP-Adress
HPW
 

hpwControl Plugin

Postby djold1 » Tue Apr 20, 2004 2:52 pm

Very interesting...  Is it possible to do a

hpwIsType

where the result is the type? While internally you might have to loop the types which would be fast in your plug-in code, the developer/user would only have to work with one result rather than the slower script testing for all until a positive was reached.

Later...

Also, how would it be possible to distinguish between a string consisting of numbers and a numeric whole number?


(Edited by djold1 at 1:57 am on April 21, 2004)
djold1
 

hpwControl Plugin

Postby HPW » Tue Apr 20, 2004 10:56 pm

>hpwIsType

Should be possible. But some of the new test are true on the same string. For example IsAlpha and IsAlphaNumeric ist both true on an Alpha-String.
Also the single tests are good when I want only one type from an input field and want to check it directly.

>Also, how would it be possible to distinguish between a string consisting of numbers and a numeric whole number?

I do not get your point. Can you give more details or an example?

Some other details:

hpwIsFloat check the float with the current settings of the PC. So decimalseperator can be different.

Also date and time checking is dependent on PC settings.

hpwIsHex checks if it only contain chars which are valid for Hex. It does not check if it is a correct Hex. Maybe this could be done later.


(Edited by HPW at 8:04 am on April 21, 2004)
HPW
 

hpwControl Plugin

Postby HPW » Wed Apr 21, 2004 9:50 am

Just released hpwControl 1.18:

Action: hpwIsType = Check a string on it's type.
Returnvalues: FLOAT INTEGER ALPHANUM ALPHA NA

Does basic type checking. NA is 'Not Available'.
HPW
 

hpwControl Plugin

Postby djold1 » Wed Apr 21, 2004 2:45 pm

hpwIsType is fine and very useful.

Sorry for the confusion on:

"Pete: Also, how would it be possible to distinguish between a string consisting of numbers and a numeric whole number?

HPW: I do not get your point. Can you give more details or an example?
"

My mind was still wrapped around the other thread about explicit data typing rather than string typing which is what you are doing.

What I had in mind was strings vs whole numbers. Example: I have a house number which is "12345" in a string. And I want it to always be a string. But I could also have a string with an Integer number in it like "12345" which I always want to be a number.

Since NeoBook is mostly untyped, there is no way to distiguish between the two at this time other than creating variable names like [strHNUM] or [intSumNum] or other artificial means and parsing the name.

Therefore, for computational purposes I must keep in my mind or in rem notes the intended data type of the string. And if I want my string variable to always be treated as a string I must remember to use the "!" in front of the name.

However, this does not relate to what you are doing with the hpwIS series whcih has its own uses.

(Edited by djold1 at 1:47 am on April 22, 2004)
djold1
 

Postby Guest » Mon Nov 22, 2004 2:35 pm

Just released hpwControl 1.19:

Added hpwControl.ini in plugin-directory to be able to translate/expand plugin comments.
Guest
 

Postby Guest » Wed Feb 09, 2005 1:23 pm

Just released hpwControl 1.20:

Action: hpwGetEnv Read a variable from the system-enviroment
Added direct newLISP-interface
Guest
 

Postby Guest » Thu Feb 10, 2005 9:22 pm

so can we have an example of hpwGetEnv
Guest
 

Postby Guest » Fri Feb 11, 2005 12:20 am

Oops, seems that I have not packed the right pub.
I had added it to page3.
Will reload in the evening.

Anyway:

hpwGetEnv "SYSTEM" "TEMP" "[MyResult]"

First parameter can be SYSTEM or USER
Second is var-name.
Third is result-variable

This may return something like '%SystemRoot%\Temp'
I pass back what I get from the WIN-API call.
Guest
 

Postby Guest » Fri Feb 11, 2005 1:33 pm

Just upload a new ZIP with hpwControl 1.20:

Now with the right demo-PUB.
Guest
 

Postby Guest » Fri Feb 11, 2005 4:06 pm

To list all your system's environment variables, you can type

set

at the command prompt. You can also use the Set command to create new environment variables. For example,

set mynewvariable = newvalue

---------------------------------------------

here is a list of enviroment varibles I found online with a quick search of googe.

%ALLUSERSPROFILE% Local returns the location of the All Users Profile.

%APPDATA% Local returns the location where applications store data by default.

%CD% Local returns the current directory string.

%CMDCMDLINE% Local returns the exact command line used to start the current cmd.exe.

%CMDEXTVERSION% System returns the version number of the current Command Processor Extensions.

%COMPUTERNAME% System returns the name of the computer.

%COMSPEC% System returns the exact path to the command shell executable.

%DATE% System returns the current date. This variable uses the same format as the date /t command. Cmd.exe generates this variable. For more information about the date command, see the Date command.

%ERRORLEVEL% System returns the error code of the most recently used command. A non-0 value usually indicates an error.

%HOMEDRIVE% System returns which local workstation drive letter is connected to the user's home directory. This variable is set based on the value of the home directory. The user's home directory is specified in Local Users and Groups.

%HOMEPATH% System returns the full path of the user's home directory. This variable is set based on the value of the home directory. The user's home directory is specified in Local Users and Groups.

%HOMESHARE% System returns the network path to the user's shared home directory. This variable is set based on the value of the home directory. The user's home directory is specified in Local Users and Groups.

%LOGONSERVER% Local returns the name of the domain controller that validated the current logon session.

%NUMBER_OF_PROCESSORS% System specifies the number of processors installed on the computer.

%OS% System returns the OS name. Windows XP and Windows 2000 display the OS as Windows_NT.

%PATH% System specifies the search path for executable files.

%PATHEXT% System returns a list of the file extensions that the OS considers to be executable.

%PROCESSOR_ARCHITECTURE% System returns the processor's chip architecture. Values: x86, IA64.

%PROCESSOR_IDENTIFIER% System returns a description of the processor.

%PROCESSOR_LEVEL% System returns the model number of the computer's processor.

%PROCESSOR_REVISION% System returns the revision number of the processor.

%PROMPT% Local returns the command-prompt settings for the current interpreter. Cmd.exe generates this variable.

%RANDOM% System returns a random decimal number between 0 and 32767. Cmd.exe generates this variable.

%SYSTEMDRIVE% System returns the drive containing the Windows root directory (i.e., the system root).

%SYSTEMROOT% System returns the location of the Windows root directory.

%TEMP% System and User return the default temporary directories for applications that are available to users who are currently logged on. Some applications require TEMP and others require TMP.

%TMP% System and User return the default temporary directories for applications that are available to users who are currently logged on. Some applications require TEMP and others require TMP.

%TIME% System returns the current time. This variable uses the same format as the time /t command. Cmd.exe generates this variable. For more information about the time command, see the Time command.

%USERDOMAIN% Local returns the name of the domain that contains the user's account.

%USERNAME% Local returns the name of the user currently logged on.

%USERPROFILE% Local returns the location of the profile for the current user.

%WINDIR% System returns the location of the OS directory

-------------------------------------

Oh, and thanks HPW for the new addition to the plugin
Guest
 

Postby Guest » Tue Mar 01, 2005 8:10 pm

Hello Hans

I installed "hpwControl 1.20" for the first time...   and did some experimenting...

I created my own set of environmental variables and I could not retrieve their values in the NeoBook Sample pub.  

Is the plugin limited to only certain system variables ?

I tried something simple...

SET NAME=JOHN

I could not retrieve the value JOHN through the demonstration publication.  

Is it possible to retrieve user defined environmental variables ?

Tommy
Guest
 

PreviousNext

Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron