Scripting.encoder object documentation

Greetings,
    I need to encode a vbscript (actually in a HTA). Someone has srcenc but it only runs on win xp.
   I have found a script which does the encoding which uses the "Scripting.encoder" object that works fine on windows 7.
   However, I cannot find any documentation on the properties and methods of this object. Does it exist anywhere?
Thanks
David Z

Sorry all of these things are obsolete.
In case you missed it,  this is the 21st century.
¯\_(ツ)_/¯
and sarcasm is still the lowest form of wit....
Funny how that object can still be used in Windows 8.1 Update 1.
It is still the 21st century and HTAs are obsolete which is why you cannot easily fid documentation.
What script ing options might there be?  How about the name of one of the script languages installed.  Perhaps "vbscript" or "jscript".
In  way I was trying to shy you away from trying to use this as it does not work well on Vista and later systems. It has never worked correctly for HTAs.
There are many third party tools which can obfuscate a script.  Look into these.
Here is one obsolete blog on the encode:
http://blogs.technet.com/b/heyscriptingguy/archive/2006/03/09/how-can-i-encode-scripts-within-an-hta.aspx
The encoder control does not work well with HTAs.  Try it.  You will see that it fails in strange ways.
Microsoft has not supported this control for almost 10 years.  Now that XP is gone it will disappear.  It currently will not workon mist implementations of Windows 8.1 and 2012.
I first warned people about this control back in 2006.  The same people are now coming back wanting fixes that do not exists.
Use PowerShell or XAML for GUIs.  They are not likely to be an issue fro the next few years.
If you search for information ou will find that the information was pulled by Microsoft in about 2003.  No one should be attempting to use this control anymore and it has been included only for compatibility with no support.  If it work OK. 
If not - too bad.
The arguments are simple:
Set se = CreateObject("Scripting.Encoder")
se.EncodeScriptFile(strExt,byte_stream,cFlags,bstrDefaultLang)
cFlags is 0 for all but "ASP"
bstrDefaultLang is not needed
strExt is the file extension for the language which is either "vbs". "js", "asp" or the extension of any installed scripting languages that support the  encoder.
Search and you will find many examples along with discussions on the failures and some fixes.  You will see dozens of answers from me back to at least 2003.  I started using the script encode and control in about 1995 when it was first distributed
with Visual Studio.  I still have the CDs with the SDK.  I will sell them to you if you really want documentation.  I will not even attempt to find the docs in that stack of about 30 CDs.
Take my advice please.  Do not use obsolete software.  If you really want to I have licensed copies of Windows ME that you can have.  I even have an old TRS 80 - do you want to buy that?
¯\_(ツ)_/¯

