Page 1 of 2 12>
Topic Options
#169027 - 2006-10-07 04:05 AM KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
KiXtart Learning Series - Lesson 03

    RULES
  • No KiXtart.org Moderators or Administrators aside from myself are allowed to post in this thread.
  • (This is for those with less experience to learn, not for bored, experienced users to bump their post count)
  • (If you're able to easily do this task then please don't participate with any solutions)
  • No using IM,PM, KiXtart.org search feature, or Google to locate/find an answer (you're on the honor system here).
  • The only help you're allowed to use is the KiXtart User Manual. Please be honest and don't use other resources
  • All submitted code must be as though it were to be used in production. ie.. code should set options and
    have error checks as well as documentation of what the code is doing. Error checking does not need to
    be extensive but should have some basic check.


    Objectives:
  • Read local and remote registry to obtain a value
  • Create and modify an .INI file with values read from the Registry
  • Modify the .INI to include the current PID of KIX32.EXE or WKIX32.EXE
  • Execute a second script that has a different Process ID Number and add to the .INI it's value
  • Pick 5 computers from your network and read the timeout value from their boot.ini file
    then input that value into the new INI you created.
  • Given strings with variable length locate the term NOW and return the first
    character before it and after it and place in the INI file
    (exclude/ignore blank space before or after the term)


    DO NOT post a solution until Tuesday, Oct 10, 2006.
  • I will make a post on Tuesday to indicate when you can post a solution.
  • If I've made an error or have not provided enough information you can post asking for clarification
    but please do not post any solutions until Tuesday.


    Details for objectives
  • Create an INI file in the same folder the script runs from named KiX-Lesson03.ini
    The case of the saved file name is to be maintained.


Example KiX-Lesson03.ini
 
Code:
 
[LESSON_03]
 
LOCAL_SYSTEM_MAIN_PID=VALUE
LOCAL_SYSTEM_SECOND_PID=VALUE
LOCAL_SYSTEM_Bitmap=VALUE
REMOTE_SYSTEM_2K_Bitmap=VALUE
REMOTE_SYSTEM_XP_2K3_Bitmap=VALUE
REMOTE_SYSTEMNAME_01_TIMEOUT=VALUE
REMOTE_SYSTEMNAME_02_TIMEOUT=VALUE
REMOTE_SYSTEMNAME_03_TIMEOUT=VALUE
REMOTE_SYSTEMNAME_04_TIMEOUT=VALUE
REMOTE_SYSTEMNAME_05_TIMEOUT=VALUE
RANDOM_STRING1=VALUE
RANDOM_STRING2=VALUE
RANDOM_STRING3=VALUE




    Registry Reading
  • Read the value from the Registry key here from a remote Windows 200 system
    and from a remote XP or Server 2003 system and from your local system.
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder
  • The value: Bitmap
  • Modify the VALUE entry in the INI with the returned value. The value must include the full
    path of the local and remote system and not just the variable.

  
    BOOT.INI Reading
  • Remotely read the BOOT.INI timeout value of 5 computers on your network and enter the value into the
    KiX-Lesson03.ini file as show above where SYSTEMNAME is the real name of the system
    as well as the DATE and TIME the file was last modified.
  • Return the the DATE in this format MMDDYYYY-HHMMSS


    STRINGS reading
  • The quick or was it now slow fox ran in the snow
  • The snow in France is now gone but will return again next Winter
  • There is now a slow return on investments at the bank
     

 
 
 
Previous Learning Series

9/21/2006
KiXtart Learning Series - Lesson 01
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=168455

9/25/2006
KiXtart Learning Series - Lesson 02
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=168694

Post 9,000 for me

Top
#169028 - 2006-10-08 08:34 AM Re: KiXtart Learning Series - Lesson 03
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Doc,
I presume the date when the boot.ini was last changed has to be included in the value for the keys "REMOTE_COMPUTERNAME_0x_TIMEOUT". But how should te format of the value be? Maybe "ss MMDDYYYY-HHMMSS" where lowercase ss is the timeout in seconds?

Top
#169029 - 2006-10-08 09:27 AM Re: KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
Yes that sounds fine. Seems I missed that. Thanks for the feedback.
Top
#169030 - 2006-10-09 09:11 AM Re: KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
Okay, hopefully people are working on this Lesson now. I suppose I'll have to start working on it tomorrow myself so that I can post a response as well on Tuesday or Wednesday.
Top
#169031 - 2006-10-09 12:38 PM Re: KiXtart Learning Series - Lesson 03
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
as usual I am late for class ... just posted something chewed on for 2:nd class, will try to get this done as well.. hopefully
Top
#169032 - 2006-10-09 03:36 PM Re: KiXtart Learning Series - Lesson 03
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
I will do my best but I have a holiday today so do not have access to the remote computers (no I do not have a lab set up at home).
Top
#169033 - 2006-10-09 09:52 PM Re: KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
Just a reminder that this Learning Series is open to all Korg members.

It is designed to help you learn and experience KiXtart from a new user point of understanding.

For experienced users please read the rules and only post when appropriate.

Thank you.

Top
#169034 - 2006-10-10 08:55 AM Re: KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
Those of you wishing to participate in the Learning Series 03 can now post solutions.

Please don't forget to comment some on what your code is doing and at least some minor error checking.


If you're participating and you're not ready to post a solution - Please DON'T READ BEYOND HERE!


Edited by NTDOC (2006-10-10 09:00 AM)

Top
#169035 - 2006-10-10 10:17 PM Re: KiXtart Learning Series - Lesson 03
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Ok, going to try and post it again.... Last time it messed up somehow

I am sure that there is lots of room for improvement within this script..
Code:

;Script Options
Dim $Bitmap,$BitMapComp[2,1],$Count,$TimeOutComp[4],$element,$String1,$String2,$String3
Global $SO ;my throwaway variable to supress any screen output

If NOT @LOGONMODE
    Break On
EndIf

$SO=SETOPTION("Explicit", "ON")
$SO=SETOPTION("NoMacrosInStrings", "ON")
$SO=SETOPTION("NoVarsInStrings", "ON")
$SO=SETOPTION("WrapAtEOL", "ON")
;*************************************************************************

$BitMapComp[0,0] = "\\.\"
$BitMapComp[0,1] = "LOCAL_SYSTEM_Bitmap"
$BitMapComp[1,0] = "\\sacs\"
$BitMapComp[1,1] = "REMOTE_SYSTEM_2K_Bitmap"
$BitMapComp[2,0] = "\\srdc\"
$BitMapComp[2,1] = "REMOTE_SYSTEM_XP_2K3_Bitmap"
$TimeOutComp = "srdc","sacs","sutil","svhost04","x019678"
$String1 = "The quick or was it now slow fox ran in the snow"
$String2 = "The snow in France is now gone but will return again next Winter"
$String3 = "There is now a slow return on investments at the bank"
;*************************************************************************


;Create INI file and add the first value to it

$SO = WriteProfileString(@scriptdir+"\KiX-Lesson03.ini","LESSON_03","LOCAL_SYSTEM_MAIN_PID",@PID)

;Launch a second instance of KiX and get the PID for it
;The Second script contains this line
;Exit @PID


Shell "..\kix32 Round3_2.Kix"

$SO = WriteProfileString(@scriptdir+"\KiX-Lesson03.ini","LESSON_03","LOCAL_SYSTEM_SECOND_PID",@Error)


;Get the BitMap Entries
For $count = 0 to Ubound($BitMapComp)
   
$SO = Bitmap($BitMapComp[$Count,0],$BitMapComp[$Count,1])
Next

;Get the timeout values
$Count = 1
For each $element in $TimeOutComp
    Timeouts($Element,$Count)
   
$Count = $Count + 1
Next

;Get the requested String info
FindInString($String1,"Now",1)
FindInString(
$String2,"Now",2)
FindInString(
$String3,"Now",3)





Function Bitmap($Comp, $Value)
;Now we need the Bitmap value to add to the INI file
$Bitmap = Readvalue($Comp+"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder","Bitmap")

;And since we can not include any variables in the output
;Not sure about this part for the remote systems.... It appears to be working correctly
;However how does one know for sure?

$Bitmap = ExpandEnvironmentVars($Bitmap)

;And write it to the ini
$SO = WriteProfileString(@scriptdir+"\KiX-Lesson03.ini","LESSON_03",$Value,$Bitmap)

EndFunction

Function Timeouts($Comp,$Count)

Dim $Time,$Date,$DateSplit

;Get the Timeout Value from specified computer
$Time = ReadProfileString("\\"+$Comp+"\"+"C$\Boot.ini","Boot Loader","TimeOut")

;Get the last Modified time of the Boot.ini file
$Date = GetFileTime("\\"+$comp+"\"+"C$\Boot.ini")

;Split the string in half so we can rearrange to specifications
$Date = Split($Date," ")

;Split the date apart so that it can be rearranged
$DateSplit = Split($Date[0],"/")

;Rearrange the date and write it back to the same variable
$DateSplit = $DateSplit[1] + $DateSplit[2]+$DateSplit[0]

;Now make a single variable from the 2 in the specified format
$Date = $DateSplit + "-" + Join(Split($Date[1],":"),"")

;Write the information to the INI file
$SO = WriteProfileString(@scriptdir+"\KiX-Lesson03.ini","LESSON_03","REMOTE_"+$Comp+"_0"+$Count+"_TIMEOUT",$Time+" "+$date)

EndFunction

Function FindInString($StringToRead,$SearchPhrase,$Count)
Dim $Array[],$Position,$ActualValue

;Split up the string
$Array = Split($StringToRead," ")

;Look For the phrase that was passed
$Position = Ascan($Array,$SearchPhrase)

;Now that we know where the phrase is, Get the requested info
$ActualValue = Right($Array[$Position-1],1) + Left($Array[$Position+1],1)

;Write the information to the INI file
$SO = WriteProfileString(@scriptdir+"\KiX-Lesson03.ini","LESSON_03","RANDOM_STRING"+$Count,$ActualValue)

EndFunction




The INI file contents
Code:

[LESSON_03]
LOCAL_SYSTEM_MAIN_PID=3824
LOCAL_SYSTEM_SECOND_PID=3356
LOCAL_SYSTEM_Bitmap=C:\WINDOWS\system32\SHELL32.dll,4
REMOTE_SYSTEM_2K_Bitmap=C:\WINNT\system32\shell32.dll,4
REMOTE_SYSTEM_XP_2K3_Bitmap=C:\WINDOWS\system32\SHELL32.dll,4
REMOTE_srdc_01_TIMEOUT=5 03142006-142913
REMOTE_sacs_02_TIMEOUT=30 11102004-091359
REMOTE_sutil_03_TIMEOUT=7 10262004-152634
REMOTE_svhost04_04_TIMEOUT=30 04172006-144216
REMOTE_x019678_05_TIMEOUT=30 07262006-134701
RANDOM_STRING1=ts
RANDOM_STRING2=sg
RANDOM_STRING3=sa


Top
#169036 - 2006-10-10 10:45 PM Re: KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
Thanks for the post Gargoyle. I can see though that as noticed in a previous lesson that you're well above the "noobie" point in scripting.

Your solutions are much more along the lines of most of the more seasoned scripters here.

I'll hold off on any code commenting for now to give others time to post their solutions.

Top
#169037 - 2006-10-10 10:55 PM Re: KiXtart Learning Series - Lesson 03
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Quote:


I can see though that as noticed in a previous lesson that you're well above the "noobie" point in scripting




Thanks, but this took some definite looking through the manual for me. That and lots of ? to the console so I could figure out what I was really looking at. You definatly made me think about exactly what was happening. And I did my first Split - Join combo.

Top
#169038 - 2006-10-11 03:08 AM Re: KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
Gargoyle - just a tip. Please recheck your Bitmap() UDF
Top
#169039 - 2006-10-11 04:47 AM Re: KiXtart Learning Series - Lesson 03
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
And this is why I consider myself a Noobie, I just don't see it.
Top
#169040 - 2006-10-11 05:41 AM Re: KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
No problem. I'll let you know later on after some others have time to post or by Thursday at the latest.
Top
#169041 - 2006-10-11 10:40 PM Re: KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
Okay I'll have to apologize as I picked a Registry key that did not have the proper characteristics of what I was attempting to show.


Basically I wanted to demonstrate that you could not use the
ExpandEnvironmentVars to obtain the data from a remote system.
If it was the same version OS and all default installation directories you could "assume" but that still would not be the best action to take.
You should code something that would give the correct results regardless of the installation directory.

Here is an example script to demonstrate.




;Script should be run from a Windows XP system. 

If Not @LogonMode
Break On
EndIf
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
$SO=SetOption('WrapAtEOL','On')

;Declare our vars
Dim $RegSubKey, $RegValue, $RemoteRead, $LocalRead, $sComputer
Dim $ExpandRemoteRead, $ExpandLocalRead

;Remote System must be Windows 2000 to demonstrate
$sComputer='name of a remote windows 2000 system goes here'

;Remove any leading or trailing back slashes from the computer name then add them back
;in case someone adds or puts the wrong amount of back slashes
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')

;Define our main key
$RegSubKey='HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion'

;Define our value to lookup
$RegValue='MediaPathUnexpanded'

;Read the Registry without expanding
$RemoteRead = ReadValue($sComputer+$RegSubKey,$RegValue)
$LocalRead = ReadValue($RegSubKey,$RegValue)

;Read the Registry expanding the environment vars
$ExpandRemoteRead = ExpandEnvironmentVars(ReadValue($sComputer+$RegSubKey,$RegValue))
$ExpandLocalRead = ExpandEnvironmentVars(ReadValue($RegSubKey,$RegValue))

;Display our NO EXPAND results
'Local No Expand: ' + $LocalRead ?
'Remote No Expand: ' + $RemoteRead ??

;Display our EXPAND results
'Local Expand: ' + $ExpandLocalRead ?
'Remote Expand: ' + $ExpandRemoteRead ?

;In this case you should notice that all output is the same
;however the path on a Windows 2000 system should be something like
;C:\WINNT and not C:\WINDOWS

Top
#169042 - 2006-10-12 05:27 PM Re: KiXtart Learning Series - Lesson 03
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
So my understanding then would be that this was just a fluke on that particular key.

Would be nice to know why it worked though.

Top
#169043 - 2006-10-12 06:03 PM Re: KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
It didn'twork. That particular key on Windows 2000 is not in the normal %var% entry.

It is stored as C:\WINNT\ etc.... unlike XP/2K3

Open regedit and view the key on XP and then on Windows 2000 and you'll see what I'm talking about.

Top
#169044 - 2006-10-12 06:40 PM Re: KiXtart Learning Series - Lesson 03
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Ah, now I see..
Top
#169045 - 2006-10-13 09:03 AM Re: KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
Comments on Gargoyles code.
 
Reminder that these are "my opinions" and may not be 100% in
line with ideas / recommendations of other experienced scripters.


If other Admins, Moderators, or experienced scripters see something that I've commented on that is just plain wrong please join in, however if it is just your own personal preferences or method then please don't do so at this time.
 
As always there are many ways, methods, styles of scripting and one can not always say that one way is always better than another.
 
 


;:: My fault, as I was wanting to demonstrate UCase and LCase but I did not specify it 
;:: adequately in my instructions.


;:: (imho) These should go after the SETOPTION directives
Dim $Bitmap,$BitMapComp[2,1],$Count,$TimeOutComp[4],$element,$String1,$String2,$String3

;:: Okay to have here
Global $SO ;my throwaway variable to supress any screen output

If NOT @LOGONMODE
Break On
EndIf

$SO=SETOPTION("Explicit", "ON")
$SO=SETOPTION("NoMacrosInStrings", "ON")
$SO=SETOPTION("NoVarsInStrings", "ON")
$SO=SETOPTION("WrapAtEOL", "ON")
;*************************************************************************

;:: Interesting method of setting up for the data
$BitMapComp[0,0] = "\\.\"
$BitMapComp[0,1] = "LOCAL_SYSTEM_Bitmap"
$BitMapComp[1,0] = "\\sacs\"
$BitMapComp[1,1] = "REMOTE_SYSTEM_2K_Bitmap"
$BitMapComp[2,0] = "\\srdc\"
$BitMapComp[2,1] = "REMOTE_SYSTEM_XP_2K3_Bitmap"
$TimeOutComp = "srdc","sacs","sutil","svhost04","x019678"
$String1 = "The quick or was it now slow fox ran in the snow"
$String2 = "The snow in France is now gone but will return again next Winter"
$String3 = "There is now a slow return on investments at the bank"
;*************************************************************************


$SO = WriteProfileString(@scriptdir+"\KiX-Lesson03.ini","LESSON_03","LOCAL_SYSTEM_MAIN_PID",@PID)

;Launch a second instance of KiX and get the PID for it
;The Second script contains this line
;Exit @PID

;:: Though this method does work it could easily return invalid data if the
;:: shell had some other error or some network error
;:: A more robust method would be to create a temporary file or registry entry with the second script
;:: have the first script read it and do some type of validation check then delete the
;:: temporary file or registry entry.
Shell "..\kix32 Round3_2.Kix"

$SO = WriteProfileString(@scriptdir+"\KiX-Lesson03.ini","LESSON_03","LOCAL_SYSTEM_SECOND_PID",@Error)

;:: Interesting and good idea for gathering the values.
;:: One could probably expand it though to a 2 dimensional array
;:: but that is way beyond the scope of this Lesson series.

;Get the BitMap Entries
For $count = 0 to Ubound($BitMapComp)
$SO = Bitmap($BitMapComp[$Count,0],$BitMapComp[$Count,1])
Next

;Get the timeout values
$Count = 1
For each $element in $TimeOutComp
Timeouts($Element,$Count)
$Count = $Count + 1
Next

;Get the requested String info
;:: Though the UDF is handling the updates one normally would use the UDF to obtain the data
;:: and then feed it back to the call into a variable. That way the data could easily
;:: be used in other places. As you have it now the data can not be used in other places
;:: if wanted.
FindInString($String1,"Now",1)
FindInString($String2,"Now",2)
FindInString($String3,"Now",3)

;:: Similar to above comment
;:: Also - the script example I provided above shows why the EXPANDENVIRONMENTVARS
;:: can not be used against a remote system, thus this UDF would not be functional for the task
;:: if I had used another key as shown in that example.
;:: Also - though a bit beyond the scope of this Learning series, since you've used UDFs please
;:: read the UDF Guidlines and How to Create UDFs
;:: Basically there should be error checking and as best as possible they should be very
;:: portable - meaning that someone else could copy them and use them as is without any alteration
;:: of the code. It should provide back either error codes or data (para phrasing...)
;:: Please see FAQ for more information
Function Bitmap($Comp, $Value)
;Now we need the Bitmap value to add to the INI file
$Bitmap = Readvalue($Comp+"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder","Bitmap")

;And since we can not include any variables in the output
;Not sure about this part for the remote systems.... It appears to be working correctly
;However how does one know for sure?
$Bitmap = ExpandEnvironmentVars($Bitmap)

;And write it to the ini
$SO = WriteProfileString(@scriptdir+"\KiX-Lesson03.ini","LESSON_03",$Value,$Bitmap)

EndFunction

Function Timeouts($Comp,$Count)

Dim $Time,$Date,$DateSplit

;Get the Timeout Value from specified computer
;:: Though KiXtart will allow/handle the "C$\Boot.ini"
;:: I often will over-emphasize by coding it like this 'C'+'$'+'\'+'Boot.ini'
;:: This type of coding also allows you to easily use a VAR instead which allows
;:: you to modify one entry that can then alter for all the other places where used
$Time = ReadProfileString("\\"+$Comp+"\"+"C$\Boot.ini","Boot Loader","TimeOut")

;Get the last Modified time of the Boot.ini file

;:: Since you're using a bit more advanced items then I'd expect from a new
;:: KiXtart scripter - you could also use one var instead of hard coding paths or file names
;:: within the code, you could also probably perform the GetFileTime and Split/Join in one line
;:: Again, way beyond the scope of this Lesson, but thought I would point it out
;:: It doesn't have to be "Golfed" down, but does allow for a single more distinct operation
;:: at times if warranted
$Date = GetFileTime("\\"+$comp+"\"+"C$\Boot.ini")

;Split the string in half so we can rearrange to specifications
$Date = Split($Date," ")

;Split the date apart so that it can be rearranged
$DateSplit = Split($Date[0],"/")

;Rearrange the date and write it back to the same variable
$DateSplit = $DateSplit[1] + $DateSplit[2]+$DateSplit[0]

;Now make a single variable from the 2 in the specified format
$Date = $DateSplit + "-" + Join(Split($Date[1],":"),"")

;Write the information to the INI file
$SO = WriteProfileString(@scriptdir+"\KiX-Lesson03.ini","LESSON_03","REMOTE_"+$Comp+"_0"+$Count+"_TIMEOUT",$Time+" "+$date)

EndFunction


;:: Again, well done, but was hoping to see normal InStr, InStrRev, SubStr, Left, Right style coding
;:: which would be more along the lines of new KiXtart scripters. This is a good intermediate style
;:: that provides good information for new scripters to see and think of as they progress in their understanding
;:: and scripting skill level.
Function FindInString($StringToRead,$SearchPhrase,$Count)
Dim $Array[],$Position,$ActualValue

;Split up the string
$Array = Split($StringToRead," ")

;Look For the phrase that was passed
$Position = Ascan($Array,$SearchPhrase)

;Now that we know where the phrase is, Get the requested info
$ActualValue = Right($Array[$Position-1],1) + Left($Array[$Position+1],1)

;Write the information to the INI file
$SO = WriteProfileString(@scriptdir+"\KiX-Lesson03.ini","LESSON_03","RANDOM_STRING"+$Count,$ActualValue)

EndFunction



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

The INI file contents
Code:
--------------------------------------------------------------------------------

[LESSON_03]
LOCAL_SYSTEM_MAIN_PID=3824
LOCAL_SYSTEM_SECOND_PID=3356
LOCAL_SYSTEM_Bitmap=C:\WINDOWS\system32\SHELL32.dll,4
REMOTE_SYSTEM_2K_Bitmap=C:\WINNT\system32\shell32.dll,4
REMOTE_SYSTEM_XP_2K3_Bitmap=C:\WINDOWS\system32\SHELL32.dll,4
REMOTE_srdc_01_TIMEOUT=5 03142006-142913
REMOTE_sacs_02_TIMEOUT=30 11102004-091359
REMOTE_sutil_03_TIMEOUT=7 10262004-152634
REMOTE_svhost04_04_TIMEOUT=30 04172006-144216
REMOTE_x019678_05_TIMEOUT=30 07262006-134701
RANDOM_STRING1=ts
RANDOM_STRING2=sg
RANDOM_STRING3=sa


Top
#169046 - 2006-10-24 08:01 AM Re: KiXtart Learning Series - Lesson 03
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11577
Loc: CA
Removed sticky post setting
Top
Page 1 of 2 12>


Moderator:  NTDOC, ShaneEP, Mart, Radimus, Glenn Barnas, Jochen, Allen 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 157 anonymous users online.
Newest Members
Jodey, Hiker, GTRoberts, KatieQuinn, Brennnnn
17684 Registered Users

Generated in 0.043 seconds in which 0.013 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org