Jump to content

Object can not separate variables


6105
 Share

Recommended Posts

I can't find solution to check if object have variable or not, i have 2 variables in object, i use:

$oIE = _IECreate('D:\Dropbox\Projects\au3\IE_Builder\test.html')
$oInputs = _IETagNameGetCollection($oIE, "form")
For $oInput In $oInputs
$d = $oInput.name
If $d = 0 then ConsoleWrite("Form: " & $d & @CRLF)
Next

And result is:

Form: 0
Form: d3e8f5e3ba12

I have tried many solutions, but no one works.... pls help. i can't separate this variables.. :

Edited by 6105

[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

Link to comment
Share on other sites

If you want to get a collection of all forms why don't you use function _IEFormGetCollection? There are more functions available to process the content of a form then.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Thank you, but in any case, how i can select which one i want to use from the Object?

[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

Link to comment
Share on other sites

From a form you can select an object by name or you loop through the collection of objects.

Can you post the html code of the page you want to automate and the object you want to access?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

water,

html is this here is 2 forms, sometimes is 1 or 3 i need to select "class="ajaxForm":

<div style="display:none"><form action="id=fb399df65ee7ea5209bc4ef742570af4" method="post"></form></div>     <h4>Single-user</h4>
  <form method="post" class="ajaxForm" name="d3e8f5e3ba12" action="008b0e8b13a48b4a9973f690fde336e2">
  <input type="hidden" name="action" id="single-action" value="bfbddadfbdccfdb">
  <input type="hidden" name="ee1cf0c6f5d4cd729cd58f23982da574" id="single-key" value="xsrMamrKcGhsyHBoYGpoZMxicMzMyG5yymZsysRmysiDlplqZpdqZ22XcA==">
  <input type="hidden" name="skey" id="single-skey" value="5e1074f53ab88beba9b35539523830dc">

i try now this: but often have error, if form don't have specified class:

$i = 0
$oForms = _IEFormGetCollection($oIE)
For $oForm In $oForms
StringRegExp($oForm.class, "ajax", 1)
If Not @error Then
$aSubmit = $oForm.name
$aTmp = $i
EndIf
$i += 1
Next
;and then i select form by $i
$oForm = _IEFormGetCollection($oIE, $aTmp)

Forms:

0. Form Name = 0.
0. Form Action = file:///id=fb399df65ee7ea5209bc4ef742570af4
1. Form Name = d3e8f5e3ba12
1. Form Action =

[center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...