Similar Messages

  • Script encoder custom preference?

    Is there any way to script encoder custom preference? I wanna do an Automator action to change the MP3 encoder to lowest quality possible, convert a file, then change it back to the original encoder preference.
    Changing the encoder (from MP3 Encoder to AAC Encoder for instance) are well documented but changing the encoder's preference seems to be impossible, please advise.
    I can think of a work-around: To create a duplicate of MP3 Encoder, each of which has a different custom setting so I can avoid using to script to change encoder's preference, but essentially change from one encoder to another.

    Either in /Library/PreferencePanes or in /Users/yourusername/Library/Preferences
    A simple Spotlight search would have found them for you.

  • Scripts of objects in a schema.

    Hi
    I am working on a problem which is:
    To generate the scripts of objects in a schema, with separate object types in different folders, with separate files for each object.
    For instance if I have a schema called HR then the scripts for all the tables in this schema should be in a predefined folder called TABLES and within this folder the individual scripts for tables tab1.sql , tab2.sql.. and so on. I need to do this for all objects in the given schema. This I need to do from sql*plus and not from any GUI.
    For this I am able to figure out some basic steps required. Below is the sample for same
    DECLARE
    V_SCRIPT VARCHAR2(4000);
    CURSOR C1 IS
      SELECT OBJECT_TYPE,OBJECT_NAME,OWNER
      FROM ALL_OBJECTS WHERE OWNER ='HR' ;
    BEGIN
      FOR I IN C1 LOOP
          with scripts as (select dbms_metadata.get_ddl(I.OBJECT_TYPE,I.OBJECT_NAME,I.OWNER) txt from dual)
          select replace(txt,'"') ||'/' script_text INTO V_SCRIPT from scripts;
          DBMS_OUTPUT.PUT_LINE(V_SCRIPT);
      END LOOP;
    END;
    {code}
    Here in the script I can identify few problems like:
    1. The DBMS_OUTPUT.PUT_LINE will work till the buffer level and after that will give an error message. Is there any way to eliminate this?
    2. How can I spool the files in the middle of pl/sql code.
    These scripts are to be created on a windows system in some location like *c:\scripts\tables\..*,*c:\scripts\indexes\..* and so on.
    The database version should be:
    {code}
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    "CORE     10.2.0.3.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    {code}
    Also I came to know of utl_file package, can I use this for the same.
    please provide your expert guidance for the problem.
    Thanks
    Ansh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Two thoughts:
    First: The Oracle database does not have folders. What product are you working in?
    Second: Cursor loops such as the one you've written have been obsolete in Oracle for more than 12 years: Why are you writing one now?
    Look up BULK COLLECT and FORALL at http://tahiti.oracle.com

  • XI object documentation

    A few months ago i have been reading about the option to store all XI object documentation in  a way that it can be used in the portal with the KM module.  there is a config setting if i am right for this. Can anybody help me out here because at the moment accessing the xi object documentation at the different levels is very difficult.

    Hi Frank,
    You can use the HTML editor to enter simple documentation for an object. If this object requires comprehensive, complex documentation, you can record this documentation externally. You can then set a hyperlink from the documentation editor of the Integration Builder to this documentation. An internal company Intranet or the SAP Knowledge Warehouse can be used for external documentation storage.
    Also you can refer to link posted by Michal.  This will give more info.
    Regards.
    Praveen

  • How to remove all scripts on object instances?

    I'm looking for any kind of solution here, besides disabling the warning.
    I hate it when I'm converting someone else's AS2 project to AS3, and there's code buried on an onstage instance somewhere, which gives me the warning:
    "Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored."
    How can I:
         A) Find which instances have code on them.
              or
         B) Remove all code on all instances.
    Idea:
    Can I save as a different format/version/something and lose this data somehow. Then I could convert it back its current FLA format?

    YES!!! So awesome!!  Thanks

  • Why does Livecycle Designer need to lock scripting on objects with children that are fragments??

    Can someone tell me why Livecycle need to lock scripting on objects with children that are fragments??
    I mean, just because I have a fragment (which you can't edit the script for), why does Livecycle need me to NOT edit say the initialise event on the Main form.
    Yes, I can remove my fragments, edit and reinsert.  Also if the event already has a script, I can edit the xml.  But neither of these are terribly convenient.
    Couldn't there be a better way?

    The purpose of the fragment is to create re-usable or standard components. In most cases the fragment is not created by the same person designing the form and they do not want the from designer to modify any part of the fragment (it is a separate XDP file). There may be code in that fragment that relies on the structure that exists. If you have the rights you can always edit the fragment and when your PDF is created the changes will be picked up.
    If you want to be able to modify the fragment while it is in Design mode sounds to me like you want to add a component to the object library. This will allow you to have a reusable piece of a form that you can modify on a form by form basis. To do this simply build the piece that you want. Lasso the entire form and drag it onto the Custom library. When you release it a dialog will pop up allowing you to name your component. Now on any form design you can drag your new component onto the canvas and all methods/properties and code will come with that component (allowing you to modify it for that form as you see fit).
    Note that you can create your own libraries to hold your components if you see fit. Also if you put your libraries on a shared drive, you can share components between Designers.
    Paul

  • "Your script uses objects from a non-existent collection"

    I have a multiple page form with a barcode on each form.  I created a separate collection for each barcode.  The auto generated code looks fine and has the correct collection created, however I still get the error, Paper Forms Barcode error "Your script uses objects from a non-existent collection".
    I'm not sure what is wrong and I don't know how to fix it.  Anyone else run into this?

    You will need to create a shared folder in Dropbox, then populate that with what ever folders you need to organize the files. It appears the DropBox app,will not handle this, but you can do, it by logging in to you account via Safari. Once the folders are created, they will show up in the app. Likewise with designating the folders as shared. Anyone you wish to share with will need a Dropbox account. (using the public folder will not work since links out it are for files only, not folders. An odd restriction, but it is what it is).
    IF you have copies of the files on a PC, you will find that will be the easiest place to upload them from. If they are only in iBooks on the iPad, you will need to synch and use the file management function to copy them off. not sure if you can synch them back over to DropCopy within iTunes (never tried it).
    DEpending on your needs, a couple of apps to look into are iCab Mobile (a browser), and GoodReader (doc viewing and management app). Both integrate well with DropBox.

  • Error Script 5009 "Object" undefined in a Page with an iFrame IE9

    in some pages of my application (apex 4.0) i use an iframe to a google map.
    i use iframes because i want to use complex functionality in multiple pages of my apex app.
    this works finr in most browsers except ie9: the iFram page is not shown correct, in the console the error script 5009 object undefined in jquery-1.4.2.min.js, Line 21 Character 105
    is reported.
    mr google says that this is an known problem when loading jquery multiple times in one page for example if u use an iframe.
    my first idea was to disable the loading of the jqurey.js by removing the appropriate lines in the page template.
    but it seems to me, that lot of code is not part of the template, but is genereted by the apex engine for expample these lines can not be found in the page templates
    {<script type="text/javascript">var apex_img_dir = "/i/", htmldb_Img_Dir = apex_img_dir;</script>
    <script src="/i/libraries/jquery/1.4.2/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="/i/javascript/apex_4_0.js" type="text/javascript"></script>
    <script src="/i/javascript/apex_legacy_4_0.js" type="text/javascript"></script>
    <script src="/i/javascript/apex_widget_4_0.js" type="text/javascript"></script>
    <script src="/i/javascript/apex_dynamic_actions_4_0.js" type="text/javascript"></script>
    any ideas how i can overcome the problem, except using another browser?
    merry xmas
    peter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    push

  • PowerShell script : Directory object not found error in Get-ADGroupMember

    I am new in powershell scripting. I am writing a script to add users in different AD Groups. while doing so I do the following:
    Check if the user already exist in the group:
    $mbr_exist = Get-ADGroupMember $grpname | Where-Object {$_.SamAccountName -eq $sam}
    If user does not exist then add the user to the group.
    When I manually run the script its runs flawless, without any errors. But when I schedule the script to run it gives an error as follows:
    3/30/2015 8:32:15 AM Directory object not foundAt + $mbr_exist = Get-ADGroupMember $grpname | Where-Object {$_.SamAc ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~ Error at Line:$mbr_exist = Get-ADGroupMember
    $grpname | Where-Object {$_.SamAccountName -eq $sam}
    The strange thing is the user for which it throws the error is present in the group.I am not sure why this error is occurring when scheduled. Can any one please help? All the suggestions will be appreciated
    Note: (The script is scheduled using Windows Task Scheduler)
    try
    # # Initialize the variables we will use
    $status = 'false'
    $drivename = "H:"
    $sysdate = Get-Date -UFormat "%m_%d_%Y"
    $foldername = $drivename + "\Script_Result\PowershellData"+ $sysdate
    $backup_folder = "$foldername\AD_Groups_Backup"
    $updatedGroup = "$foldername\Updated_AD_Groups_LogFiles"
    $LogFilePath = "$foldername\Log_Update_ADGroups"+$sysdate+".log"
    # # Initialize the arrays we will use
    $GroupArray = @()
    # # maintain log of program startup
    $logdate = get-date
    $logdate.ToString() + "`tStarted script to Update AD user Groups..." | Out-File -FilePath $LogFilePath
    # # Create a sub folder to store the backup files
    $fileexist = Test-Path $backup_folder -PathType Container
    if($fileexist -ne 'False')
    New-Item -ItemType Directory $backup_folder
    # # Create a sub folder to store Updated AD group Log files
    $fileexist = Test-Path $updatedGroup -PathType Container
    if($fileexist -ne 'False')
    New-Item -ItemType Directory $updatedGroup
    # # Take back up of the AD groups data
    Get-ADGroupMember -Identity "Group1" | Export-csv "$backup_folder\Group1_BackUP$sysdate.csv"
    Get-ADGroupMember -Identity "Group2" | Export-csv "$backup_folder\Group1_BackUP$sysdate.csv"
    Get-ADGroupMember -Identity "Group3" | Export-csv "$backup_folder\Group1_BackUP$sysdate.csv"
    Get-ADGroupMember -Identity "Group4" | Export-csv "$backup_folder\Group1_BackUP$sysdate.csv"
    (an so on..... 11 such groups )
    # # Fetch AD Users data
    $ADusers = Get-ADUser -filter {(EmployeeNumber -gt 1) -and (EmployeeNumber -ne "N/A") -and (Enabled -eq $true)} -Properties * | Sort-Object -Property EmployeeNumber
    $ADusers.Count
    foreach($u in $ADusers)
    $sam = $u.SamAccountName
    $empnum = $u.EmployeeNumber
    $mgr = $u.mgr
    $fsal = $u.'fsalary-Hourly'
    $comp = $u.Company
    $ofc = $u.Office
    Write-Host "$sam : $empnum : $mgr :$fsal : $comp : $ofc" -ForegroundColor Yellow
    $GroupArray = @()
    # # Check if the user fits in any of the 11 scenarios
    if($comp -eq "US")
    # scenario 7
    write-host "7. Add to US Employees"
    $GroupArray += "US Employees"
    if($mgr -eq "Y")
    Write-Host "1. ADD to US MAnagers"
    $group = "US Managers"
    $GroupArray += $group
    if(($fsal -eq "Hourly") -and ($ofc -ne "Canton"))
    Write-Host "3. Add to US Hourly (excluding Canton)"
    $group = "US Hourly (excluding Canton)"
    $GroupArray += $group
    if(($fsal -eq "Hourly") -and ($ofc -eq "Canton"))
    write-host "4. Add to US Canton Hourly"
    $group = "US Canton Hourly"
    $GroupArray += $group
    if(($fsal -eq "Salaried") -and ($ofc -eq "Corporate" -or $ofc -eq "Landis Lakes 1" -or $ofc -eq "Landis Lakes 2"))
    Write-Host "5. Add to US Salaried Corporate"
    $group = "US Salaried Corporate"
    $GroupArray += $group
    if(($fsal -eq "Salaried") -and ($ofc -ne "Corporate" -and $ofc -ne "Landis Lakes 1" -and $ofc -ne "Landis Lakes 2"))
    Write-Host "6. Add to US Salaried Plant"
    $group = "US Salaried Plant"
    $GroupArray +=$group
    elseif($comp -eq "canada")
    # scenario 9
    write-host "9. Canada Employees"
    $GroupArray += "Canada Employees"
    if($mgr -eq "Y")
    Write-Host "2. Add to Canada Managers"
    $group = "Canada Managers"
    $GroupArray += $group
    if($fsal -eq "Hourly")
    Write-Host "10. Add to Canada Hourly"
    $group = "Canada Hourly"
    $GroupArray += $group
    if($fsal -eq "Salaried")
    Write-Host "11. Add to Canada Salaried Plant"
    $group = "Canada Salaried Plant"
    $GroupArray += $group
    elseif($ofc -eq "Corporate" -or $ofc -eq "Landis Lakes 1" -or $ofc -eq "Landis Lakes 2")
    Write-Host "8. Add to Corporate Employees"
    $GroupArray += "Corporate Employees"
    write-host "Final Group List" -ForegroundColor Green
    $grplen = $GroupArray.Length
    #$GroupArray
    $grplen
    for($i= 0; $i -lt $grplen; $i++)
    $grpname = $GroupArray[$i]
    write-host "$sam will be added to Group : $grpname" -ForegroundColor Magenta
    # # Check if the user is already present in the Group
    $mbr_exist = Get-ADGroupMember $grpname | Where-Object {$_.SamAccountName -eq $sam}
    if($mbr_exist -eq $null)
    # #Add user to US Managers group
    Add-ADGroupMember -Identity $grpname -Members $sam
    Write-Host "1. User $sam is added to $grpname group" -ForegroundColor Green
    # # documenting the user list that are added to this group
    $grpmbr = New-Object PSObject
    $grpmbr | Add-Member -MemberType NoteProperty -Name "EmployeeNumber" -Value $empnum
    $grpmbr | Add-Member -MemberType NoteProperty -Name "SamAccountName" -Value $sam
    $grpmbr | Add-Member -MemberType NoteProperty -Name "Name" -Value $u.Name
    $grpmbr | Add-Member -MemberType NoteProperty -Name "DistinguishedName" -Value $u.DistinguishedName
    $grpmbr | Add-Member -MemberType NoteProperty -Name "mgr" -Value $mgr
    $grpmbr | Add-Member -MemberType NoteProperty -Name "Company" -Value $comp
    $grpmbr | Add-Member -MemberType NoteProperty -Name "Salary/Hourly" -Value $fsal
    $grpmbr | Add-Member -MemberType NoteProperty -Name "Office" -Value $ofc
    $grpmbr | Add-Member -MemberType NoteProperty -Name "ADGroup" -Value $grpname
    $grpmbr | Export-Csv "$updatedGroup\ADUsers_To_Group($grpname)_$sysdate.csv" -Append -NoTypeInformation
    else
    Write-Host "Member $sam already exist in $grpname group" -ForegroundColor Red
    $logdate = get-date
    $logdate.ToString() + "`tCompleted script to Update Update AD Groups..." | Out-File -FilePath $LogFilePath -Append
    $status = 'true'
    return $status
    catch
    $err_lineno = $error[0].InvocationInfo.ScriptLineNumber
    $err_line = $error[0].InvocationInfo.Line
    $ExceptionMessage = $_.Exception.Message
    #$ExceptionMessage
    $error_info = $error[0].ToString() + $error[0].InvocationInfo.PositionMessage
    Write-Host "$error_info " -ForegroundColor Red
    $FailedItem = $_.Exception.ItemName
    if($ExceptionMessage)
    $logdate.ToString() + "`t $error_info " | out-file "$foldername\ErrorLog_Update_AD_Groups$sysdate.log" -append
    "Line Number: $err_lineno . `nError at Line: $err_line" | out-file "$foldername\ErrorLog_Update_AD_Groups$sysdate.log" -append
    #Invoke-Item "C:\ErrorLog.log"
    $status = 'false'
    return $status

    Hi mdkelly, Sorry for such a late reply (due to credential issues).
    I am using Windows task scheduler to schedule the task. I am given the administrator access to the server (Windows Server 2012). So I think I set to run the script under system account.
    My apologies for asking this, am I missing something while scheduling the script through task scheduler?  how to check if the scheduled task is running under who's credentials? How to pass my (admin) credentials, so that the script execution won't face
    a problem? Any suggestion on the above questions will be helpful. (I tried to search on net for the questions but didn't get any conclusive answers)  
    Thanks in advance.

  • Ehlpdhtm.js script error - Object doesn't support property or method 'Activate'

    RH 9.0.2.271
    Windows 7 64-bit
    This "Object doesn't support property or method 'Activate' ehlpdhtm.js error all of a sudden started popping up when I view any of the chms I build from my file system.
    I initially through it was a 64-bit problem because if I view the chm from my file system I get the script error. But if I copy it to a 32-bit PC or run it from within RH (after it's compiled for example) or a 32-bit version of our software, it runs fine. (However, one of my co-workers tried it on her 64-bit machine and didn't receive any error.) In any case, it seems to be happening on my machine only.
    Anyway, it's not on every topic, but on every one that calls the ehlpdhtm.js script with this line of code, it appears to be happening:
    <script src="ehlpdhtm.js" type="text/javascript" language="JavaScript1.2"></script>
    I don't think hhactivex.dll plays with this js at all, but just in case, I unregistred and re-registered that dll to no effect. I also tried explicitly adding in ehlpdhtm.js as a baggage file. Again, to no effect.
    What could have changed on my system to make this start happening? And any ideas on how to fix it?

    Well here's some more info I found out. If I unregister the 64-bit hhactivex.dll the script error  goes away. Of course my Glossary tab is grayed out as shown below, so that's not really an option:
    Reregistering the 64-bit hhactivex.dll again shows the script errors. Plus, if I then go to my glossary it's completely empty as shown here:
    If I copy this help down into a 32-bit machine everything works: the glossary has glossary terms, there's no script errors.
    In short, I don't know what's going on, but the script error I'm getting is somehow related to having the 64-bit dll registered.

  • Script error "object required" when log off

    I have created a new user and assigned the "Everyone" role to it. I log in to the portal using this new user. Then I press logoff. Then I press OK. Now I get the script error below:
    line:91
    char:8
    Error: Object required
    code:0
    URL: http://.....
    any idea why I get this error?
    note: I don't get a logoff error when I use the administrator or other user IDs.

    Hi,
    you are using a customized masthead. InSP14 SAP changed some Javascript and therefor, the "object" your are colling in your logoff() function is missing. You'll have to comment out this JS call in your masthead. Check the IE error message explanation, it will show you the line where the error occurs.
    I've already posted the solution in this forum, but unfortunately, I'm not able to find my previous post
    br,
    Tobias

  • Script error "object expected"

    Hello,
    I have tried everything I could find on the internet and I still get script error message "object expected" "code 0" in the script http://127.0.0.1:1133/app/_js/adobe.js
    during installation. After that the installation just hangs and there is no other way as to kill the process.
    Windows XP 32bit
    Internet Explorer 8
    Thanks,
    Vladimir
    Solution: workaround over download the standalone installation did it

    Hi,
    Nice to know that you could solve this issue.
    The workaround:
    Download the installer from http://helpx.adobe.com/content/help/en/flash-player/kb/installation-problems-flash-player- windows.html#main-pars_header
    Close browsers and double-click the installer.
    Thanks,
    Sunil

  • Fuego Object Documentation

    Where can I get a detailed description of all of the Fuego Objects and their methods?

    Your question has 2 possible answers:
    1) if you refer to the BPM Objects (ex Fuego) that you defined in the projects:
    a) you can write documentation for each one in the "doc" flap as david mentioned
    b) you can generate a project report and get a html report of all of them
    2) if you refer to the built-in components:
    a) they should have some documentation in the flap.
    b) there is no report on them.
    Hope it clarifies
    MAriano
    Benitez/BEA/BPM/Beautiful

  • Authorization Object Documentation

    Dear Colleagues,
    in earlier SAP versions there was on opportunity to download the documentation for all authorization objects in one docuemtn via
    execute transaction SU03 -> Information -> Object List with Documentation -> Download
    Does anyone know, where this function has gone to?
    Help is appreciated
    Helmut

    With the help of a collegue I followed your advice.
    The feature was availbale in SAP-Release 4.7, however got deprecated in ECC6.0. It was based on function module LIST_USER_DATA .
    A workaround is as follows:
    In order to obtain the documentation for all authorization objects (e.g. fields, activity codes and the corresponding explanations)
    select from table DOKTL (Documentation: Text Lines) where ID (Documentation Class) = u201EUOu201C and LANGU (Language) = u201EENu201C and TYP (Document Type) = u201EEu201C fields OBJECT (Docu. Object), VERSION (Version of Document Modul) , DOKTEXT (Text line in documentation)
    In a second step select all records from the resulkt set, where VERSION is highest.
    If specific versions are required, refer to table DOKHL (Documentation: Headers).
    Regards
    Helmut

  • Scripting: Collection object members are null?

    We are trying to validate the contents of a collection, and are having difficulty accessing individual members.
    We have tried both using the iterator
    Iterator iterator = collection.iterator();
    while (iterator.hasNext()) {
    Object element = iterator.next();
    throw doc.createApplicationException("test",element);
    And the .get() method of the collection variable that is supplied.
    int i;
    for (i=0;i<=collection.size();i++) {
      throw doc.createApplicationException("test",collection.get(i));
    collection.size() shows that we have 2 members in the collection, but looping through them appears to return null objects.

    We are simply writing a collection validation script in the E-sourcing web interface, which use Beanshell. No tool per se.
    I tried this syntax and I still get an error on the line
    fieldX = member.get(fieldX);
    internal Error: null variable value
    The complete code is
    iterTest = collection.iterator();
    for(member : iterTest){
      fieldX = member.get(fieldX);
      System.out.println("FieldX: " + fieldX);
    collection.size is 2, so I know there's something in there.

Maybe you are looking for